html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.h-screen-safe {
    height: calc(100dvh - 8.5rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Material Symbols
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    user-select: none;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Body — safe area & scrolling
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
body {
    min-height: 100dvh;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
    position: relative;
    background-color: #0c0806;
    color: #ffffff;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Mode Specific Backgrounds
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
body.mode-learn::before {
    background-image: linear-gradient(180deg, rgba(0, 77, 64, 0.8), rgba(0, 38, 38, 0.95)), var(--app-wallpaper);
    filter: blur(3px);
}

body.mode-test::before {
    background-image: linear-gradient(180deg, rgba(26, 35, 126, 0.8), rgba(13, 17, 72, 0.95)), var(--app-wallpaper);
    filter: blur(3px);
}

body.mode-duel::before {
    background-image: linear-gradient(180deg, rgba(62, 39, 35, 0.8), rgba(33, 16, 12, 0.95)), var(--app-wallpaper);
    filter: blur(3px);
}

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

:root {
    --app-wallpaper: url('assets/background/arkaplan.jpg');
}

body::before {
    content: '';
    position: fixed;
    inset: -10px; /* Slight overflow to hide blurred edges */
    background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7)), var(--app-wallpaper);
    background-size: cover;
    background-position: center;
    opacity: 1;
    transform: scale(1);
    filter: blur(3px);
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.25), transparent 50%);
    opacity: 0.6;
    z-index: -1;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   App Container — prevent overflow flicker
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#app-container {
    overflow-x: hidden;
    background: transparent;
}

