* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent;
}

html, body { 
    height: 100%; 
    margin: 0;
    padding: 0;
}

/* General styles */
body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
}

.app-title {
    margin: 0;
}

.title-link {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.title-link:hover {
    opacity: 0.9;
}

/* Toolbar */
.toolbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Buttons */
.nav-btn, .practice-btn {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.2);
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Light theme */
body.light-theme {
    background: #f1f5f9;
    color: #0f172a;
}

body.light-theme .toolbar {
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid #e2e8f0;
}

body.light-theme .app-title {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-theme .nav-btn, 
body.light-theme .practice-btn {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.app { 
    display: flex; 
    flex-direction: column; 
    height: 100vh;
    height: 100dvh; 
    position: relative;
    min-height: 0; /* Prevent flex item overflow */
}

.app::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 16px);
    padding: clamp(12px, 3vw, 16px) clamp(16px, 4vw, 24px);
    background: rgba(20, 24, 42, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

body.light-theme .toolbar {
    background: rgba(248, 250, 252, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.app-title {
    font-size: clamp(18px, 4vw, 28px);
    font-weight: 700;
    color: #fff;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

body.light-theme .app-title {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Navigation Section */
.nav-section {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 24px);
    flex-wrap: wrap;
}

.nav-btn, .practice-btn {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    color: white;
    text-decoration: none;
    padding: clamp(8px, 2vw, 12px) clamp(12px, 2.5vw, 16px);
    border-radius: 8px;
    font-size: clamp(12px, 2.5vw, 14px);
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-btn:hover, .practice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
}

body.light-theme .nav-btn, 
body.light-theme .practice-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(99, 102, 241, 0.9));
    border: 1px solid rgba(59, 130, 246, 0.2);
}

body.light-theme .nav-btn:hover, 
body.light-theme .practice-btn:hover {
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 16px);
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

body.light-theme .icon-btn {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #1e293b;
}

body.light-theme .icon-btn:hover {
    background: rgba(0, 0, 0, 0.15);
}

.btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #e6e8ef;
    padding: clamp(10px, 2.5vw, 12px) clamp(16px, 4vw, 20px);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    font-size: clamp(12px, 2.5vw, 14px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 44px; /* Touch-friendly minimum */
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover { 
    background: rgba(255, 255, 255, 0.1); 
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn:active { 
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn.primary { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn.primary:hover { 
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.spacer { flex: 1; }

.score { 
    font-size: clamp(14px, 3vw, 18px);
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
}

body.light-theme .score {
    color: #1e293b;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

.canvas-wrap {
    position: relative;
    flex: 1;
    display: grid;
    overflow: hidden;
    min-height: 0; /* Prevent flex item overflow */
    width: 100%;
    place-items: center; /* Ensure canvas is perfectly centered */
    contain: strict; /* Improve performance and prevent layout shifts */
    background: radial-gradient(1200px 600px at 50% 0%, rgba(99, 102, 241, 0.06), transparent 40%),
	            radial-gradient(1200px 600px at 50% 100%, rgba(59, 130, 246, 0.05), transparent 40%);
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}

#canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: 
        radial-gradient(circle at 30% 70%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(118, 75, 162, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #0a0e1a 0%, #1a1f3a 100%);
    cursor: crosshair;
    transition: all 0.3s ease;
    touch-action: none; /* Prevent scrolling while drawing */
}

body.light-theme #canvas {
    background: 
        radial-gradient(circle at 30% 70%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Cursor styles */
#canvas.cursor-crosshair { cursor: crosshair; }
#canvas.cursor-pencil { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><path d="M2 2l7.586 7.586"/><circle cx="11" cy="11" r="2"/></svg>') 2 22, auto; }
#canvas.cursor-pen { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/></svg>') 2 22, auto; }
#canvas.cursor-brush { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="2"><path d="M9.06 11.9l8.07-8.06a2.85 2.85 0 1 1 4.03 4.03l-8.06 8.08"/><path d="M7.07 14.94c-1.66 0-3 1.35-3 3.02 0 1.33-2.5 1.52-2 2.02 1.08 1.1 2.49 2.02 4 2.02 2.2 0 4-1.8 4-4.04a3.01 3.01 0 0 0-3-3.02z"/></svg>') 2 22, auto; }

/* Light theme cursor styles */
body.light-theme #canvas.cursor-pencil { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23000000" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/><path d="M2 2l7.586 7.586"/><circle cx="11" cy="11" r="2"/></svg>') 2 22, auto; }
body.light-theme #canvas.cursor-pen { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23000000" stroke-width="2"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/></svg>') 2 22, auto; }
body.light-theme #canvas.cursor-brush { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23000000" stroke-width="2"><path d="M9.06 11.9l8.07-8.06a2.85 2.85 0 1 1 4.03 4.03l-8.06 8.08"/><path d="M7.07 14.94c-1.66 0-3 1.35-3 3.02 0 1.33-2.5 1.52-2 2.02 1.08 1.1 2.49 2.02 4 2.02 2.2 0 4-1.8 4-4.04a3.01 3.01 0 0 0-3-3.02z"/></svg>') 2 22, auto; }

#canvas:hover {
    background: 
        radial-gradient(circle at 30% 70%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(118, 75, 162, 0.12) 0%, transparent 50%),
        linear-gradient(135deg, #0a0e1a 0%, #1a1f3a 100%);
}

/* Canvas loading shimmer on first paint */
#canvas[data-loading="true"] {
	background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04)),
		linear-gradient(135deg, #0a0e1a 0%, #1a1f3a 100%);
	background-size: 200% 100%, cover;
	animation: shimmer 1.2s ease-in-out infinite;
}

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Microinteraction for tiles */
.difficulty-btn:active { transform: translateY(-1px) scale(0.99); }

.center-dot {
    position: fixed;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    box-shadow: 
        0 0 0 4px rgba(255, 215, 0, 0.2),
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 40px rgba(255, 215, 0, 0.3);
    pointer-events: none;
    animation: pulse 2s ease-in-out infinite;
    z-index: 10;
    will-change: transform;
    backface-visibility: hidden;
    /* Positioning will be handled by JavaScript */
}

@keyframes pulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 
            0 0 0 4px rgba(255, 215, 0, 0.2),
            0 0 20px rgba(255, 215, 0, 0.6),
            0 0 40px rgba(255, 215, 0, 0.3);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 
            0 0 0 6px rgba(255, 215, 0, 0.3),
            0 0 25px rgba(255, 215, 0, 0.8),
            0 0 50px rgba(255, 215, 0, 0.4);
    }
}

.hint {
    position: absolute;
    left: 50%;
    top: clamp(16px, 3vw, 20px);
    transform: translateX(-50%);
    font-size: clamp(12px, 2.5vw, 15px);
    font-weight: 500;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: clamp(8px, 2vw, 12px) clamp(12px, 3vw, 20px);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 0.6s ease-out;
    max-width: 90vw;
    text-align: center;
    box-sizing: border-box;
}

body.light-theme .hint {
    color: #1e293b;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.score.animate {
    animation: scoreUpdate 0.6s ease-out;
    color: #ffd700 !important;
}

@keyframes scoreUpdate {
    0% {
        transform: scale(1);
        color: #fff;
    }
    50% {
        transform: scale(1.2);
        color: #ffd700;
    }
    100% {
        transform: scale(1);
        color: #ffd700;
    }
}

.drawing-trail {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(88, 213, 255, 0.8) 0%, transparent 70%);
    animation: trailFade 0.8s ease-out forwards;
}

@keyframes trailFade {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(2);
    }
}

/* Score display modal */
.score-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    animation: modalFadeIn 0.4s ease-out forwards;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.score-content {
    background: linear-gradient(135deg, rgba(20, 24, 42, 0.95) 0%, rgba(26, 31, 58, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: clamp(16px, 3vw, 24px);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: min(500px, 90vw);
    width: 100%;
    max-height: min(600px, 85vh);
    animation: scoreSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2vh, 20px);
}

body.light-theme .score-content {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.score-title {
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 700;
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: scoreGlow 2s ease-in-out infinite alternate;
    line-height: 1.2;
    margin: 0;
}

.score-percentage {
    font-size: clamp(32px, 8vw, 56px);
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    animation: scorePulse 1.5s ease-in-out infinite;
    line-height: 1;
    margin: 0;
}

body.light-theme .score-percentage {
    color: #1e293b;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

.score-message {
    font-size: clamp(14px, 2.5vw, 18px);
    color: #ffd700;
    font-weight: 600;
    margin: 0;
}



/* Share Section */
.share-section {
    margin-top: clamp(24px, 5vw, 32px);
    padding-top: clamp(20px, 4vw, 24px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.share-title {
    color: #667eea;
    font-weight: 600;
    font-size: clamp(14px, 3vw, 16px);
    margin-bottom: clamp(12px, 2.5vw, 16px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(8px, 2vw, 12px);
}

.share-btn {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    border: none;
    padding: clamp(8px, 2vw, 12px) clamp(12px, 2.5vw, 16px);
    border-radius: 8px;
    color: white;
    font-size: clamp(12px, 2.5vw, 14px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
}

.share-btn:active {
    transform: translateY(0);
}

.share-btn.twitter:hover {
    background: linear-gradient(135deg, #1DA1F2, #0d8bd9);
}

.share-btn.facebook:hover {
    background: linear-gradient(135deg, #4267B2, #365899);
}

.share-btn.whatsapp:hover {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.share-btn.copy:hover {
    background: linear-gradient(135deg, #6B7280, #4B5563);
}

.share-icon {
    font-size: clamp(14px, 3vw, 16px);
}

/* Light theme styles for share section */
body.light-theme .share-section {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .share-title {
    color: #3b82f6;
}

body.light-theme .share-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(99, 102, 241, 0.9));
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: white;
}

body.light-theme .share-btn:hover {
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* Info Panel */
.info-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-panel:not([hidden]) {
    opacity: 1;
    visibility: visible;
}

.info-content {
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.95), rgba(49, 46, 129, 0.95));
    border-radius: 16px;
    padding: 0;
    max-width: min(90vw, 600px);
    max-height: min(85vh, 700px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    animation: modalSlideIn 0.3s ease-out;
}

.info-header {
    padding: clamp(16px, 4vw, 24px) clamp(20px, 4vw, 28px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
}

.info-header h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(18px, 4vw, 22px);
    font-weight: 600;
}

.close-info {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(20px, 4vw, 24px);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    min-height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-info:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.info-body {
    padding: clamp(20px, 4vw, 28px);
    overflow-y: auto;
    max-height: calc(85vh - 80px);
}

.intro-text {
    color: #e2e8f0;
    font-size: clamp(14px, 3vw, 16px);
    line-height: 1.6;
    margin: 0 0 clamp(20px, 4vw, 24px) 0;
    text-align: center;
}

.scoring-components {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 3vw, 20px);
    margin-bottom: clamp(24px, 5vw, 32px);
}

.component {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: clamp(16px, 3vw, 20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.component:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.component-header {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
    margin-bottom: clamp(8px, 2vw, 12px);
}

.component-icon {
    font-size: clamp(18px, 4vw, 20px);
}

.component-title {
    color: #fff;
    font-weight: 600;
    font-size: clamp(16px, 3vw, 18px);
    flex: 1;
}

.component-weight {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: clamp(12px, 2.5vw, 14px);
    font-weight: 600;
}

.component-desc {
    color: #cbd5e1;
    font-size: clamp(13px, 2.5vw, 14px);
    line-height: 1.5;
    margin: 0 0 clamp(8px, 2vw, 10px) 0;
}

.tip {
    background: rgba(102, 126, 234, 0.2);
    border-left: 3px solid #667eea;
    padding: clamp(8px, 2vw, 10px) clamp(12px, 2.5vw, 14px);
    border-radius: 6px;
    font-size: clamp(12px, 2vw, 13px);
    color: #e2e8f0;
    line-height: 1.4;
}

.scoring-formula {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: clamp(16px, 3vw, 20px);
    margin-bottom: clamp(24px, 5vw, 32px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.scoring-formula h4 {
    color: #fff;
    font-size: clamp(16px, 3vw, 18px);
    margin: 0 0 clamp(12px, 2.5vw, 16px) 0;
    font-weight: 600;
}

.formula-box {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: clamp(12px, 2.5vw, 16px);
    margin-bottom: clamp(10px, 2vw, 12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.formula-box code {
    color: #fbbf24;
    font-size: clamp(11px, 2vw, 13px);
    line-height: 1.4;
    word-break: break-word;
}

.formula-note {
    color: #94a3b8;
    font-size: clamp(12px, 2vw, 13px);
    margin: 0;
    line-height: 1.4;
}

.score-ranges {
    margin-bottom: clamp(24px, 5vw, 32px);
}

.score-ranges h4 {
    color: #fff;
    font-size: clamp(16px, 3vw, 18px);
    margin: 0 0 clamp(12px, 2.5vw, 16px) 0;
    font-weight: 600;
}

.ranges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: clamp(10px, 2vw, 12px);
}

.range-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: clamp(12px, 2.5vw, 16px);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.range-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.range-item.excellent { border-left: 3px solid #ffd700; }
.range-item.great { border-left: 3px solid #10b981; }
.range-item.good { border-left: 3px solid #3b82f6; }
.range-item.fair { border-left: 3px solid #8b5cf6; }

.range-emoji {
    font-size: clamp(20px, 4vw, 24px);
    display: block;
    margin-bottom: 4px;
}

.range-text {
    color: #fff;
    font-weight: 600;
    font-size: clamp(14px, 3vw, 16px);
    display: block;
    margin-bottom: 2px;
}

.range-label {
    color: #94a3b8;
    font-size: clamp(11px, 2vw, 12px);
    display: block;
}

.pro-tips h4 {
    color: #fff;
    font-size: clamp(16px, 3vw, 18px);
    margin: 0 0 clamp(12px, 2.5vw, 16px) 0;
    font-weight: 600;
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-list li {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid #10b981;
    padding: clamp(10px, 2vw, 12px) clamp(14px, 3vw, 16px);
    margin-bottom: clamp(8px, 2vw, 10px);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: clamp(13px, 2.5vw, 14px);
    line-height: 1.5;
    position: relative;
}

.tips-list li::before {
    content: "→";
    color: #10b981;
    font-weight: bold;
    margin-right: 8px;
}

/* Light theme overrides for info panel */
body.light-theme .info-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .info-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.02);
}

body.light-theme .info-header h3 {
    color: #1e293b;
}

body.light-theme .close-info {
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .close-info:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

body.light-theme .intro-text {
    color: #475569;
}

body.light-theme .component {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .component:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme .component-title {
    color: #1e293b;
}

body.light-theme .component-desc {
    color: #64748b;
}

body.light-theme .tip {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #3b82f6;
    color: #475569;
}

body.light-theme .scoring-formula {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-theme .scoring-formula h4,
body.light-theme .score-ranges h4,
body.light-theme .pro-tips h4 {
    color: #1e293b;
}

body.light-theme .formula-box {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .formula-box code {
    color: #dc2626;
}

body.light-theme .formula-note {
    color: #64748b;
}

body.light-theme .range-item {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .range-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme .range-text {
    color: #1e293b;
}

body.light-theme .range-label {
    color: #64748b;
}

body.light-theme .tips-list li {
    background: rgba(16, 185, 129, 0.1);
    color: #475569;
}

.close-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: clamp(10px, 2vw, 14px) clamp(16px, 3vw, 24px);
    border-radius: 12px;
    font-size: clamp(13px, 2vw, 15px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px; /* Touch-friendly minimum */
    margin: 0;
    align-self: center;
}

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

.close-button:active {
    transform: translateY(0);
}

.start-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(16px, 3vw, 20px);
    padding: clamp(12px, 2.5vw, 16px) clamp(24px, 4vw, 32px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 100;
    opacity: 1;
    visibility: visible;
    font-weight: 600;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.start-button[hidden] {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Keep Start button stable on hover/active (no movement) */
.start-button:hover {
	transform: translate(-50%, -50%) !important;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
.start-button:active {
	transform: translate(-50%, -50%) !important;
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure content behind panel gets proper transition */
.app {
    transition: filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* When settings panel is visible */
.settings-panel:not([hidden]) ~ .app {
    filter: blur(2px) brightness(0.7);
    pointer-events: none;
}

.settings-panel:not([hidden]) {
    opacity: 1;
    visibility: visible;
}

.settings-content {
    background: linear-gradient(135deg, rgba(20, 24, 42, 0.95) 0%, rgba(26, 31, 58, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body.light-theme .settings-content {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.settings-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

body.light-theme .settings-header h3 {
    color: #1e293b;
}

.close-settings {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.close-settings:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.light-theme .close-settings {
    color: #1e293b;
}

body.light-theme .close-settings:hover {
    background: rgba(0, 0, 0, 0.1);
}

.setting-group {
    margin-bottom: 20px;
}

.setting-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
}

body.light-theme .setting-label {
    color: #1e293b;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-slider.theme-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Clearer theme toggle emoji swap */
.toggle-slider.theme-slider::after { content: '🌙'; }
input:checked + .toggle-slider.theme-slider::after { content: '☀️'; }

.cursor-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cursor-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    text-align: left;
}

.cursor-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cursor-option.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

body.light-theme .cursor-option {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

body.light-theme .cursor-option:hover {
    background: rgba(0, 0, 0, 0.1);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scoreSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes scoreGlow {
    from { text-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    to { text-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.3); }
}

@keyframes scorePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Perfect circle celebration effect */
.celebration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    font-size: clamp(18px, 4vw, 24px);
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: celebrate 2s ease-out forwards;
    z-index: 100;
    white-space: nowrap;
}

@keyframes celebrate {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Media queries for specific screen sizes and orientations */
@media (max-width: 768px) {
    .toolbar {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .btn {
        font-size: 12px;
        padding: 10px 16px;
    }
    
    .score {
        font-size: 14px;
    }
    
    .hint {
        font-size: 12px;
        padding: 8px 12px;
        max-width: 85vw;
    }
}

@media (max-width: 480px) {
    .toolbar {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .btn {
        font-size: 11px;
        padding: 8px 12px;
        min-height: 40px;
    }
    
    .score {
        font-size: 12px;
    }
    
    .hint {
        font-size: 11px;
        padding: 6px 10px;
        top: 12px;
    }
    
    .score-content {
        padding: 20px;
        border-radius: 12px;
    }
    
    .score-title {
        font-size: 24px;
    }
    
    .score-percentage {
        font-size: 48px;
    }
    

}

@media (max-height: 600px) {
    .toolbar {
        padding: 8px 16px;
    }
    
    .hint {
        top: 8px;
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .score-content {
        max-height: 85vh;
        padding: 16px;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .hint {
        display: none; /* Hide hint in very short landscape screens */
    }
    
    .toolbar {
        padding: 6px 16px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .center-dot {
        width: 10px;
        height: 10px;
    }
}

/* SEO content wrapper and sections */
.seo-content {
	padding: clamp(24px, 5vw, 48px) clamp(16px, 6vw, 48px);
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	gap: clamp(20px, 4vw, 28px);
	line-height: 1.7;
}

.seo-content section {
	background: linear-gradient(135deg, rgba(20, 24, 42, 0.6) 0%, rgba(26, 31, 58, 0.6) 100%);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 16px;
	padding: clamp(16px, 3vw, 24px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.seo-content h2 {
	margin: 0 0 clamp(12px, 2.5vw, 16px) 0;
	font-size: clamp(18px, 4vw, 26px);
	font-weight: 700;
	background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.seo-content h3 {
	margin: clamp(12px, 2.5vw, 16px) 0 clamp(6px, 1.5vw, 10px) 0;
	font-size: clamp(16px, 3.5vw, 20px);
	font-weight: 600;
	color: #e2e8f0;
}

.seo-content p {
	margin: 0 0 clamp(10px, 2vw, 14px) 0;
	color: #cbd5e1;
	font-size: clamp(14px, 3vw, 16px);
}

.seo-content ol,
.seo-content ul {
	margin: 0;
	padding-left: clamp(16px, 4vw, 28px);
}

.seo-content li {
	margin: 0 0 clamp(6px, 2vw, 10px) 0;
	color: #dbeafe;
	font-size: clamp(13px, 2.5vw, 15px);
}

.seo-content a {
	color: #93c5fd;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.seo-content a:hover {
	color: #bfdbfe;
}

/* Footer */
.seo-footer {
	margin-top: clamp(16px, 4vw, 24px);
	padding: clamp(20px, 4vw, 28px) clamp(16px, 6vw, 48px);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.seo-footer .footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	gap: clamp(12px, 3vw, 16px);
}

.seo-footer nav {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(10px, 2.5vw, 16px);
}

.seo-footer a {
	color: #c7d2fe;
	text-decoration: none;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	padding: 8px 12px;
	border-radius: 8px;
	font-size: clamp(12px, 2.5vw, 14px);
	transition: all 0.2s ease;
}

.seo-footer a:hover {
	background: rgba(255, 255, 255, 0.12);
	transform: translateY(-1px);
}

.seo-footer .fineprint {
	color: #94a3b8;
	font-size: clamp(12px, 2.5vw, 13px);
	margin: 0;
}

/* Light theme overrides */
body.light-theme .seo-content section {
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

body.light-theme .seo-content h3 {
	color: #1e293b;
}

body.light-theme .seo-content p {
	color: #475569;
}

body.light-theme .seo-content li {
	color: #1f2937;
}

body.light-theme .seo-content a {
	color: #2563eb;
}

body.light-theme .seo-footer {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.95) 100%);
}

body.light-theme .seo-footer a {
	background: rgba(0, 0, 0, 0.04);
	border: 1px solid rgba(0, 0, 0, 0.08);
	color: #1e293b;
}

body.light-theme .seo-footer a:hover {
	background: rgba(0, 0, 0, 0.08);
}

body.light-theme .seo-footer .fineprint {
	color: #64748b;
}

/* Toolbar positioning (non-sticky) */
.toolbar {
	position: static;
	top: auto;
	z-index: auto;
}

/* Safe-area top padding (kept for visual comfort on devices with notches) */
@supports (padding: max(0px)) {
	.toolbar {
		padding-top: calc(clamp(12px, 3vw, 16px) + env(safe-area-inset-top));
	}
}

/* Compact toolbar on very small phones */
@media (max-width: 480px) {
	.toolbar {
		padding-top: clamp(10px, 3vw, 14px);
		padding-bottom: clamp(8px, 2.5vw, 12px);
	}
}

/* Robust toolbar layout for small screens */
.nav-section {
	min-width: 0; /* allow flex children to shrink */
	flex: 1 1 auto;
}

.app-title {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: block;
}

.toolbar-controls {
	flex-shrink: 0; /* prevent buttons from shrinking */
}

@media (max-width: 480px) {
	/* Give a bit more room to the title on tiny phones */
	.toolbar-controls { gap: 8px; }
}

/* Professional polish layer: tokens, motion, focus, and refined visuals */
:root {
  --brand-1: #4f46e5; /* indigo-600 */
  --brand-2: #7c3aed; /* violet-600 */
  --brand-3: #2563eb; /* blue-600 */
  --bg-deep: #0f172a; /* slate-900 */
  --bg-soft: #1e293b; /* slate-800 */
  --text-primary: #e2e8f0; /* slate-200 */
  --text-secondary: #cbd5e1; /* slate-300 */
  --ring: #93c5fd; /* blue-300 */
  --surface: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 14px 36px rgba(0, 0, 0, 0.3);
}

body.light-theme {
  --bg-deep: #f8fafc;
  --bg-soft: #eef2f7;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --surface: rgba(0, 0, 0, 0.03);
  --border: rgba(0, 0, 0, 0.08);
  --ring: #3b82f6;
}

html { scroll-behavior: smooth; }

/* Typographic smoothing for a cleaner look */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Unified focus style for accessibility */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg-deep), 0 0 0 4px var(--ring);
  border-radius: var(--radius-md);
}

/* Subtle, classy overrides (kept after originals so they take effect) */
.toolbar {
  background: linear-gradient(180deg, rgba(20,24,42,0.85) 0%, rgba(26,31,58,0.85) 100%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

body.light-theme .toolbar {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.nav-btn, .practice-btn, .btn.primary, .start-button {
  background: linear-gradient(135deg, var(--brand-3), var(--brand-2));
  border: 0;
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.25);
}

.nav-btn:hover, .practice-btn:hover, .btn.primary:hover, .start-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.icon-btn {
  background: var(--surface);
  border: 1px solid var(--border);
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
body.light-theme .icon-btn:hover { background: rgba(0, 0, 0, 0.08); }

/* Cards & panels */
.info-content, .score-content, .seo-content section, .range-item, .difficulty-btn {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* Footer refinement */
.seo-footer { border-top: 1px solid var(--border); }
.seo-footer a { backdrop-filter: blur(6px); }

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}


