/* Zigzag Runner - Styles */

/* Skip to main content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary, #4a90d9);
    color: #fff;
    padding: 8px 16px;
    z-index: 10000;
    font-size: 14px;
    border-radius: 0 0 4px 0;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}
:root {
    --primary: #ff6348;
    --primary-dark: #e55039;
    --bg: #0f0c29;
    --surface: rgba(255,255,255,0.06);
    --surface-hover: rgba(255,255,255,0.12);
    --text: #f0f0f0;
    --text-dim: rgba(255,255,255,0.5);
    --coin: #ffd700;
    --radius: 16px;
}

/* Light mode overrides */
[data-theme="light"] {
    --bg: #f0eff5;
    --surface: rgba(255, 99, 72, 0.06);
    --surface-hover: rgba(255, 99, 72, 0.12);
    --text: #1a1428;
    --text-dim: rgba(26, 20, 40, 0.5);
}
[data-theme="light"] body {
    background: var(--bg);
    color: var(--text);
}
[data-theme="light"] .app-loader {
    background: var(--bg);
}
[data-theme="light"] #screen-main,
[data-theme="light"] #screen-theme,
[data-theme="light"] #screen-skin,
[data-theme="light"] #screen-stats {
    background: var(--bg);
}
[data-theme="light"] .hud-item {
    background: rgba(255, 99, 72, 0.06);
    border-color: rgba(255, 99, 72, 0.12);
    color: var(--text);
}
[data-theme="light"] .stage-info {
    background: rgba(255, 99, 72, 0.06);
    border-color: rgba(255, 99, 72, 0.12);
}
[data-theme="light"] .item-card {
    background: rgba(255, 99, 72, 0.05);
    border-color: rgba(255, 99, 72, 0.12);
    box-shadow: 0 2px 8px rgba(255, 99, 72, 0.05);
}
[data-theme="light"] .item-card.selected {
    border-color: var(--primary);
    background: rgba(255, 99, 72, 0.1);
}
[data-theme="light"] .stat-row {
    background: rgba(255, 99, 72, 0.04);
    border-color: rgba(255, 99, 72, 0.08);
}
[data-theme="light"] .btn-secondary {
    background: rgba(255, 99, 72, 0.08);
    border-color: rgba(255, 99, 72, 0.2);
    color: var(--text);
}
[data-theme="light"] #screen-gameover {
    background: rgba(240, 239, 245, 0.95);
}
[data-theme="light"] .rec-card {
    background: rgba(255, 99, 72, 0.05);
    border-color: rgba(255, 99, 72, 0.12);
}
[data-theme="light"] .rec-name {
    color: var(--text);
}
[data-theme="light"] .rec-desc {
    color: var(--text-dim);
}
[data-theme="light"] .home-link {
    color: var(--primary);
}
[data-theme="light"] .lang-btn {
    background: rgba(255, 99, 72, 0.08);
    color: var(--text);
    border-color: rgba(255, 99, 72, 0.18);
}
[data-theme="light"] .lang-menu {
    background: rgba(240, 239, 245, 0.95);
    border-color: rgba(255, 99, 72, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .lang-option {
    color: #5a4a60;
}
[data-theme="light"] .lang-option:hover {
    background: rgba(255, 99, 72, 0.1);
    color: var(--text);
}
[data-theme="light"] .lang-option.active {
    background: rgba(255, 99, 72, 0.15);
    color: var(--text);
}
[data-theme="light"] .loader-spinner {
    border-color: rgba(255, 99, 72, 0.12);
    border-top-color: var(--primary);
}
/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 12px;
    right: 96px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}
.theme-toggle:hover { transform: scale(1.1); }
.theme-toggle:active { transform: scale(0.95); }
[data-theme="light"] .theme-toggle {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
    color: var(--text);
}
/* Light mode: rec-card text and hover */
[data-theme="light"] .rec-card {
    color: var(--text);
}
[data-theme="light"] .rec-card:hover,
[data-theme="light"] .rec-card:active {
    background: rgba(255, 99, 72, 0.1);
}
[data-theme="light"] .rec-title {
    color: var(--text-dim);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* 터치 최적화 */
button, a, input, [role="button"], [role="link"] {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

input[type="text"], textarea {
    -webkit-user-select: text;
    user-select: text;
}

/* App Loader */
.app-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.app-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.loader-emoji {
    font-size: 48px;
    animation: loader-bounce 1s ease-in-out infinite;
}
.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: loader-spin 0.8s linear infinite;
}
.loader-text {
    font-size: 14px;
    color: var(--text-dim);
    letter-spacing: 1px;
    font-weight: 500;
}
@keyframes loader-spin {
    to { transform: rotate(360deg); }
}
@keyframes loader-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    height: 100dvh;
    width: 100vw;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

/* Layout */
.app-container {
    width: 100%;
    height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Ad areas */
.ad-banner {
    width: 100%;
    height: 50px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-dim);
    flex-shrink: 0;
}

/* Canvas */
.game-canvas-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

/* HUD */
#hud {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 16px;
    pointer-events: none;
    z-index: 10;
    flex-wrap: wrap;
    gap: 12px;
}

.hud-top {
    width: 100%;
    display: flex;
    justify-content: center;
}

.stage-info {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 20px;
    min-width: 140px;
}

.stage-text {
    font-size: 14px;
    font-weight: 700;
    color: #ffd700;
    text-align: center;
    margin-bottom: 4px;
}

.stage-progress-bar {
    width: 100px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.stage-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6348, #ffd700);
    width: 0%;
    transition: width 0.3s ease;
}

.hud-item {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
}

.hud-coins { color: var(--coin); }

#tapHint {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 16px;
    color: var(--text-dim);
    animation: pulse 1.5s infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Screens */
.screen {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    z-index: 20;
}

.screen.active { display: flex; }

/* Main Screen */
#screen-main {
    justify-content: center;
    align-items: center;
    gap: 20px;
    background: linear-gradient(180deg, #0f0c29 0%, #1a1a3e 100%);
    padding: 40px 24px;
}

.main-icon {
    font-size: 72px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.main-title {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--primary), #ffa502);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#mainBest {
    font-size: 14px;
    color: var(--text-dim);
}

#mainTitle {
    font-size: 18px;
    color: var(--coin);
    margin-bottom: 10px;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 260px;
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 18px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.home-link:hover { color: rgba(255,255,255,0.7); }
.home-link svg { flex-shrink: 0; }

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:active { transform: scale(0.96); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #ff7f50);
    color: white;
    font-size: 18px;
    padding: 16px;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-row {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 260px;
}

.btn-row .btn { flex: 1; }

/* Theme / Skin / Stats screens */
#screen-theme, #screen-skin, #screen-stats {
    background: linear-gradient(180deg, #0f0c29 0%, #1a1a3e 100%);
    padding: 24px;
}

.screen-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.screen-header h2 { font-size: 22px; }

.btn-icon {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex: 1;
    padding-bottom: 20px;
}

.item-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    border: 2px solid transparent;
}

.item-card:hover { background: var(--surface-hover); }
.item-card.active { border-color: var(--primary); background: rgba(255,99,72,0.15); }
.item-card.locked { opacity: 0.4; cursor: default; }

.item-emoji { font-size: 28px; flex-shrink: 0; }
.item-name { font-weight: 600; flex: 1; }
.item-desc { font-size: 12px; color: var(--text-dim); }

/* Stats */
.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--surface);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.stat-row span:first-child { color: var(--text-dim); }
.stat-row span:last-child { font-weight: 700; }

