/* =========================
   HERO SECTION
   ========================= */
.hero-section {
    padding: 30px 0 !important;
}

/* =========================
   MAIN CONTAINER
   ========================= */
#main-container {
    display: block;
    margin-top: 30px !important;
}

/* =========================
   START INSTRUCTION
   ========================= */
.start-instruction {
    text-align: center;
    font-size: 1.3rem;
    color: #000;
    font-weight: 600;
    margin-bottom: 18px;
    margin-top: 12px;
    letter-spacing: 1px;
    transition: opacity 0.3s;
}
.start-instruction.hide {
    opacity: 0;
    pointer-events: none;
    height: 0;
    margin: 0;
    padding: 0;
}

/* =========================
   GAME BOARD
   ========================= */
.game {
    height: 500px;
    width: 500px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5vmin;
}

/* =========================
   GAME BOXES
   ========================= */
.box {
    background: rgba(245, 255, 250, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(160, 220, 180, 0.2);
    border: 1px solid rgba(150, 200, 180, 0.3);
    height: 150px;
    width: 150px;
    font-size: 4rem;
    color: #15314b;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.box:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(160, 220, 180, 0.3);
}
.box:active {
    transform: scale(0.95);
    box-shadow: 0 4px 12px rgba(160, 220, 180, 0.2);
}

/* =========================
   SCOREBOARD
   ========================= */
.scoreboard {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 32px 0 20px 0;
    font-size: 1.4rem;
    border-radius: 12px;
    padding: 12px 28px;
}
.score-label {
    font-weight: 600;
    color: #2d3748;
    margin: 0 6px;
}
.score-value {
    font-weight: bold;
    color: #1a8917;
    font-size: 1.5em;
}
.score-separator {
    margin: 0 10px;
    color: #888;
    font-size: 1.2em;
}

/* Add below the .score-value definition */
.score-player {
    color: #1a8917 !important; /* Green for O (Player) */
}
.score-computer {
    color: #d32f2f !important; /* Red for X (Computer) */
}

/* Add for board marks */
.box.o {
    color: #1a8917 !important; /* Green for O */
}
.box.x {
    color: #d32f2f !important; /* Red for X */
}

/* =========================
   BUTTONS
   ========================= */
.button-row {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 24px 0 36px 0;
}
#play-again-btn {
    display: none;
}
#play-again-btn.show {
    display: inline-block;
}
.play-again {
    background: linear-gradient(90deg, #2ecc40, #27ae60);
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 30px;
    padding: 14px 38px;
    font-size: 1.2rem;
    box-shadow: 0 6px 18px #27ae601a;
    cursor: pointer;
    transition: background 0.2s;
}
.play-again:hover {
    background: linear-gradient(90deg, #27ae60, #2ecc40);
}
.reset {
    background: transparent;
    color: #111;
    font-weight: bold;
    border: none;
    border-radius: 30px;
    padding: 14px 38px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
    outline: none !important;
}

/* =========================
   RESULT POPUP & OVERLAY
   ========================= */
.result-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9998;
    transition: opacity 0.3s;
}
.result-popup {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.25);
    z-index: 9999;
    min-width: 350px;
    max-width: 95vw;
    padding: 48px 36px 36px 36px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: popupIn 0.3s;
}
@media (max-width: 500px) {
    .result-popup {
        min-width: 90vw;
        padding: 32px 8vw 24px 8vw;
    }
}
@keyframes popupIn {
    from { transform: translate(-50%, -60%) scale(0.92); opacity: 0; }
    to   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.result-popup .popup-icon {
    font-size: 4rem;
    margin-bottom: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.result-popup h2 {
    font-size: 2.3rem;
    margin: 30px 0 10px ;
    font-weight: 800;
    letter-spacing: 1px;
    color: #183153;
    width: 100% !important;
}
.result-popup p {
    font-size: 1.18rem;
    margin-bottom: 32px;
    color: #444;
    font-weight: 500;
}
.result-popup .popup-btn {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 28px;
    padding: 15px 44px;
    font-size: 1.18rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
}
.result-popup .popup-btn:hover {
    background: #1256a3;
    transform: scale(1.04);
}

/* =========================
   UTILITY CLASSES
   ========================= */
.hide {
    display: none !important;
}

.file-icon svg {
    display: block;
    margin: 0 auto;
  }
.sitemap-link{
    text-decoration: none;
    color: #FFF !important;
}
/* =========================
   RESPONSIVE DESIGN
   ========================= */

/* ====== Small Laptops (min-width: 901px) and (max-width: 1200px) ====== */
@media (min-width: 901px) and (max-width: 1200px) {
    .game {
        width: 60vw;
        height: 60vw;
        max-width: 500px;
        max-height: 500px;
        gap: 1vw;
    }
    .box {
        width: 12vw;
        height: 12vw;
        font-size: 3.2rem;
        min-width: 100px;
        min-height: 100px;
        max-width: 140px;
        max-height: 140px;
    }
    .scoreboard {
        font-size: 1.3rem;
        padding: 12px 8vw;
        margin: 28px 0 18px 0;
    }
    .button-row {
        gap: 16px;
        margin: 22px 0 32px 0;
    }
    .play-again, .reset {
        padding: 13px 6vw;
        font-size: 1.15rem;
    }
    .result-popup {
        min-width: 40vw;
        padding: 36px 4vw 28px 4vw;
    }
    .result-popup h2 {
        font-size: 2rem;
    }
    .result-popup .popup-icon {
        font-size: 3.5rem;
    }
}

/* ====== Tablet Devices (min-width: 601px) and (max-width: 900px) ====== */
@media (min-width: 601px) and (max-width: 900px) {
    .game {
        width: 80vw;
        height: 500px;
        max-width: 70vw;
        max-height: fit-content;
        gap: 1.5vw;
    }
    .box {
        width: 18vw;
        height: 18vw;
        font-size: 2.8rem;
        min-width: 90px;
        min-height: 90px;
        max-width: 130px;
        max-height: 130px;
    }
    .scoreboard {
        font-size: 1.2rem;
        padding: 10px 10vw;
        margin: 24px 0 16px 0;
    }
    .button-row {
        gap: 14px;
        margin: 20px 0 28px 0;
    }
    .play-again, .reset {
        padding: 12px 10vw;
        font-size: 1.1rem;
    }
    .result-popup {
        min-width: 60vw;
        padding: 32px 6vw 24px 6vw;
    }
    .result-popup h2 {
        font-size: 1.7rem;
    }
    .result-popup .popup-icon {
        font-size: 3rem;
    }
}

/* ====== Mobile Devices (max-width: 600px) ====== */
@media (max-width: 600px) {
    .game {
        width: 98vw;
        height: 98vw;
        max-width: 98vw;
        max-height: 98vw;
        gap: 2vw;
        margin: 0 auto;
    }
    .box {
        width: 30vw;
        height: 30vw;
        font-size: 2.2rem;
        min-width: 70px;
        min-height: 70px;
        max-width: 100px;
        max-height: 100px;
    }
    .scoreboard {
        font-size: 1.1rem;
        padding: 8px 8vw;
        margin: 18px 0 12px 0;
    }
    .button-row {
        gap: 10px;
        margin: 18px 0 24px 0;
    }
    .play-again, .reset {
        padding: 10px 18vw;
        font-size: 1rem;
    }
    .result-popup {
        min-width: 90vw;
        padding: 24px 4vw 18px 4vw;
    }
    .result-popup h2 {
        font-size: 1.3rem;
    }
    .result-popup .popup-icon {
        font-size: 3.8rem;
    }
}

