/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Professional Color Palette - Solid Colors */
    --primary-bg: #0a0e27;
    --secondary-bg: rgba(15, 23, 42, 0.85);
    --surface-dark: rgba(30, 41, 59, 0.6);
    --surface-light: rgba(51, 65, 85, 0.8);
    
    /* Accent Colors - Strategic Use */
    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    
    /* Card Colors - Solid */
    --card-front-base: #1e293b;
    --card-front: #334155;
    --card-back: #f59e0b;
    --card-matched: #10b981;
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Shadows & Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --glow-blue: 0 0 20px rgba(59, 130, 246, 0.4);
    --glow-green: 0 0 30px rgba(16, 185, 129, 0.5);
    --glow-orange: 0 0 25px rgba(245, 158, 11, 0.4);
    
    /* Spacing */
    --gap-sm: 0.5rem;
    --gap-md: 1rem;
    --gap-lg: 1.5rem;
    --gap-xl: 2rem;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --flip-duration: 0.6s;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0f172a;
    color: var(--text-primary);
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    overflow: hidden;
    position: relative;
}

/* Animated mesh gradient background */
body::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
    animation: meshMove 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes meshMove {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        opacity: 0.9;
    }
}

body > * {
    position: relative;
    z-index: 1;
}

/* ============================================
   PARTICLE BACKGROUND
   ============================================ */
#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   GAME CONTAINER
   ============================================ */
.game-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* ============================================
   HEADER & STATS
   ============================================ */
.game-header {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.4rem, 1.5vw, 0.625rem) clamp(0.5rem, 2vw, var(--gap-lg));
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(30px) saturate(180%) brightness(1.1);
    -webkit-backdrop-filter: blur(30px) saturate(180%) brightness(1.1);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.5),
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 8px 32px rgba(59, 130, 246, 0.1);
    flex-wrap: nowrap;
    gap: clamp(0.4rem, 1.5vw, var(--gap-md));
    z-index: 100;
    flex-shrink: 0;
}

.game-header h1 {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    margin: 0;
    color: #3b82f6;
    flex: 1 1 auto;
    letter-spacing: -0.02em;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.3));
}

.stats-panel {
    display: flex;
    gap: var(--gap-md);
    flex-wrap: wrap;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    padding: 0.5rem 1rem;
    background: rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    inset: -100%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(59, 130, 246, 0.1) 50%,
        transparent 70%
    );
    animation: statShine 3s ease-in-out infinite;
}

@keyframes statShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.stat-item:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 24px rgba(59, 130, 246, 0.3),
        0 0 40px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================
   GAME BOARD - CRITICAL 3D PERSPECTIVE
   ============================================ */
.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: clamp(0.4rem, 1.2vw, 1.25rem);
    padding: clamp(0.5rem, 1.5vw, 1.5rem);
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(25px) saturate(180%) brightness(1.05);
    -webkit-backdrop-filter: blur(25px) saturate(180%) brightness(1.05);
    border-radius: clamp(16px, 3vw, 24px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    width: min(96vw, calc((100vh - 70px) * 1.33));
    height: min(calc(96vw * 0.75), calc(100vh - 70px));
    max-height: calc(100vh - 70px);
    margin: auto;
    position: relative;
    animation: boardEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), boardFloat 3s ease-in-out infinite;
    animation-delay: 0s, 0.6s;
    
    /* CRITICAL: Enables 3D space for child elements */
    perspective: 1200px;
}

@keyframes boardEntrance {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes boardFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* ============================================
   CARD CONTAINER - 3D TRANSFORM WRAPPER
   ============================================ */
.card {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    cursor: pointer;
    transition: all var(--transition-normal);
    filter: brightness(1);
    animation: cardEntrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.3s; }
.card:nth-child(7) { animation-delay: 0.35s; }
.card:nth-child(8) { animation-delay: 0.4s; }
.card:nth-child(9) { animation-delay: 0.45s; }
.card:nth-child(10) { animation-delay: 0.5s; }
.card:nth-child(11) { animation-delay: 0.55s; }
.card:nth-child(12) { animation-delay: 0.6s; }

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(40px) rotateY(-180deg) scale(0.8);
        filter: blur(10px);
    }
    60% {
        transform: translateY(-5px) rotateY(0deg) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateY(0deg) scale(1);
        filter: blur(0);
    }
}