/* Game Over */
#screen-gameover {
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 30;
}

.go-label {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary);
}

#goTitle {
    font-size: 18px;
    color: var(--coin);
}

.go-stats {
    display: flex;
    gap: 24px;
    margin: 8px 0;
}

.go-stat {
    text-align: center;
}

.go-stat-value {
    font-size: 32px;
    font-weight: 900;
}

.go-stat-label {
    font-size: 12px;
    color: var(--text-dim);
}

#goBest {
    font-size: 14px;
    color: var(--text-dim);
}

.go-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 260px;
    margin-top: 8px;
}

.btn-revive {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e;
}

.btn-share {
    background: linear-gradient(135deg, #1da1f2, #0077b5);
    color: white;
}

.go-row {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 260px;
}

.go-row .btn { flex: 1; }

/* Ad overlay */
.ad-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 100;
}

.ad-overlay p { color: var(--text-dim); font-size: 14px; }

.ad-countdown {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
}

/* Responsive */
@media (max-width: 360px) {
    .main-title { font-size: 26px; }
    .btn { padding: 12px 20px; font-size: 14px; }
    .go-stat-value { font-size: 26px; }
}

/* Reduced motion */
/* === RECOMMENDATIONS === */
.recommendations-section { margin: 24px 16px 0; }
.rec-title { font-size: 15px; font-weight: 700; color: rgba(255,255,255,0.5); margin-bottom: 12px; text-align: center; letter-spacing: 0.5px; }
.rec-grid { display: flex; flex-direction: column; gap: 10px; }
.rec-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; text-decoration: none; color: #fff; transition: all 0.3s ease; }
.rec-card:hover, .rec-card:active { background: rgba(255,255,255,0.1); border-color: var(--primary); transform: translateY(-1px); }
.rec-icon { font-size: 28px; flex-shrink: 0; width: 40px; text-align: center; }
.rec-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rec-name { font-size: 14px; font-weight: 600; }
.rec-desc { font-size: 12px; color: rgba(255,255,255,0.5); }