h1, h2, h3, .font-headline {
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Screen Panel System — slide transitions
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.screen-panel {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.screen-panel.active {
    display: flex;
    opacity: 1;
    transform: translateX(0);
}

.screen-panel.slide-out-left {
    opacity: 0;
    transform: translateX(-20px);
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   3D Flip Card
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.perspective-1000 {
    perspective: 1000px;
    -webkit-perspective: 1000px;
}

.transform-style-3d {
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-transform: rotateY(0deg) translate3d(0, 0, 0);
    transform: rotateY(0deg) translate3d(0, 0, 0);
}

.rotate-y-180 {
    transform: rotateY(180deg) translate3d(0, 0, 0);
    -webkit-transform: rotateY(180deg) translate3d(0, 0, 0);
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Ambient Shadow
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ambient-shadow {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Glass Card
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Card entrance animation
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-enter {
    animation: cardEnter 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Private room lobby player card entrance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}


/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Micro-Animations (Pulse & Pop)
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes pulse-slow {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

@keyframes animPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.15); box-shadow: 0 0 20px rgba(0, 0, 0, 0.15); }
    100% { transform: scale(1); }
}

.pop-effect {
    animation: animPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Skeleton Loading State
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}

.skeleton-text {
    background: linear-gradient(
        90deg,
        rgba(0,0,0,0.06) 25%,
        rgba(0,0,0,0.12) 50%,
        rgba(0,0,0,0.06) 75%
    );
    background-size: 200% auto;
    animation: shimmer 1.4s linear infinite;
    border-radius: 0.5rem;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Back card scroll fix — long content
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#fc-back {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Bottom nav safe-area (iOS notch)
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
nav {
    padding-bottom: max(1.75rem, env(safe-area-inset-bottom));
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Focus ring for keyboard accessibility
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #005ac1;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Reduced motion — respect user preference
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (prefers-reduced-motion: reduce) {
    .screen-panel,
    .card-enter,
    #flashcard-inner {
        transition: none !important;
        animation: none !important;
    }
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Mode Cards — hover lift
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.mode-card {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease;
}

.mode-card:hover {
    transform: translateY(-3px) scale(1.01);
}

.mode-card:active {
    transform: scale(0.97);
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Category Cards — blurred imagery + press feedback
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cat-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.35s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: #0b1222;
    color: #f8fafc;
    --cat-bg: linear-gradient(135deg, #0f172a, #111827);
    --cat-icon: rgba(255, 255, 255, 0.25);
}

.cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--cat-bg);
    background-size: cover;
    background-position: center;
    transform: scale(1);
    opacity: 1;
    transition: transform 0.5s ease;
    z-index: 0;
}

.cat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: 1;
}

.cat-card > * {
    position: relative;
    z-index: 2;
}

.cat-card .cat-icon {
    background: var(--cat-icon);
}

.cat-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 40px rgba(10, 15, 45, 0.45);
}

.cat-card:focus-visible {
    border-color: #facc15;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.35);
}

.cat-card:active {
    transform: translateY(2px) scale(0.97);
}

.cat-card:active::before {
    transform: scale(1.12) translateY(2px);
}

.cat-card:active::after {
    animation: catTapOverlay 0.45s ease;
}

@keyframes catTapOverlay {
    0% {
        opacity: 0.95;
        transform: scale(1);
    }
    60% {
        opacity: 0.35;
        transform: scale(1.1);
    }
    100% {
        opacity: 0.1;
        transform: scale(1.18);
    }
}

.cat-card--literature {
    --cat-bg: linear-gradient(135deg, #4c1d95, #2e1065);
    --cat-icon: rgba(255, 255, 255, 0.15);
}
.cat-card--flags {
    --cat-bg: linear-gradient(135deg, #991b1b, #450a0a);
    --cat-icon: rgba(255, 255, 255, 0.15);
}
.cat-card--capitals {
    --cat-bg: linear-gradient(135deg, #1e40af, #1e3a8a);
    --cat-icon: rgba(255, 255, 255, 0.15);
}
.cat-card--culture {
    --cat-bg: linear-gradient(135deg, #92400e, #451a03);
    --cat-icon: rgba(255, 255, 255, 0.15);
}
.cat-card--history {
    --cat-bg: linear-gradient(135deg, #5b21b6, #2e1065);
    --cat-icon: rgba(255, 255, 255, 0.15);
}
.cat-card--geography {
    --cat-bg: linear-gradient(135deg, #065f46, #022c22);
    --cat-icon: rgba(255, 255, 255, 0.15);
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Test option button correct/wrong flash
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes correctFlash {
    0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70%  { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes wrongFlash {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    70%  { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Duel timer ring
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#duel-timer-ring {
    transform-origin: center;
    transition: stroke-dashoffset 0.9s linear, stroke 0.3s ease;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Duel option hover
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.duel-option-btn {
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.duel-option-btn:hover:not([disabled]) {
    transform: translateX(4px);
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Results screen — entrance
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes resultEntrance {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(16px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Rank Frames — Profile Avatar Borders
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.avatar-frame {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
}

.frame-sm { border-width: 2px !important; }
.frame-md { border-width: 3px !important; }
.frame-lg { border-width: 4px !important; }

/* Acemi — Mat gri, ince */
.rank-frame-acemi {
    border: 2px solid #9ca3af;
    box-shadow: 0 0 0 0 transparent;
}
.rank-frame-caylak { border: 2px solid #9ca3af; } /* Fallback for naming */

/* Deneyimli — Parlak çelik mavi */
.rank-frame-deneyimli {
    border: 3px solid #60a5fa;
    box-shadow: 0 0 8px 1px rgba(96, 165, 250, 0.45);
}

/* Uzman — Bronz/Altın sarısı */
.rank-frame-uzman {
    border: 4px solid #b45309;
    box-shadow: 0 0 12px 2px rgba(180, 83, 9, 0.40),
                inset 0 0 6px rgba(253, 212, 4, 0.15);
    animation: pulse-slow 3s ease-in-out infinite;
}

/* Usta — Zümrüt yeşili */
@keyframes ustaBreath {
    0%, 100% { box-shadow: 0 0 14px 3px rgba(5, 150, 105, 0.45); border-color: #059669; }
    50% { box-shadow: 0 0 25px 6px rgba(16, 185, 129, 0.6); border-color: #10b981; }
}

.rank-frame-usta {
    border: 4px solid #059669;
    animation: ustaBreath 2s ease-in-out infinite;
}

/* Üstat — Dönen safir/altın ışıltısı */
/* Store / Special Frames — Extraordinary Animations */

/* Diamond: Pürüzsüz prizmatik dönüş */
@keyframes diamondSmooth {
    0% { border-color: #b9f2ff; box-shadow: 0 0 15px rgba(185, 242, 255, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.4); }
    33% { border-color: #e0f2fe; box-shadow: 0 0 25px rgba(255, 255, 255, 0.6), inset 0 0 15px rgba(185, 242, 255, 0.5); }
    66% { border-color: #bae6fd; box-shadow: 0 0 15px rgba(186, 230, 253, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.4); }
    100% { border-color: #b9f2ff; box-shadow: 0 0 15px rgba(185, 242, 255, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.4); }
}

/* Neon: Dinamik tarama ışığı ve derin glow */
@keyframes neonExtraordinary {
    0% { border-color: #00f2ff; box-shadow: 0 0 10px #00f2ff, 0 0 30px rgba(0, 242, 255, 0.3), inset 0 0 10px #00f2ff; filter: hue-rotate(0deg); }
    25% { box-shadow: 0 0 20px #00f2ff, 0 0 50px rgba(0, 242, 255, 0.5), inset 0 0 15px #00f2ff; }
    50% { border-color: #7c3aed; box-shadow: 0 0 15px #7c3aed, 0 0 40px rgba(124, 58, 237, 0.4), inset 0 0 12px #7c3aed; filter: hue-rotate(180deg); }
    75% { box-shadow: 0 0 20px #00f2ff, 0 0 50px rgba(0, 242, 255, 0.5), inset 0 0 15px #00f2ff; }
    100% { border-color: #00f2ff; box-shadow: 0 0 10px #00f2ff, 0 0 30px rgba(0, 242, 255, 0.3), inset 0 0 10px #00f2ff; filter: hue-rotate(360deg); }
}

/* Fire: Akışkan alev efekti */
@keyframes fireLiquid {
    0%, 100% { 
        border-color: #ff4d00; 
        box-shadow: 0 0 15px #ff4d00, 0 -5px 25px #ffae00, 5px 0 20px #ff4d00, -5px 0 20px #ffae00;
        transform: scale(1) rotate(0deg);
    }
    33% { 
        border-color: #ff9d00; 
        box-shadow: 0 0 25px #ff9d00, 0 -10px 35px #ff4d00, -5px -2px 25px #ff9d00, 5px 2px 25px #ff4d00;
        transform: scale(1.03) rotate(1deg);
    }
    66% { 
        border-color: #ff0000; 
        box-shadow: 0 0 20px #ff0000, 0 -8px 40px #ff9d00, 5px -2px 30px #ff4d00, -5px 2px 30px #ff9d00;
        transform: scale(0.98) rotate(-1deg);
    }
}

.frame-bronze { border: 3px solid #cd7f32; box-shadow: 0 0 10px rgba(205, 127, 50, 0.4); }
.frame-silver { border: 3px solid #c0c0c0; box-shadow: 0 0 10px rgba(192, 192, 192, 0.4); }
.frame-gold { 
    border: 3px solid #ffd700; 
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); 
    animation: pulse-slow 2s ease-in-out infinite;
}

.frame-diamond { 
    border: 3px solid #b9f2ff; 
    animation: diamondSmooth 4s infinite ease-in-out; 
}

.frame-neon { 
    border: 3px solid #00f2ff; 
    animation: neonExtraordinary 3s infinite linear; 
    border-style: double; /* Daha kompleks bir görünüm için */
}

.frame-fire { 
    border: 3px solid #ff4d00; 
    animation: fireLiquid 2s infinite ease-in-out; 
    filter: drop-shadow(0 0 10px rgba(255, 77, 0, 0.5));
}

.rank-frame-ustat {
    border: 4px solid #fdd404;
    animation: ustatLegendary 4s linear infinite;
    background: linear-gradient(135deg, rgba(253, 212, 4, 0.1), transparent);
}


/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Rank Badge (isim yanı)
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.rank-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 9999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.rank-badge-acemi     { background: #f3f4f6; color: #6b7280; }
.rank-badge-deneyimli { background: #eff6ff; color: #1d4ed8; }
.rank-badge-uzman     { background: #fffbeb; color: #92400e; }
.rank-badge-usta      { background: #ecfdf5; color: #065f46; }
.rank-badge-ustat     { background: linear-gradient(135deg,#fef9c3,#fde68a); color: #78350f; }

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Level-Up Modal entrance
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes levelUpEntrance {
    0%   { opacity: 0; transform: scale(0.8) translateY(24px); }
    70%  { transform: scale(1.04) translateY(-4px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

#modal-levelup .levelup-card {
    animation: levelUpEntrance 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Coin display pulse */
@keyframes coinPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.coin-pulse {
    animation: coinPulse 0.6s ease-in-out 2;
}

/* ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
   Flashcard Swipe & Animation
¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ */
#flashcard-container {
    touch-action: none; /* Prevents browser scroll during swipe */
    user-select: none;
}

#flashcard-inner {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
}

#flashcard-inner.dragging {
    transition: transform 0.1s ease-out, opacity 0.1s ease-out; /* Smooth follow while dragging */
}

/* When returning to center */
#flashcard-inner.resetting {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translate(0, 0) rotate(0) !important;
}

/* When flying out */
#flashcard-inner.flying-left {
    transition: transform 0.5s ease-in, opacity 0.5s ease-in;
    transform: translate(-150%, 0) rotate(-20deg) !important;
    opacity: 0;
}

#flashcard-inner.flying-right {
    transition: transform 0.5s ease-in, opacity 0.5s ease-in;
    transform: translate(150%, 0) rotate(20deg) !important;
    opacity: 0;
}

#swipe-indicator-left, #swipe-indicator-right {
    transition: opacity 0.2s ease, transform 0.2s ease;
    will-change: opacity, transform;
}



header {
    padding-top: env(safe-area-inset-top);
    height: calc(4rem + env(safe-area-inset-top)) !important;
}

.header-zone-left, .header-zone-right {
    top: calc(env(safe-area-inset-top) + 2rem) !important;
    transform: translateY(-50%);
}

#app-container {
    margin-top: calc(4rem + env(safe-area-inset-top)) !important;
}

#screen-main-menu {
    justify-content: center;
    min-height: 70vh;
}

/* ─────────────────────────────────────────────────────────────
   Quest System Styles
───────────────────────────────────────────────────────────── */
.quest-progress-bar {
    height: 10px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #005ac1, #7c3aed);
    border-radius: 99px;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 10px rgba(0, 90, 193, 0.4);
}

.quest-btn-claim {
    background: linear-gradient(135deg, #005ac1, #004494);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 90, 193, 0.3);
    border: none;
}

.quest-btn-claimed {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: default;
    border: 1px solid #e2e8f0;
}

.quest-btn-claim:active:not(:disabled) {
    transform: scale(0.96);
}

.quest-btn-claim:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    box-shadow: none;
    opacity: 0.6;
}

#quests-container::-webkit-scrollbar {
    width: 6px;
}
#quests-container::-webkit-scrollbar-thumb {
    background: rgba(0, 90, 193, 0.2);
    border-radius: 10px;
}


/* ── TikTok Tarzı Öğrenme Masası ── */
#screen-learning-table {
    overflow: hidden;
}

#table-cards-view::-webkit-scrollbar {
    display: none; /* Hide scrollbar for TikTok feel */
}

#table-cards-view {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.tiktok-card {
    position: relative;
}

/* ─────────────────────────────────────────────────────────────
   Premium Range Slider Custom Styles
   ───────────────────────────────────────────────────────────── */
.premium-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12) !important;
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.premium-range-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 12px;
    cursor: pointer;
    border-radius: 999px;
}

.premium-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #005ac1 !important; /* Primary Brand Blue */
    cursor: pointer;
    border: 3px solid #ffffff !important;
    box-shadow: 0 0 12px rgba(0, 90, 193, 0.8);
    margin-top: -6px; /* Center thumb vertically */
    transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.premium-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 18px rgba(0, 90, 193, 1.0);
}

.premium-range-slider::-webkit-slider-thumb:active {
    transform: scale(0.95);
    background: #004494 !important;
}

/* Firefox Support */
.premium-range-slider::-moz-range-track {
    width: 100%;
    height: 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.premium-range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #005ac1;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 0 12px rgba(0, 90, 193, 0.8);
    transition: all 0.15s ease;
}