.card:hover:not(.flipped):not(.matched) {
    transform: translateY(-12px) scale(1.05) rotateZ(-2deg);
    filter: brightness(1.25) drop-shadow(0 12px 30px rgba(59, 130, 246, 0.5));
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:active:not(.flipped):not(.matched) {
    transform: translateY(-4px) scale(0.98);
    transition: all 0.1s ease;
}

.card:active:not(.flipped):not(.matched) {
    transform: translateY(-4px) scale(0.98);
}

/* Disable interaction for matched cards */
.card.matched {
    cursor: default;
    pointer-events: none;
}

/* ============================================
   CARD INNER - 3D FLIP MECHANISM (CRITICAL)
   ============================================ */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform var(--flip-duration);
    
    /* CRITICAL: Preserves 3D transformation for children */
    transform-style: preserve-3d;
}

/* Flip state - rotates the inner container */
.card.flipped .card-inner {
    transform: rotateY(180deg);
}

/* ============================================
   CARD FACES - FRONT & BACK
   ============================================ */
.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
    
    /* CRITICAL: Hides the back side of each face during 3D rotation */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Front Face - Professional Neutral Design */
.card-front {
    background: var(--card-front);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.card-pattern {
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        repeating-linear-gradient(
            45deg,
            rgba(148, 163, 184, 0.03) 0px,
            rgba(148, 163, 184, 0.03) 2px,
            transparent 2px,
            transparent 4px
        );
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.card-pattern::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(59, 130, 246, 0.2) 55%,
        transparent 60%,
        transparent 100%
    );
    transform: rotate(45deg);
    animation: shimmer 4s ease-in-out infinite;
}

.card-pattern::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 50% 0%,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    border-radius: 10px;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.card.flipped .card-back {
    animation: cardGlow 2s ease-in-out infinite;
}

@keyframes cardGlow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(245, 158, 11, 0.4),
                    inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 0 8px 40px rgba(245, 158, 11, 0.6),
                    0 0 25px rgba(245, 158, 11, 0.5),
                    inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
}

/* Back Face - Warm Reveal Color */
.card-back {
    background: var(--card-back);
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(251, 191, 36, 0.3);
    
    /* CRITICAL: Pre-rotated 180deg so it appears correct when flipped */
    transform: rotateY(180deg);
}

