/* Main App Styles */
.game-app {
    padding: 1rem;
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

/* Game Selection */
.game-selector h2 {
    font-size: 2rem;
    color: #5a67d8;
    margin-bottom: 1.5rem;
    text-align: center;
}

.game-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.game-card {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.game-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.1);
}

.game-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.game-title {
    color: #2d3748;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.game-desc {
    color: #718096;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 500;
    padding-top: 1rem;
}

.game-skill {
    padding: 0.25rem 0.75rem;
    border-radius: 5px;
    font-size: 0.9rem;
    background: #c6f6d5;
    color: #276749;
    font-weight: 600;
}

/* Game Interface */
.game-interface {
    background: #f8fafc;
    border-radius: 20px;
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.game-header h2 {
    font-size: 1.8rem;
    color: #2d3748;
    margin: 0;
}

.game-stats {
    display: flex;
    gap: 2rem;
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    font-variant-numeric: tabular-nums;
}

/* Game Container */
.game-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Color Reactor Game */
.color-reactor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.color-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    user-select: none;
}

.color-circle:hover {
    transform: scale(1.05);
}

.color-circle.active {
    animation: pulse 0.5s ease;
}

.color-circle.red {
    background: #fc8181;
    box-shadow: 0 4px 15px rgba(252, 129, 129, 0.4);
}

.color-circle.blue {
    background: #63b3ed;
    box-shadow: 0 4px 15px rgba(99, 179, 237, 0.4);
}

.color-circle.green {
    background: #68d391;
    box-shadow: 0 4px 15px rgba(104, 211, 145, 0.4);
}

.color-circle.yellow {
    background: #f6e05e;
    box-shadow: 0 4px 15px rgba(246, 224, 94, 0.4);
}

.color-circle.purple {
    background: #9f7aea;
    box-shadow: 0 4px 15px rgba(159, 122, 234, 0.4);
}

.color-circle.orange {
    background: #ed8936;
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.4);
}

.color-circle.gray {
    background: #a0aec0;
    box-shadow: 0 4px 15px rgba(160, 174, 192, 0.4);
    cursor: default;
}

.color-circle.gray:hover {
    transform: none;
    cursor: default;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Memory Grid Game */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.memory-cell {
    width: 70px;
    height: 70px;
    background: #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    user-select: none;
}

.memory-cell.active {
    background: #667eea;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.memory-cell.matched {
    background: #48bb78;
    cursor: default;
}

.memory-cell.wrong {
    background: #f56565;
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Add these animations to your CSS */
@keyframes subtle-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
    }
}

@keyframes ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Update Visual Search CSS for smoother transitions */
.visual-search-container {
    text-align: center;
    padding: 20px;
    animation: fade-in 0.5s ease;
}

.visual-search-instructions {
    margin-bottom: 20px;
    padding: 12px;
    background: #f7fafc;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.visual-search-grid {
    display: grid;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
    background: #edf2f7;
    padding: 20px;
    border-radius: 16px;
    border: 3px solid #cbd5e0;
    transition: opacity 0.3s ease;
}

