/* learn.css */
* { box-sizing: border-box; }

body {
    background: linear-gradient(160deg, #f0f4ff 0%, #faf0ff 100%);
    min-height: 100vh;
}

/* ---- Daraja tugmalari ---- */
.level-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 24px 16px 0;
    flex-wrap: wrap;
}

.level-btn {
    padding: 9px 22px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid #667eea;
    color: #667eea;
    background: white;
    transition: all 0.2s;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(102,126,234,0.1);
}
.level-btn:hover { background: #667eea; color: white; text-decoration: none; box-shadow: 0 4px 14px rgba(102,126,234,0.3); }
.level-btn.active { background: #667eea; color: white; box-shadow: 0 4px 14px rgba(102,126,234,0.3); }
.level-btn.c1-btn { border-color: #e74c3c; color: #e74c3c; box-shadow: 0 2px 8px rgba(231,76,60,0.1); }
.level-btn.c1-btn:hover, .level-btn.c1-btn.active { background: #e74c3c; color: white; border-color: #e74c3c; box-shadow: 0 4px 14px rgba(231,76,60,0.3); }
.level-btn.dict-btn { border-color: #0891b2; color: #0891b2; }
.level-btn.dict-btn:hover { background: #0891b2; color: white; }

/* ---- Session skor ---- */
.session-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 680px;
    margin: 14px auto 0;
    padding: 0 20px;
}
.session-track {
    flex: 1; height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.session-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #10b981);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}
.session-score {
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
    background: white;
    padding: 4px 12px;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.score-correct { color: #10b981; }
.score-sep { color: #cbd5e1; margin: 0 3px; }
.score-wrong { color: #ef4444; }

/* ---- Asosiy karta ---- */
.learn-container {
    max-width: 680px;
    margin: 16px auto 60px;
    padding: 0 16px;
}

.question-card {
    background: white;
    border-radius: 28px;
    box-shadow: 0 16px 56px rgba(102,126,234,0.14), 0 4px 16px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* ---- So'z header ---- */
.question-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 32px 36px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}
.question-header::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 160px; height: 160px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}
.question-header::after {
    content: '';
    position: absolute;
    bottom: -30px; left: -30px;
    width: 120px; height: 120px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.language-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.18);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.3);
    letter-spacing: 0.06em;
    position: relative;
    z-index: 1;
}

.question-word {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 14px;
    text-shadow: 0 3px 14px rgba(0,0,0,0.2);
    line-height: 1.1;
    animation: wordIn 0.3s ease;
    position: relative;
    z-index: 1;
}

@keyframes wordIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.question-example {
    font-size: 1rem;
    opacity: 0.88;
    font-style: italic;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* ---- Javoblar ---- */
.options-section { padding: 28px 24px 28px; }

.options-header { text-align: center; margin-bottom: 20px; }
.options-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}

#options-container { display: flex; flex-direction: column; gap: 11px; }

.option-btn {
    width: 100%;
    padding: 17px 20px;
    border: 2px solid #eef0f8;
    background: #fafbff;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}
.option-btn:hover:not(:disabled) {
    border-color: #667eea;
    background: #f0f2ff;
    transform: translateX(6px);
    box-shadow: 0 4px 18px rgba(102,126,234,0.16);
}
.option-btn:disabled { cursor: not-allowed; }

.option-btn.correct {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: transparent !important;
    color: white !important;
    transform: none !important;
    box-shadow: 0 6px 20px rgba(16,185,129,0.4) !important;
    animation: popIn 0.3s ease;
}
.option-btn.incorrect {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border-color: transparent !important;
    color: white !important;
    transform: none !important;
    animation: shake 0.35s ease;
}
.option-icon { font-size: 1.2rem; flex-shrink: 0; opacity: 0.7; }
.option-btn.correct .option-icon,
.option-btn.incorrect .option-icon { opacity: 1; }

@keyframes popIn {
    0%   { transform: scale(0.97); }
    60%  { transform: scale(1.02); }
    100% { transform: scale(1); }
}
@keyframes shake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-8px); }
    75%      { transform: translateX(8px); }
}

/* ---- Mobil ---- */
@media (max-width: 600px) {
    .question-header { padding: 30px 20px 26px; }
    .question-word { font-size: 2.4rem; }
    .options-section { padding: 20px 16px 20px; }
    .option-btn { font-size: 0.93rem; padding: 14px 16px; border-radius: 14px; }
    .level-selector { gap: 8px; padding-top: 16px; }
    .level-btn { padding: 7px 16px; font-size: 0.8rem; }
}

/* ---- Sign Language harf tugmalari ---- */
.option-letter {
    justify-content: center;
    font-size: 1.6rem !important;
    font-weight: 900 !important;
    letter-spacing: 1px;
    min-height: 64px;
    border-radius: 16px !important;
}
.option-letter .option-icon { display: none; }

/* ═══════════════════════════════════════
   SIGN LANGUAGE ANIMATED CARD
═══════════════════════════════════════ */
.sign-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 1.6rem 1rem 1.4rem;
    text-align: center;
    animation: signFlipIn 0.45s cubic-bezier(.22,1,.36,1);
}
@keyframes signFlipIn {
    0%   { transform: perspective(700px) rotateY(-70deg) scale(.9); opacity:0; }
    100% { transform: perspective(700px) rotateY(0deg)   scale(1);  opacity:1; }
}

/* Animated glow background */
.sign-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(139,92,246,.35) 0%, transparent 70%);
    animation: signGlow 2.8s ease-in-out infinite alternate;
    pointer-events: none;
    border-radius: inherit;
}
@keyframes signGlow {
    0%   { opacity:.6; transform: scale(1); }
    100% { opacity:1;  transform: scale(1.15); }
}

/* SVG hand diagram */
.sign-visual {
    position: relative;
    display: inline-block;
    margin-bottom: .5rem;
}
.sign-img {
    width: 130px;
    height: 150px;
    margin: 0 auto;
    display: block;
    animation: signFloat 2.4s ease-in-out infinite;
    filter: drop-shadow(0 8px 22px rgba(139,92,246,.55));
}
.sign-img svg {
    width: 100%;
    height: 100%;
}
@keyframes signFloat {
    0%,100% { transform: translateY(0)     scale(1); }
    50%      { transform: translateY(-14px) scale(1.07); }
}

/* Movement arrow */
.sign-arrow {
    position: absolute;
    font-size: 1.8rem;
    font-weight: 900;
    opacity: .85;
}
.sign-arrow.up-right  { top:-4px;  right:-20px; animation: arrowUpRight 1.2s ease-in-out infinite; }
.sign-arrow.horiz     { top:50%;   right:-22px; transform:translateY(-50%); animation: arrowHoriz 1.1s ease-in-out infinite; }
.sign-arrow.up        { top:-8px;  left:50%;    transform:translateX(-50%); animation: arrowUp 1.1s ease-in-out infinite; }
.sign-arrow.hook      { bottom:-4px; right:-20px; animation: arrowHook 1.4s ease-in-out infinite; }
.sign-arrow.wave      { top:0; right:-22px; animation: arrowWave 1s ease-in-out infinite; }
.sign-arrow.down      { bottom:-8px; left:50%; transform:translateX(-50%); animation: arrowDown 1.1s ease-in-out infinite; }

@keyframes arrowUpRight {
    0%,100% { transform:translate(0,0);     opacity:.5; }
    50%      { transform:translate(7px,-7px); opacity:1; }
}
@keyframes arrowHoriz {
    0%,100% { transform:translateY(-50%) translateX(-4px); opacity:.5; }
    50%      { transform:translateY(-50%) translateX( 5px); opacity:1; }
}
@keyframes arrowUp {
    0%,100% { transform:translateX(-50%) translateY(0);    opacity:.5; }
    50%      { transform:translateX(-50%) translateY(-7px); opacity:1; }
}
@keyframes arrowHook {
    0%,100% { transform:translate(0,0) rotate(0deg);    opacity:.5; }
    50%      { transform:translate(4px,3px) rotate(-15deg); opacity:1; }
}
@keyframes arrowWave {
    0%,100% { transform:rotate(-15deg); opacity:.6; }
    50%      { transform:rotate(15deg);  opacity:1; }
}
@keyframes arrowDown {
    0%,100% { transform:translateX(-50%) translateY(0);   opacity:.5; }
    50%      { transform:translateX(-50%) translateY(6px); opacity:1; }
}

/* Text */
.sign-desc {
    font-size: .92rem;
    font-weight: 700;
    color: #f3f0ff;
    line-height: 1.6;
    padding: 0 .4rem;
    margin-top: .2rem;
    text-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.sign-hint {
    font-size: .78rem;
    color: rgba(255,255,255,.6);
    margin-top: .4rem;
    font-style: italic;
}
.sign-badge {
    display: inline-block;
    background: rgba(255,255,255,.18);
    border: 1.5px solid rgba(255,255,255,.3);
    border-radius: 20px;
    padding: .2rem .8rem;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #fff;
    margin-bottom: .6rem;
}

/* Shimmer sweep */
.sign-card::after {
    content:'';
    position:absolute;
    inset:0;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.08) 50%, transparent 65%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    border-radius: inherit;
    pointer-events: none;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