.card-icon {
    font-size: clamp(2.5rem, 6vw, 4rem);
    user-select: none;
    animation: iconPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    animation-delay: calc(var(--flip-duration) - 0.3s);
    opacity: 0;
    transform: scale(0.3) rotate(-180deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.card.flipped .card-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

@keyframes iconPop {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-180deg);
    }
    60% {
        opacity: 1;
        transform: scale(1.15) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Matched cards visual feedback */
.card.matched .card-back {
    background: var(--card-matched);
    animation: 
        matchPulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
        matchGlow 2s ease-in-out infinite 0.6s;
    box-shadow: 
        0 0 40px rgba(16, 185, 129, 0.9),
        0 0 80px rgba(16, 185, 129, 0.5),
        0 8px 32px rgba(16, 185, 129, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    border-color: rgba(52, 211, 153, 0.8);
}

@keyframes matchGlow {
    0%, 100% {
        filter: brightness(1) saturate(1);
    }
    50% {
        filter: brightness(1.2) saturate(1.3);
    }
}

@keyframes matchPulse {
    0% {
        transform: rotateY(180deg) scale(1);
    }
    50% {
        transform: rotateY(180deg) scale(1.1);
        box-shadow: 0 0 50px rgba(16, 185, 129, 1);
    }
    100% {
        transform: rotateY(180deg) scale(1);
    }
}

/* ============================================
   BUTTONS
   ============================================ */.btn-reset,
.btn-play-again {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-sm);
    padding: 0.625rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    background: #3b82f6;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn-reset::before,
.btn-play-again::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-reset:hover::before,
.btn-play-again:hover::before {
    width: 300px;
    height: 300px;
}

.btn-reset:hover,
.btn-play-again:hover {
    background: #60a5fa;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 12px 32px rgba(59, 130, 246, 0.6),
        0 0 60px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    filter: brightness(1.1);
}

.btn-reset:active,
.btn-play-again:active {
    transform: translateY(-1px) scale(1.02);
    transition: all 0.1s ease;
}

.btn-icon {
    font-size: 1.25rem;
}

/* ============================================
   VICTORY MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 28px;
    padding: var(--gap-xl);
    max-width: 500px;
    width: 90%;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.8),
        0 10px 40px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(0.7) translateY(-20px);
    transition: transform var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(59, 130, 246, 0.1),
        transparent
    );
    animation: modalShine 3s ease-in-out infinite;
}

@keyframes modalShine {
    0% { left: -100%; }
    100% { left: 200%; }
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
    animation: modalPulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.modal-header {
    text-align: center;
    margin-bottom: var(--gap-lg);
}

.modal-header h2 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.modal-body {
    text-align: center;
    margin-bottom: var(--gap-xl);
}

.victory-message {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--gap-lg);
    font-weight: 500;
}

.victory-stats {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
}

.victory-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--gap-md);
    background: rgba(51, 65, 85, 0.5);
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.victory-stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, #3b82f6, #06b6d4);
    transform: scaleY(0);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.victory-stat:hover {
    background: rgba(51, 65, 85, 0.8);
    transform: translateX(8px);
    box-shadow: -4px 0 20px rgba(59, 130, 246, 0.3);
}

.victory-stat:hover::before {
    transform: scaleY(1);
}

.victory-stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.victory-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-footer {
    text-align: center;
}

/* ============================================
   CONFETTI ANIMATION
   ============================================ */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 2000;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .game-header {
        padding: 0.4rem 0.6rem;
        gap: 0.4rem;
    }
    
    .game-header h1 {
        font-size: 1rem;
    }
    
    .stat-item {
        padding: 0.4rem 0.7rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .stat-value {
        font-size: 0.95rem;
    }
    
    .btn-reset {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .game-board {
        gap: 0.4rem;
        padding: 0.5rem;
        border-radius: 16px;
        width: 96vw;
        height: calc(96vw * 0.75);
        max-height: calc(100vh - 65px);
    }
    
    /* Use dynamic viewport height if supported */
    @supports (height: 100dvh) {
        .game-board {
            max-height: calc(100dvh - 65px);
            height: min(calc(96vw * 0.75), calc(100dvh - 65px));
        }
    }
    
    .card-icon {
        font-size: clamp(1.5rem, 6vw, 3rem);
    }
}

@media (max-width: 480px) {
    .game-header {
        padding: 0.35rem 0.5rem;
    }
    
    .game-header h1 {
        font-size: 0.9rem;
    }
    
    .stat-item {
        padding: 0.35rem 0.6rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    .stat-value {
        font-size: 0.85rem;
    }
    
    .btn-reset {
        padding: 0.45rem 0.9rem;
        font-size: 0.75rem;
    }
    
    .game-board {
        gap: 0.35rem;
        padding: 0.4rem;
        max-height: calc(100vh - 60px);
        animation: boardEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
        perspective: 1000px;
    }
    
    @supports (height: 100dvh) {
        .game-board {
            max-height: calc(100dvh - 60px);
        }
    }
    
    /* Reduce intensive effects on small screens for performance */
    .card:hover:not(.flipped):not(.matched) {
        transform: translateY(-4px) scale(1.02);
        filter: brightness(1.15) drop-shadow(0 6px 15px rgba(59, 130, 246, 0.4));
    }
    
    .card-pattern::before {
        animation: none;
    }
    
    .stat-item::before {
        animation: none;
    }
    
    .btn-reset {
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .btn-text {
        display: none;
    }
    
    .card-icon {
        font-size: clamp(1.25rem, 5vw, 2rem);
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.card:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 4px;
}

.btn-reset:focus-visible,
.btn-play-again:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 4px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .card-inner {
        transition: none;
    }
}