/* ---- VATSAL.LOL — Tower of Hanoi — v2.5 ---- */

@font-face {
    font-family: "Vatsal-logo";
    src: url("../../assets/data/vatsal-logo-font.ttf") format("truetype");
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #0a0a0f;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    font-family: 'Courier New', monospace;
    padding-bottom: 40px;
}

/* ---- HEADER ---- */
.vatsal-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.vatsal-home {
    font-family: "Vatsal-logo" !important;
    text-decoration: none;
    color: #ff7e5f;
    font-size: 18px;
    line-height: 1;
}

/* ---- CONTAINER ---- */
.container {
    width: 100%;
    max-width: 820px;
    padding: 0 20px 20px;
}

/* ---- TITLE ---- */
.game-title {
    text-align: center;
    margin-bottom: 24px;
}

h1 {
    font-size: clamp(1.8rem, 6vw, 3rem);
    font-family: 'Courier New', monospace;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(to right, #ff7e5f, #feb47b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.6;
    letter-spacing: 1px;
}

/* ---- GAME INFO BAR ---- */
.game-info {
    display: flex;
    justify-content: space-around;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 14px;
    margin-bottom: 20px;
}

.info-item {
    text-align: center;
}

.info-label {
    font-size: 0.65rem;
    letter-spacing: 2px;
    opacity: 0.5;
    font-weight: bold;
}

.info-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #feb47b;
    margin-top: 4px;
    font-family: 'Courier New', monospace;
}

/* ---- DISK CONTROL ---- */
.disk-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.disk-control .label {
    font-size: 0.75rem;
    letter-spacing: 2px;
    opacity: 0.5;
    font-weight: bold;
}

.arrow-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(255,126,95,0.5);
    color: #ff7e5f;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: 'Courier New', monospace;
    user-select: none;
}

.arrow-btn:hover {
    background: rgba(255,126,95,0.12);
    border-color: #ff7e5f;
}

.arrow-btn:active {
    background: rgba(255,126,95,0.25);
}

.arrow-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    background: transparent;
}

.disk-count {
    font-size: 1.6rem;
    font-weight: bold;
    min-width: 36px;
    text-align: center;
    color: #FFEB3B;
    font-family: 'Courier New', monospace;
}

/* ---- MIN STEPS ---- */
.min-steps {
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 1px;
    opacity: 0.55;
    margin-bottom: 20px;
    font-weight: bold;
}

.min-steps span {
    color: #FFEB3B;
    font-size: 0.9rem;
}

/* ---- GAME AREA ---- */
.game-area {
    display: flex;
    justify-content: space-around;
    height: 260px;
    margin-bottom: 20px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.07);
    padding: 10px 0;
}

.peg-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 33%;
    position: relative;
    cursor: pointer;
}

.peg-label {
    font-size: 0.65rem;
    letter-spacing: 2px;
    margin-bottom: 8px;
    color: rgba(254,180,123,0.6);
    font-weight: bold;
}

.peg {
    width: 10px;
    height: 100%;
    background: linear-gradient(to bottom, #8B4513, #5D2906);
    position: relative;
    z-index: 1;
}

.peg::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: -40px;
    width: 90px;
    height: 12px;
    background: linear-gradient(to bottom, #8B4513, #5D2906);
}

/* ---- DISKS ---- */
.disk {
    position: absolute;
    height: 28px;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.4s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
    /* No border-radius — flat 8-bit style */
}

.disk.selected {
    transform: translateX(-50%) translateY(-18px);
    box-shadow: 0 0 18px rgba(255,235,59,0.6), 0 0 6px rgba(255,235,59,0.3);
    z-index: 20;
    transition: all 0.18s ease;
    outline: 2px solid #FFEB3B;
}

/* ---- STATUS ---- */
.status {
    text-align: center;
    font-size: 0.9rem;
    min-height: 44px;
    margin-bottom: 16px;
    font-weight: bold;
    color: #feb47b;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.08);
    letter-spacing: 0.5px;
    line-height: 1.5;
}

/* ---- CONTROLS ---- */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

button {
    padding: 11px 22px;
    background: transparent;
    border: 1px solid rgba(255,126,95,0.5);
    color: #ff7e5f;
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    font-family: 'Courier New', monospace;
    min-height: 44px;
}

button:hover {
    background: rgba(255,126,95,0.1);
    border-color: #ff7e5f;
    color: #fff;
}

button:active {
    background: rgba(255,126,95,0.22);
}

button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: transparent;
}

/* ---- INSTRUCTIONS ---- */
.instructions {
    border: 1px solid rgba(255,255,255,0.07);
    padding: 18px 20px;
    margin-top: 4px;
}

.instructions-title {
    font-size: 0.7rem;
    letter-spacing: 3px;
    font-weight: bold;
    color: #ff7e5f;
    margin-bottom: 12px;
    text-align: center;
}

.instructions ul {
    padding-left: 18px;
    list-style: none;
}

.instructions li {
    margin-bottom: 8px;
    font-size: 0.8rem;
    line-height: 1.6;
    opacity: 0.7;
    padding-left: 12px;
    position: relative;
}

.instructions li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: #ff7e5f;
}

.instructions strong {
    color: #feb47b;
    opacity: 1;
}

/* ---- MOBILE ---- */
@media (max-width: 768px) {
    .vatsal-home {
        display: none;
    }

    .game-area {
        height: 200px;
    }

    h1 {
        font-size: 1.6rem;
        letter-spacing: 2px;
    }

    .controls {
        flex-direction: column;
        align-items: center;
    }

    button {
        width: 100%;
        max-width: 300px;
    }

    .disk {
        height: 24px;
        font-size: 0.65rem;
    }

    .peg-label {
        font-size: 0.55rem;
    }
}

@media (max-width: 400px) {
    .game-area {
        height: 180px;
    }

    .info-value {
        font-size: 1.4rem;
    }
}