/* === LANGUAGE SELECTOR === */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.lang-btn {
    background: rgba(139,92,246,0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(139,92,246,0.4);
    color: #fff;
    font-size: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn:hover {
    background: rgba(139,92,246,0.5);
    transform: scale(1.05);
}

.lang-menu {
    position: absolute;
    top: 52px;
    right: 0;
    background: rgba(8,5,20,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139,92,246,0.3);
    border-radius: 12px;
    padding: 8px;
    min-width: 150px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.lang-menu.hidden {
    display: none;
}

.lang-option {
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    color: #e0d8f8;
    transition: background 0.2s;
}

.lang-option:hover {
    background: rgba(139,92,246,0.2);
}

.lang-option.active {
    background: rgba(139,92,246,0.3);
    font-weight: 600;
}

/* === DOPAMINE ENHANCEMENT EFFECTS === */

/* Screen Shake */
@keyframes screenShake {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-2px, -2px); }
    40% { transform: translate(2px, -2px); }
    60% { transform: translate(-2px, 2px); }
    80% { transform: translate(2px, 2px); }
}

.game-canvas-wrap.shake {
    animation: screenShake 0.3s ease-in-out;
}

/* Screen Flash */
@keyframes screenFlash {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgba(255, 255, 255, 0.15); }
}

.game-canvas-wrap.flash {
    animation: screenFlash 0.2s ease-in-out;
}

.game-canvas-wrap.flash-success {
    animation: screenFlash 0.2s ease-in-out;
}

.game-canvas-wrap.flash-danger {
    animation: screenFlash 0.2s ease-in-out;
}

/* Floating Coin Popup */
@keyframes coinFloating {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(1.2);
    }
}

.coin-popup {
    position: absolute;
    font-weight: 900;
    font-size: 28px;
    pointer-events: none;
    z-index: 100;
    animation: coinFloating 0.8s ease-out forwards;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    color: var(--coin);
}

/* Combo Indicator */
.combo-indicator {
    position: absolute;
    pointer-events: none;
    z-index: 100;
    text-align: center;
}

.combo-text {
    font-size: 48px;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(255, 99, 72, 0.8);
    animation: comboPulse 0.6s ease-out forwards;
}

@keyframes comboPulse {
    0% {
        opacity: 0;
        transform: scale(0.5) rotateZ(0deg);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(2) rotateZ(360deg);
    }
}

/* Confetti Particles */
@keyframes confetti-fall {
    to { transform: translateY(100vh) rotateZ(720deg); }
}

