﻿



/* Operator Level Dropdown */
#operatorLevel {
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

    #operatorLevel:hover, #operatorLevel:focus {
        border-color: #74ebd5;
        box-shadow: 0 0 8px rgba(116, 235, 213, 0.5);
    }

/* Number Size Dropdown */
#numberSize {
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

    #numberSize:hover, #numberSize:focus {
        border-color: #74ebd5;
        box-shadow: 0 0 8px rgba(116, 235, 213, 0.5);
    }

/* Timer and Score */
#timer, #score {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 10px 0;
    color: #fff;
    background: rgba(0,0,0,0.2);
    padding: 8px 16px;
    border-radius: 8px;
}

/* Question Display */
#question {
    font-size: 1.5rem;
    margin: 15px 0;
    padding: 15px 20px;
    background: transparent;
    border-radius: 10px;
    text-align: center;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}

/* Answer Input */
#answerInput {
    padding: 10px 15px;
    font-size: 1.1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    width: 150px;
    text-align: center;
    transition: all 0.3s ease;
}

    #answerInput:focus {
        border-color: #74ebd5;
        box-shadow: 0 0 8px rgba(116, 235, 213, 0.5);
    }


/* Start Button */
.start-button {
    padding: 10px 25px;
    font-size: 1.2rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, blue, cyan);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}

#start-button:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 15px rgba(0,0,0,0.3);
}


#game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 equal columns */
    grid-auto-rows: 1fr; /* rows same height as columns */
    gap: 10px; /* spacing between cells */
    justify-content: center;
    max-width: 40vw; /* board scales with viewport */
    margin: 20px auto 0 auto; /* center horizontally */
}

#game-board-music {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 equal columns */
    grid-auto-rows: 1fr; /* rows same height as columns */
    gap: 10px; /* spacing between cells */
    justify-content: center;
    margin: 20px auto 0 auto; /* center horizontally */
}

#sequence-board {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    height: 150px;
    border-radius: 5px;
    background-color: transparent;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}

.cell {
    width: 150px;
    height: 150px;
    background: transparent;
    border-radius: 5px;
    margin: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    cursor: pointer;
    border-radius: 10px;
    user-select: none;
}

.frame {
    width: 80%;
    min-width: 35px;
    aspect-ratio: 1 / 1;
    background: rgba(0,0,0,0.2);
    border-radius: 5px;
    margin: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(0.5rem, 5vw, 3rem); /* scales with viewport width but has min/max */
    cursor: pointer;
    user-select: none;
}

.sudoku-frame {
    width: 50px;
    height: 50px;
    background: transparent;
    border-radius: 5px;
    margin: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 25px;
    cursor: pointer;
    user-select: none;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
}

.hidden {
    background-color: #ccc;
}

#symbol-pool {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    border-radius: 5px;
    background: rgba(0,0,0,0.2);
}

    #symbol-pool .cell {
        margin: 5px;
    }

#message {
    margin-top: 25px;
    font-size: 18px;
}

/* Button base style */
.game-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 200px;
    min-height: 200px;
    width: 200px;
    min-width: 200px;
    padding: 12px 24px;
    margin: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, blue, cyan);
    color: #fff;
}

    /* Hover effect */
    .game-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 10px rgba(0,0,0,0.15);
        background: linear-gradient(135deg, cyan, blue);
    }

    /* Active/pressed effect */
    .game-button:active {
        transform: translateY(1px);
        box-shadow: 0 3px 5px rgba(0,0,0,0.2);
    }

    /* Disabled state */
    .game-button:disabled {
        background: #ccc;
        color: #666;
        cursor: not-allowed;
        box-shadow: none;
        transform: none;
    }




/* ==========================
   RHYTHM GAME VISUALS
========================== */

/* Rhythm board pulse */
@keyframes bpmPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0,255,255,0.2);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 40px rgba(0,255,255,0.4);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0,255,255,0.2);
    }
}

.rhythm-board {
    position: relative;
    max-width: 1600px;
    height: 520px;
    margin: auto;
    border-radius: 16px;
    background: radial-gradient(circle at center, #0a1a2a, #020814);
    animation-name: bpmPulse;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.rhythm-board {
    position: relative;
    margin: 20px auto;
    border-radius: 16px;
    background: radial-gradient(circle at center, #0a1a2a, #020814);
    box-shadow: inset 0 0 30px rgba(0,255,255,0.15), 0 0 25px rgba(0,0,0,0.6);
}

/* Main hit circle */
.rhythm-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at top left, cyan, blue);
    box-shadow: 0 0 15px rgba(0,255,255,0.8), inset 0 0 10px rgba(255,255,255,0.6);
    cursor: pointer;
    animation: popIn 0.15s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Approach ring */
.approach-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 140%;
    border-radius: 50%;
    border: 2px solid rgba(0,255,255,0.6);
    transform: translate(-50%, -50%);
    animation: shrinkRing linear forwards;
    animation-duration: var(--beat, 500ms);
}



/* RHYTHM */


/* Hit feedback */
.rhythm-circle.hit {
    animation: hitFlash 0.15s ease-out forwards;
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shrinkRing {
    from {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 1;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

@keyframes hitFlash {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.4);
        opacity: 0;
    }
}

.rhythm-circle {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    animation: popIn 0.15s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.05s ease;
}

.approach-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    border-radius: 50%;
    border: 2px solid;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    animation: shrinkRing linear forwards;
}

.rhythm-circle.hit {
    animation: hitFlash 0.15s ease-out forwards;
}

@keyframes popIn {
    from {
        transform: scale(0.4);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shrinkRing {
    from {
        transform: translate(-50%, -50%) scale(1.6);
        opacity: 1;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

@keyframes hitFlash {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.4);
        opacity: 0;
    }
}