.visual-search-cell {
    aspect-ratio: 1;
    background: white;
    border-radius: 10px;
    border: 2px solid #cbd5e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.visual-search-cell:hover {
    transform: scale(1.03);
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.visual-search-cell svg {
    width: 80%;
    height: 80%;
    transition: opacity 0.3s ease;
}

/* Timer styling */
.timer-display {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
    padding: 8px;
    display: inline-block;
    min-width: 120px;
}

.time-low {
    color: #ed8936;
}

.time-warning {
    color: #f56565;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Responsive updates */
@media (max-width: 768px) {
    .visual-search-grid {
        max-width: 400px;
        gap: 10px;
        padding: 15px;
    }

    .visual-search-cell {
        border-radius: 8px;
    }

    .timer-display {
        font-size: 1.1rem;
        min-width: 110px;
    }
}

@media (max-width: 480px) {
    .visual-search-grid {
        max-width: 320px;
        gap: 8px;
        padding: 12px;
    }

    .visual-search-cell {
        border-radius: 6px;
    }

    .timer-display {
        font-size: 1rem;
        min-width: 100px;
    }

    .visual-search-instructions {
        padding: 10px;
        font-size: 0.95rem;
    }
}

/* Flanker Game - Updated */
.flanker-container {
    text-align: center;
    padding: 1rem;
}

.flanker-instructions {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 10px;
}

.flanker-instructions p {
    margin: 0.5rem 0;
    color: #4a5568;
}

.flanker-instructions strong {
    color: #2d3748;
    font-size: 1.1rem;
}

.instruction-hint {
    font-size: 0.9rem;
    color: #718096;
    margin-top: 0.5rem;
}

/* Arrows Layout */
.flanker-arrows {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.arrow-box {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    user-select: none;
    color: #4a5568;
}

/* For 5-arrow layout (hard mode) */
.arrow-box.outer {
    opacity: 0.6;
    transform: scale(0.85);
}

.arrow-box.middle {
    opacity: 0.8;
    transform: scale(0.95);
}

.arrow-box.center {
    transform: scale(1.05);
}

.arrow-box.focus {
    background: #667eea;
    color: white;
    font-weight: bold;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.arrow-box.correct {
    background: #48bb78 !important;
    /* Green for correct */
    color: white;
    animation: correctPulse 0.5s ease;
}

.arrow-box.wrong {
    background: #f56565 !important;
    /* Red for wrong */
    color: white;
    animation: shake 0.5s ease;
}

.arrow-box.active {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.5);
    animation: pulse 0.5s ease;
}

/* Controls Container */
.flanker-controls-container {
    margin-top: 2rem;
}

/* Desktop Controls - always visible */
.desktop-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.key-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.key-button {
    width: 80px;
    height: 80px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 2rem;
    font-weight: bold;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.key-button:hover {
    border-color: #667eea;
    background: #f7fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.key-button:active,
.key-button.pressed {
    transform: translateY(1px);
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Mobile Controls - always visible but styled differently */
.mobile-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.mobile-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.flanker-btn {
    width: 70px;
    height: 70px;
    font-size: 2rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.flanker-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.flanker-btn:active,
.flanker-btn.pressed {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

.mobile-hint {
    font-size: 0.9rem;
    color: #718096;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Animations */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes correctPulse {

    0%,
    100% {
        transform: scale(1);
        background: #48bb78;
    }

    50% {
        transform: scale(1.15);
        background: #38a169;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .flanker-arrows {
        gap: 15px;
    }

    .arrow-box {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .key-button {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    .flanker-btn {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .mobile-buttons,
    .key-row {
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    .flanker-arrows {
        gap: 10px;
    }

    .arrow-box {
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
    }

    .key-button,
    .flanker-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .mobile-buttons,
    .key-row {
        gap: 0.5rem;
    }
}

/* Hidden state */
.hidden {
    display: none !important;
}

[hidden] {
    display: none !important;
}

/* Add to your existing CSS */
.key-button:focus,
.flanker-btn:focus {
    outline-offset: 2px;
}

/* Prevent button text selection */
.key-button,
.flanker-btn {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Color-Word Stroop Game - UPDATED */
.stroop-container {
    text-align: center;
    padding: 1rem;
}

.stroop-instructions {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stroop-instructions .rule-text {
    margin: 0;
    color: #2d3748;
    font-size: 1.2rem;
}

.stroop-instructions .hint {
    font-size: 1rem;
    color: #718096;
    font-weight: normal;
    margin-top: 0.5rem;
}

.stroop-instructions .timer-display {
    font-size: 1.1rem;
    font-weight: bold;
    color: #4a5568;
    margin-top: 0.5rem;
}

.stroop-instructions .timer-display .time-warning {
    color: #f56565;
}

.stroop-instructions .timer-display .time-low {
    color: #ed8936;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.stroop-target {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    margin: 1.5rem auto;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stroop-word {
    font-size: 3.5rem;
    font-weight: 800;
    text-align: center;
    user-select: none;
    line-height: 1.2;
    padding: 1rem;
}

.stroop-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.stroop-color-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.stroop-btn {
    width: 130px;
    height: 65px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    color: white;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stroop-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stroop-btn:active:not(:disabled),
.stroop-btn.pressed {
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.stroop-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Color buttons - Updated for 6 colors */
.stroop-red {
    background: linear-gradient(135deg, #fc8181, #f56565);
}

.stroop-blue {
    background: linear-gradient(135deg, #63b3ed, #4299e1);
}

.stroop-green {
    background: linear-gradient(135deg, #68d391, #48bb78);
}

.stroop-yellow {
    background: linear-gradient(135deg, #f6e05e, #ecc94b);
}

.stroop-purple {
    background: linear-gradient(135deg, #9f7aea, #805ad5);
}

.stroop-orange {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

/* Feedback animations */
.stroop-word.correct {
    animation: stroopCorrect 0.5s ease;
    background: rgba(72, 187, 120, 0.1);
}

.stroop-word.wrong {
    animation: stroopWrong 0.5s ease;
    background: rgba(245, 101, 101, 0.1);
}

@keyframes stroopCorrect {

    0%,
    100% {
        transform: scale(1);
        color: inherit;
    }

    50% {
        transform: scale(1.05);
        color: #48bb78;
    }
}

@keyframes stroopWrong {

    0%,
    100% {
        transform: translateX(0);
        color: inherit;
    }

    25% {
        transform: translateX(-5px);
        color: #f56565;
    }

    75% {
        transform: translateX(5px);
        color: #f56565;
    }
}

/* Streak display only */
.stroop-streak-display {
    margin-top: 1rem;
}

.stroop-streak-item {
    background: #edf2f7;
    padding: 1rem 2rem;
    border-radius: 10px;
    text-align: center;
}

.stroop-streak-label {
    font-size: 1rem;
    color: #718096;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stroop-streak-value {
    font-weight: bold;
    font-size: 2rem;
    color: #2d3748;
}

/* Difficulty indicator */
.difficulty-indicator {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: #718096;
}

.difficulty-indicator .level {
    font-weight: bold;
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stroop-target {
        padding: 2rem;
        min-height: 160px;
        margin: 1rem auto;
    }

    .stroop-word {
        font-size: 2.8rem;
    }

    .stroop-color-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
        max-width: 400px;
    }

    .stroop-btn {
        width: 110px;
        height: 55px;
        font-size: 1.1rem;
    }

    .stroop-instructions {
        font-size: 1.1rem;
        min-height: 90px;
    }

    .stroop-instructions .rule-text {
        font-size: 1rem;
    }

    .stroop-streak-item {
        padding: 0.8rem 1.5rem;
    }

    .stroop-streak-value {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .stroop-target {
        padding: 1.5rem;
        min-height: 140px;
    }

    .stroop-word {
        font-size: 2.2rem;
        padding: 0.8rem;
    }

    .stroop-color-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
        max-width: 280px;
    }

    .stroop-btn {
        width: 120px;
        height: 50px;
        font-size: 1rem;
    }

    .stroop-instructions {
        font-size: 1rem;
        padding: 0.8rem;
        min-height: 100px;
    }

    .stroop-instructions .rule-text {
        font-size: 0.8rem;
    }

    .stroop-instructions .hint {
        font-size: 0.9rem;
    }

    .stroop-instructions .timer-display {
        font-size: 1rem;
    }

    .stroop-streak-value {
        font-size: 1.6rem;
    }
}

@media (max-width: 360px) {
    .stroop-color-buttons {
        grid-template-columns: repeat(2, 1fr);
        max-width: 250px;
    }

    .stroop-btn {
        width: 110px;
        height: 45px;
        font-size: 0.9rem;
    }
}

/* Color-Word Stroop Game - Timer Update */
.stroop-instructions {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stroop-instructions .hint {
    font-size: 1rem;
    color: #718096;
    font-weight: normal;
    margin-top: 0.5rem;
}

.stroop-instructions .timer-display {
    font-size: 1.3rem;
    font-weight: bold;
    color: #4a5568;
    text-align: center;
    width: 100%;
}

.stroop-instructions .timer-display .time-warning {
    color: #f56565;
}

.stroop-instructions .timer-display .time-low {
    color: #ed8936;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Responsive updates for timer */
@media (max-width: 768px) {
    .stroop-instructions .timer-display {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .stroop-instructions .timer-display {
        font-size: 1.1rem;
    }
}

/* Tracking Test Game */
.tracking-container {
    text-align: center;
    padding: 10px;
}

.tracking-area {
    width: 600px;
    height: 250px;
    background: #f7fafc;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    border: 3px solid #e2e8f0;
}

/* Responsive ball sizes */
.tracking-target {
    position: absolute;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.1s linear;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    font-weight: bold;
}

/* Make green ball more prominent */
.tracking-target.clickable {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.6);
    animation: pulse 1.5s infinite;
    border: 3px solid #047857;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .tracking-area {
        height: 220px;
        max-width: 400px;
    }

    .tracking-target {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .tracking-area {
        height: 200px;
        max-width: 80vw;
    }

    .tracking-target {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Enhanced pulse animation */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.6);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 6px 25px rgba(16, 185, 129, 0.8);
    }
}

/* Add timeout warning animation */
@keyframes timeout-warning {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.9);
    }
}

/* Point feedback animation */
@keyframes float-up {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -100%) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -150%) scale(1);
    }
}

/* Game Controls */
.game-controls {
    margin-top: 2rem;
}

.instructions {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.instructions p {
    margin: 0;
    font-size: 1.1rem;
    color: #4a5568;
    line-height: 1.5;
    font-weight: 500;
}

.control-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.session-controls {
    padding: 1.5rem;
}

.control-row {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 200px;
}

.control-item label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

/* Results Screen */
.results-screen {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin: 2rem 0;
    color: white;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.results-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.results-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.results-content h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: white;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.result-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
}

.previous-best {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    color: rgba(255, 255, 255, 0.8);
}

.skill-progress {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.skill-progress h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.skill-meter {
    margin: 1rem 0;
}

.skill-name {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.skill-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #68d391);
    border-radius: 5px;
    transition: width 1s ease;
}

.results-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn.primary {
    background: #667eea;
    color: white;
}

.btn.primary:hover:not(:disabled) {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn.secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn.secondary:hover:not(:disabled) {
    background: #cbd5e0;
}

.btn.outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn.outline:hover {
    background: #667eea;
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Select Styles */
.select-wrapper {
    position: relative;
    display: inline-block;
    min-width: 180px;
}

.styled-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    color: #4a5568;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.styled-select:hover {
    border-color: #cbd5e0;
}

.styled-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #718096;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.styled-select:focus+.select-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: #667eea;
}

/* Tooltip Styles */
.tooltip-icon {
    cursor: pointer;
    font-size: 0.9rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(26, 20, 61, 0.8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-transform: lowercase;
}

.tooltip-icon:hover {
    transform: scale(1.1);
}

.tooltip-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.tooltip-content {
    background: white;
    color: #2d3748;
    padding: 1.5rem;
    border-radius: 12px;
    max-width: 300px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.tooltip-content h4 {
    margin: 0 0 1rem 0;
    color: #667eea;
    font-size: 1.2rem;
}

.tooltip-content p {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.tooltip-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #718096;
    padding: 0.25rem;
}

.tooltip-close:hover {
    color: #2d3748;
}

/* Hide irrelevant indicators */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-selector h2 {
        font-size: 1.5rem;
    }

    .game-interface {
        padding: 1.2rem;
        border-radius: 16px;
    }

    .instructions p {
        font-size: 1rem;
    }

    .stat-item {
        min-width: 60px;
    }

    .game-container {
        padding: 1rem;
        min-height: 250px;
    }

    .color-circle {
        width: 60px;
        height: 60px;
    }

    .memory-cell {
        width: 50px;
        height: 50px;
    }

    .shape-item {
        width: 80px;
        height: 80px;
    }

    .sound-visualizer {
        width: 150px;
        height: 150px;
    }

    .results-content h2 {
        font-size: 2rem;
    }

    .results-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }

    .result-value {
        font-size: 1.5rem;
    }

    .result-label {
        font-size: 0.8rem;
    }

    .previous-best {
        font-size: 0.75rem;
    }

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

    .btn {
        width: 100%;
        max-width: 280px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .control-row {
        flex-direction: column;
        gap: 1rem;
    }

    .game-interface {
        padding: 1rem;
    }

    .instructions p {
        font-size: .9rem;
    }

    .color-circle {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .game-header {
        flex-direction: column;
        text-align: center;
    }

    .game-stats {
        width: 100%;
        justify-content: space-around;
        padding: 0.5rem 1rem;
    }

    .game-header h2 {
        font-size: 1.5rem;
    }

    .memory-cell {
        width: 40px;
        height: 40px;
    }

    .sound-controls,
    .control-buttons {
        flex-direction: column;
        align-items: center;
    }

    .sound-btn {
        width: 100%;
        max-width: 200px;
    }

    .results-content h2 {
        font-size: 1.7rem;
    }

    .results-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .result-item {
        padding: 0.75rem;
    }
}

/* Tablet and larger */
@media (min-width: 600px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop and larger */
@media (min-width: 900px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Skill Meter Improvements */
.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.skill-name-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-name {
    font-weight: 600;
    color: white;
    font-size: 1rem;
}

.skill-tooltip-icon {
    cursor: pointer;
    font-size: 0.85rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.skill-tooltip-icon:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.skill-percentage {
    font-weight: 600;
    color: white;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    min-width: 45px;
    text-align: center;
}

.skill-meter {
    margin: 1.2rem 0;
}

.skill-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #68d391);
    border-radius: 6px;
    transition: width 1s ease;
    position: relative;
}

/* Different colors for each skill */
#reactionSkillMeter .skill-fill {
    background: linear-gradient(90deg, #4299e1, #63b3ed);
}

#memorySkillMeter .skill-fill {
    background: linear-gradient(90deg, #9f7aea, #b794f4);
}

#focusSkillMeter .skill-fill {
    background: linear-gradient(90deg, #ed8936, #ed8936);
}