.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    pointer-events: none;
    z-index: 100;
}

.confetti.type-1 { background: linear-gradient(135deg, #ff6348, #ff4757); }
.confetti.type-2 { background: linear-gradient(135deg, #ffd700, #ffed4e); }
.confetti.type-3 { background: linear-gradient(135deg, #ff8c42, #ffb347); }

/* === In-game Toast Notifications (non-blocking, compact top bar) === */
@keyframes toastSlideIn {
    0% { opacity: 0; transform: translateX(-50%) translateY(-16px) scale(0.9); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes toastSlideOut {
    0% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-16px) scale(0.9); }
}

.milestone-banner {
    position: fixed;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary) 0%, #ff8c42 100%);
    color: white;
    padding: 4px 14px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    pointer-events: none;
    z-index: 150;
    opacity: 0.85;
    box-shadow: 0 2px 8px rgba(255, 99, 72, 0.3);
    animation: toastSlideIn 0.2s ease-out, toastSlideOut 0.2s ease-in 0.6s forwards;
    display: flex;
    align-items: center;
    gap: 4px;
}

.milestone-banner .icon {
    font-size: 13px;
    display: inline;
    margin-bottom: 0;
}

/* Stage Banner - compact top toast, never blocks gameplay */
.stage-banner {
    position: fixed;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 16px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    pointer-events: none;
    z-index: 150;
    opacity: 0.85;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    animation: toastSlideIn 0.2s ease-out, toastSlideOut 0.2s ease-in 0.6s forwards;
}

/* Boss Warning Banner - compact top toast, never blocks gameplay */
.boss-warning-banner {
    position: fixed;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #d32f2f 0%, #ff6f00 100%);
    color: white;
    padding: 4px 14px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    pointer-events: none;
    z-index: 150;
    opacity: 0.85;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.4);
    border: 1px solid #ff1744;
    animation: toastSlideIn 0.2s ease-out, toastSlideOut 0.2s ease-in 0.6s forwards;
    display: flex;
    align-items: center;
    gap: 4px;
}

.boss-warning-banner .icon {
    font-size: 13px;
    animation: none;
}

.boss-warning-banner .tier {
    font-size: 10px;
    opacity: 0.9;
}

/* Boss Defeated Banner - compact top toast, never blocks gameplay */
.boss-defeated-banner {
    position: fixed;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #1a1a2e;
    padding: 4px 14px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    pointer-events: none;
    z-index: 150;
    opacity: 0.85;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    border: 1px solid #ffed4e;
    animation: toastSlideIn 0.2s ease-out, toastSlideOut 0.2s ease-in 0.8s forwards;
    display: flex;
    align-items: center;
    gap: 4px;
}

.boss-defeated-banner .icon {
    font-size: 13px;
}

.boss-defeated-banner .count {
    font-size: 10px;
    opacity: 0.9;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* === Accessibility Improvements === */
button:focus-visible,a:focus-visible,input:focus-visible,[role="button"]:focus-visible{outline:3px solid #667eea;outline-offset:2px;}
button,a[href],input[type="button"],input[type="submit"],[role="button"]{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;}
.skip-link{position:absolute;top:-40px;left:0;background:#667eea;color:white;padding:8px;text-decoration:none;z-index:100;}
.skip-link:focus{top:0;}
[role="dialog"]{z-index:1000;}
/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark, var(--bg-primary, var(--background, #0f0f23)));
}

::-webkit-scrollbar-thumb {
    background: #2196f3;
    border-radius: 5px;
    border: 2px solid var(--bg-dark, var(--bg-primary, var(--background, #0f0f23)));
}

::-webkit-scrollbar-thumb:hover {
    background: #4dabf5;
    opacity: 0.8;
}

/* Selection Color */
::selection {
    background: #2196f3;
    color: white;
}

::-moz-selection {
    background: #2196f3;
    color: white;
}

@media (prefers-contrast: more){button{border:2px solid #667eea;}}
.rec-card:focus-visible{outline:3px solid #667eea;outline-offset:4px;}
