﻿/* typing game page styling starts here*/
.game-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2d3748;
    text-shadow: none;
}

.test-text {
    background: #fffbe8;
    border-radius: 16px;
    padding: 24px;
    color: #2d3748;
    font-size: 1.2rem;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    text-align: left;
    border: 1px solid #ffe066;
}

.typing-area {
    width: 100%;
    min-height: 120px;
    height: 120px;
    max-height: 120px;
    flex: 1 1 0;
    font-size: 1.2rem;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    padding: 16px;
    margin-bottom: 20px;
    background: #fff;
    color: #2d3748;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    caret-color: #f59e42;
    transition: border 0.2s;
    resize: none; /* Prevent resizing */
}

.typing-area:focus {
    border: 1.5px solid #f59e42;
    background: #fffde7;
}

.menu {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.menu button {
    font-size: 1.1rem;
    padding: 8px 24px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(90deg, #ffe066 0%, #f59e42 100%);
    color: #2d3748;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.menu button:hover {
    background: linear-gradient(90deg, #f59e42 0%, #ffe066 100%);
    color: #fff;
    transform: scale(1.05);
}

.timer {
    font-size: 1.3rem;
    color: #f59e42;
    margin-bottom: 10px;
}

.result-card {
    background: #f7fafc;
    border-radius: 16px;
    padding: 32px 24px;
    margin-top: 30px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    color: #2d3748;
    font-size: 1.2rem;
    text-align: left;
    border: 1px solid #e2e8f0;
}

.word-correct {
    background: #d3f9d8;
    color: #228b22;
    border-radius: 4px;
    padding: 2px 4px;
    margin: 1px;
    display: inline-block;
}

.word-wrong {
    background: #ffe3e3;
    color: #d90429;
    border-radius: 4px;
    padding: 2px 4px;
    margin: 1px;
    display: inline-block;
}

.word-neutral {
    color: #f59e42;
    margin: 1px;
    display: inline-block;
}

/* Additions for Typing Test two-column layout and live stats */
.live-result-card {
    background: #fff;
    border: 2px solid #ffe066;
    color: #2d3748;
    min-height: 320px;
    margin-top: 0;
    margin-bottom: 18px;
    box-shadow: 0 6px 32px rgba(0,0,0,0.06);
    font-size: 1.1rem;
    transition: box-shadow 0.2s;
}

.live-result-card .stat-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f59e42;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.live-result-card div {
    margin-bottom: 10px;
}

.word-current {
    font-weight: bold;
    text-decoration: underline;
    text-underline-offset: 4px;
    color: #f59e42;
    border-bottom: none;
    background: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.2s;
}

.word-current-wrong {
    color: #d90429 !important;
    text-decoration: underline wavy #d90429;
    background: none;
}

.modal-typingtest {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.25);
    justify-content: center;
    align-items: center;
}

.modal-content-typingtest {
    background: #fffbe8;
    color: #2d3748;
    border-radius: 18px;
    padding: 36px 32px 24px 32px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    min-width: 340px;
    max-width: 95vw;
    position: relative;
    text-align: center;
    animation: popIn 0.3s;
}

.close-modal {
    position: absolute;
    top: 12px; right: 18px;
    font-size: 2rem;
    color: #d90429;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s;
}

.close-modal:hover { color: #f59e42; }

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 991px) {
    .live-result-card {
        min-height: 0;
        margin-bottom: 24px;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 0 4px !important;
    }

    .row {
        flex-direction: column;
    }

    .col-lg-8, .col-lg-4, .col-md-12, .col-md-8 {
        max-width: 100%;
        flex: 0 0 100%;
    }
}

.d-flex.align-items-start {
    align-items: stretch !important;
}

.typing-area {
    min-height: 120px;
    height: 120px;
    max-height: 120px;
    flex: 1 1 0;
    font-size: 1.2rem;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    padding: 16px;
    margin-bottom: 20px;
    background: #fff;
    color: #2d3748;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    caret-color: #f59e42;
    transition: border 0.2s;
    resize: none; /* Prevent resizing */
}

.btn-reset {
    height: 120px;
    min-width: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    box-sizing: border-box;
    border-radius: 8px;
    font-size: 1.2rem;
}

.snake-canvas-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
#snakeCanvas {
    width: 100% !important;
    height: 500px !important;
    max-width: 100%;
    display: block;
    background: transparent;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

/* whack a mole styling starts*/

.mole-board {
    display: grid;
    grid-template-columns: repeat(3, 120px);
    grid-gap: 32px;
    justify-content: center;
    margin: 0 auto;
    margin-bottom: 30px;
}

.hole {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 50% 80%, #444 60%, #222 100%);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

    .hole.active {
        box-shadow: 0 0 32px 8px #ffd700;
    }

.mole {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) scale(0);
    transition: transform 0.2s;
    width: 80px;
    height: 80px;
    z-index: 2;
}

.hole.show .mole {
    transform: translateX(-50%) scale(1);
}

.mole svg {
    width: 80px;
    height: 80px;
    pointer-events: none;
}

/* mole styling ends here */

/* memory game styling starts here */
.memory-board {
    display: grid;
    grid-template-columns: repeat(4, 90px);
    grid-gap: 18px;
    justify-content: center;
    margin: 0 auto;
    margin-bottom: 30px;
}
.card {
    width: 90px;
    height: 120px;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    cursor: pointer;
    position: relative;
    perspective: 600px;
    transition: box-shadow 0.2s, transform 0.2s;
    user-select: none;
}
.card.flipped, .card.matched {
    box-shadow: 0 0 24px 8px #ffd700;
    z-index: 2;
}
.card-inner {
    width: 100%;
    height: 100%;
    position: absolute;
    transition: transform 0.5s;
    transform-style: preserve-3d;
}
.card.flipped .card-inner, .card.matched .card-inner {
    transform: rotateY(180deg);
}
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border-radius: 12px;
}
.card-front {
    background: rgba(255,255,255,0.15);
    color: #ffd700;
}
.card-back {
    background: linear-gradient(135deg, #00eaff 0%, #8a2be2 100%);
    color: #fff;
    transform: rotateY(180deg);
}
.score {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #ffd700;
}
.reset-btn {
    margin-bottom: 20px;
}
@media (max-width: 600px) {
    .memory-board {
        grid-template-columns: repeat(4, 60px);
        grid-gap: 10px;
    }
    .card {
        width: 60px;
        height: 80px;
    }
}


/* Rock paper game styling */

/* Consistent styling for RPS game */
.rps-buttons {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

.rps-btn {
    width: 100px;
    height: 100px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    outline: none;
}

    .rps-btn:active {
        transform: scale(0.95);
    }

    .rps-btn svg {
        width: 70px;
        height: 70px;
        pointer-events: none;
    }

    .rps-btn.win {
        animation: winAnim 0.7s;
        box-shadow: 0 0 32px 8px #32CD32;
    }

    .rps-btn.lose {
        animation: loseAnim 0.7s;
        box-shadow: 0 0 32px 8px #ff3c6f;
    }

@@keyframes winAnim {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.2) rotate(-10deg);
    }

    60% {
        transform: scale(1.1) rotate(10deg);
    }

    100% {
        transform: scale(1);
    }
}

@@keyframes loseAnim {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(0.8) rotate(-10deg);
    }

    60% {
        transform: scale(0.9) rotate(10deg);
    }

    100% {
        transform: scale(1);
    }
}

.choices {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 20px;
}

.choice-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.choice-label {
    margin-top: 8px;
    font-size: 1rem;
    color: #ffd700;
}

.score {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #ffd700;
}

.result {
    font-size: 2rem;
    margin-bottom: 20px;
    min-height: 48px;
}

@@media (max-width: 600px) {
    .rps-buttons {
        gap: 10px;
    }

    .rps-btn {
        width: 60px;
        height: 60px;
    }

        .rps-btn svg {
            width: 40px;
            height: 40px;
        }

    .choice-icon {
        width: 48px;
        height: 48px;
    }

    .choices {
        gap: 20px;
    }
}

/* End of Rock paper game styling */