:root {
    --bg-base: #030611;
    --surface-glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.12);
    --dock-bg: rgba(10, 15, 28, 0.58);
    --dock-blur: blur(48px) saturate(220%);
    --menu-glass: rgba(9, 14, 28, 0.88);
    --axis-blue: #0ea5e9;
    --axis-cyan: #06b6d4;
    --axis-emerald: #10b981;
    --axis-mint: #34d399;
    --axis-amber: #f59e0b;
    --axis-rose: #f43f5e;
}
* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; background: #000; color: #fff; height: 100vh; width: 100vw; overflow: hidden; position: relative; }
body.rtl { direction: rtl; text-align: right; }

/* ЖИВЫЕ ПЛАВАЮЩИЕ ОРБЫ АВРОРЫ НА ФОНЕ */
.aurora-ambient-canvas {
    position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden;
}
.aurora-sphere {
    position: absolute; border-radius: 50%; filter: blur(65px); opacity: 0.55;
    animation: driftFloating 16s infinite alternate ease-in-out;
}
.sphere-emerald {
    width: 340px; height: 340px; background: radial-gradient(circle, #10b981, transparent 70%);
    top: -50px; left: -60px;
}
.sphere-cyan {
    width: 380px; height: 380px; background: radial-gradient(circle, #06b6d4, transparent 70%);
    top: 30%; right: -80px; animation-duration: 22s; animation-delay: -4s;
}
.sphere-indigo {
    width: 320px; height: 320px; background: radial-gradient(circle, #6366f1, transparent 70%);
    bottom: 40px; left: 10%; animation-duration: 18s; animation-delay: -8s;
}
@keyframes driftFloating {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(35px, -45px) scale(1.15); }
    100% { transform: translate(-30px, 30px) scale(0.95); }
}

/* ПЛЕЕР */
.reel-player-container { position: absolute; inset: 0; background: #000; overflow: hidden; transform: translate3d(0,0,0); z-index: 5; }
video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; transition: filter 0.3s ease; }
video.fx-boost { filter: contrast(1.18) saturate(1.28); }
.touch-action-plane { position: absolute; inset: 0; z-index: 5; cursor: pointer; }
.center-playback-indicator { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.6); width: 74px; height: 74px; border-radius: 50%; background: rgba(10, 16, 28, 0.65); backdrop-filter: blur(24px); border: 1.5px solid rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; z-index: 15; transition: all 0.22s ease; }
.center-playback-indicator.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* АНИМАЦИИ */
.floating-heart-tap { position: absolute; pointer-events: none; z-index: 18; transform: translate(-50%, -50%) scale(0); animation: heartPop 0.75s forwards; }
@keyframes heartPop { 0% { transform: translate(-50%, -50%) scale(0); opacity: 0; } 45% { transform: translate(-50%, -50%) scale(1.35); opacity: 1; } 100% { transform: translate(-50%, -90px) scale(0.9); opacity: 0; } }

.flying-coin-burst { position: fixed; z-index: 9999; pointer-events: none; display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 900; color: #fbbf24; text-shadow: 0 0 18px rgba(245, 158, 11, 0.95); transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.65s ease; transform: scale(1.4); }
.like-pop { animation: likePopAnim 0.45s ease forwards !important; }
@keyframes likePopAnim { 0% { transform: scale(1); } 40% { transform: scale(1.42) rotate(-12deg); } 80% { transform: scale(0.92) rotate(4deg); } 100% { transform: scale(1) rotate(0); } }

.star-spin { animation: starSpinAnim 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important; }
@keyframes starSpinAnim { 0% { transform: scale(1) rotate(0); } 50% { transform: scale(1.5) rotate(180deg); filter: drop-shadow(0 0 16px #f59e0b); } 100% { transform: scale(1) rotate(360deg); } }

.shake-locked { animation: shakeLockedAnim 0.35s ease !important; }
@keyframes shakeLockedAnim { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* МОДАЛЬНОЕ ОКНО ЗАВЕРШЕНИЯ ВИДЕО */
.video-complete-modal {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.85);
    width: 88%; max-width: 340px; background: rgba(10, 16, 32, 0.72);
    border: 1.5px solid rgba(52, 211, 153, 0.5); border-radius: 34px;
    padding: 28px 22px; text-align: center; z-index: 60;
    backdrop-filter: blur(48px) saturate(220%); -webkit-backdrop-filter: blur(48px) saturate(220%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.28);
    display: none; opacity: 0; transition: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.video-complete-modal.show { display: block; opacity: 1; transform: translate(-50%, -50%) scale(1); }
.reward-badge-glow {
    width: 76px; height: 76px; border-radius: 50%;
    background: radial-gradient(circle, #34d399, #059669);
    margin: 0 auto 14px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 35px rgba(52, 211, 153, 0.65); border: 2px solid rgba(255, 255, 255, 0.45);
    animation: pulseGlow 2s infinite alternate;
}
@keyframes pulseGlow { 0% { transform: scale(1); box-shadow: 0 0 25px rgba(52, 211, 153, 0.5); } 100% { transform: scale(1.06); box-shadow: 0 0 45px rgba(52, 211, 153, 0.9); } }

/* HUD */
.hud-header { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; z-index: 20; pointer-events: none; }
.liquid-progress-capsule { background: rgba(10, 16, 28, 0.45); border: 1px solid var(--border-glass); backdrop-filter: blur(28px); border-radius: 30px; height: 38px; min-width: 130px; position: relative; overflow: hidden; display: flex; align-items: center; padding: 0 12px 0 3px; gap: 8px; box-shadow: 0 8px 30px rgba(0,0,0,0.45); }
.liquid-fill-track { position: absolute; top: 0; bottom: 0; left: 0; width: 0%; background: linear-gradient(90deg, rgba(16, 185, 129, 0.75), rgba(6, 182, 212, 0.95)); transition: width 0.15s linear; z-index: 1; }
.liquid-badge-fixed { background: linear-gradient(135deg, var(--axis-mint), var(--axis-emerald)); color: #042f1a; font-weight: 900; font-size: 11px; height: 32px; padding: 0 10px; border-radius: 20px; display: flex; align-items: center; gap: 4px; position: relative; z-index: 2; box-shadow: 0 2px 12px rgba(16, 185, 129, 0.5); }
.liquid-pct-label { font-size: 12px; font-weight: 800; color: #fff; position: relative; z-index: 2; font-variant-numeric: tabular-nums; }
.hud-stats-group { display: flex; gap: 8px; align-items: center; }
.chip-glass { background: rgba(10, 16, 28, 0.45); border: 1px solid var(--border-glass); backdrop-filter: blur(28px); border-radius: 24px; padding: 7px 14px; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: #fff; box-shadow: 0 4px 20px rgba(0,0,0,0.35); transition: transform 0.2s ease; }

/* БОКОВЫЕ КНОПКИ */
.hud-side-column { position: absolute; right: 14px; bottom: 105px; display: flex; flex-direction: column; gap: 14px; align-items: center; z-index: 25; }
body.rtl .hud-side-column { right: auto; left: 14px; }
.action-node { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; color: #f1f5f9; cursor: pointer; transition: transform 0.12s ease; }
.action-node:active { transform: scale(0.88); }
.action-circle-glass { width: 48px; height: 48px; border-radius: 50%; background: rgba(15, 23, 42, 0.45); border: 1px solid rgba(255, 255, 255, 0.2); backdrop-filter: blur(26px); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 25px rgba(0,0,0,0.4); transition: all 0.2s ease; }
.action-circle-glass svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; transition: all 0.2s ease; }

.action-circle-glass.active-liked {
    border-color: #f43f5e !important;
    background: rgba(244, 63, 94, 0.38) !important;
    box-shadow: 0 0 28px rgba(244, 63, 94, 0.9) !important;
}
.action-circle-glass.active-liked svg {
    fill: #f43f5e !important;
    stroke: #f43f5e !important;
    filter: drop-shadow(0 0 8px #f43f5e);
}

.action-circle-glass.active-gold {
    border-color: var(--axis-amber) !important;
    background: rgba(245, 158, 11, 0.35) !important;
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.6) !important;
}
.action-circle-glass.active-gold svg {
    fill: #f59e0b !important;
    stroke: #f59e0b !important;
}

.sound-wave-bars { display: flex; align-items: flex-end; gap: 2.5px; height: 16px; }
.sound-bar { width: 3px; background: var(--axis-mint); border-radius: 2px; animation: waveBounce 0.8s infinite ease-in-out alternate; }
.sound-bar:nth-child(1) { height: 7px; }
.sound-bar:nth-child(2) { height: 16px; animation-delay: 0.2s; }
.sound-bar:nth-child(3) { height: 10px; animation-delay: 0.4s; }
@keyframes waveBounce { 0% { height: 4px; } 100% { height: 16px; } }

.hud-bottom-overlay { position: absolute; left: 16px; bottom: 100px; z-index: 20; max-width: 76%; pointer-events: none; }
body.rtl .hud-bottom-overlay { left: auto; right: 16px; }
.author-badge-card { display: inline-flex; align-items: center; gap: 8px; background: rgba(10, 16, 28, 0.55); border: 1px solid var(--border-glass); backdrop-filter: blur(24px); padding: 5px 12px; border-radius: 14px; margin-bottom: 8px; font-size: 13px; font-weight: 800; }
.counter-badge-glass { display: inline-flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255,255,255,0.18); padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 800; color: #38bdf8; }

/* ТАЧБАР */
.ios-floating-dock { position: fixed; bottom: 18px; left: 24px; right: 24px; height: 66px; max-width: 350px; margin: 0 auto; background: var(--dock-bg); border: 1px solid var(--border-glass); backdrop-filter: var(--dock-blur); -webkit-backdrop-filter: var(--dock-blur); border-radius: 40px; display: flex; justify-content: space-between; align-items: center; padding: 0 16px; z-index: 100; box-shadow: 0 16px 45px rgba(0,0,0,0.7); }
.dock-pill-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; font-weight: 800; color: #94a3b8; cursor: pointer; padding: 8px 18px; border-radius: 28px; transition: all 0.2s ease; }
.dock-pill-btn.active { color: #fff; background: rgba(255,255,255,0.14); }
.dock-pill-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.dock-feed-jewel { width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #34d399, #10b981 60%, #059669 100%); border: 1.5px solid rgba(255,255,255,0.5); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 25px rgba(16, 185, 129, 0.65); cursor: pointer; transition: transform 0.15s ease; }
.dock-feed-jewel:active { transform: scale(0.9); }
.dock-feed-jewel svg { width: 22px; height: 22px; fill: #fff; margin-left: 2px; }

/* КАРДИНАЛЬНО ПРОЗРАЧНЫЕ ПОДЛОЖКИ С ВКЛАДКАМИ */
.subview-pane { 
    position: absolute; inset: 0; bottom: 95px; 
    background: transparent;
    overflow-y: auto; padding: 22px 18px 40px; display: none; z-index: 10; 
    -webkit-overflow-scrolling: touch; 
}
.subview-pane.active { display: block; }

.ios-card { 
    background: var(--surface-glass); 
    border: 1px solid var(--border-glass); 
    border-radius: 28px; 
    padding: 20px; 
    margin-bottom: 16px; 
    backdrop-filter: blur(32px) saturate(200%); 
    -webkit-backdrop-filter: blur(32px) saturate(200%); 
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14); 
}
.primary-btn { background: linear-gradient(135deg, var(--axis-mint), var(--axis-emerald)); color: #042f1a; font-weight: 900; font-size: 14px; padding: 15px; border-radius: 18px; border: none; width: 100%; cursor: pointer; box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45); transition: all 0.15s ease; }
.primary-btn:active { transform: scale(0.97); }
.dark-field { width: 100%; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--border-glass); color: #fff; padding: 13px 16px; border-radius: 16px; font-size: 14px; outline: none; margin-top: 6px; font-family: inherit; }

.apple-wallet-card { background: linear-gradient(135deg, rgba(24, 34, 53, 0.6) 0%, rgba(13, 20, 36, 0.65) 50%, rgba(6, 78, 59, 0.5) 100%); border: 1px solid rgba(255,255,255,0.22); border-radius: 28px; padding: 22px; margin-bottom: 16px; position: relative; overflow: hidden; backdrop-filter: blur(34px); box-shadow: 0 18px 50px rgba(0,0,0,0.55); }
.wallet-card-chip { width: 40px; height: 30px; border-radius: 7px; background: linear-gradient(135deg, #f59e0b, #d97706); margin-bottom: 16px; border: 1px solid rgba(255,255,255,0.25); }
.platform-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 8px 0 14px; }
.platform-pill { background: rgba(255,255,255,0.06); border: 1px solid var(--border-glass); border-radius: 16px; padding: 11px 6px; text-align: center; font-size: 11px; font-weight: 800; color: #94a3b8; cursor: pointer; }
.platform-pill.selected { background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(6, 182, 212, 0.38)); border-color: var(--axis-mint); color: #fff; }
.preset-row { display: flex; gap: 8px; margin: 8px 0 12px; }
.preset-pill { flex: 1; padding: 9px 0; background: rgba(255,255,255,0.06); border: 1px solid var(--border-glass); border-radius: 12px; font-size: 11px; font-weight: 800; color: #38bdf8; text-align: center; cursor: pointer; }

/* ШТОРКА МЕНЮ */
.menu-sheet-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); z-index: 200; display: none; align-items: flex-end; justify-content: center; }
.menu-sheet-card { width: 100%; max-width: 440px; background: var(--menu-glass); border-top: 1.5px solid rgba(255, 255, 255, 0.25); border-radius: 36px 36px 0 0; padding: 16px 20px 36px; backdrop-filter: blur(48px) saturate(220%); -webkit-backdrop-filter: blur(48px) saturate(220%); box-shadow: 0 -15px 45px rgba(0,0,0,0.7); animation: springSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes springSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-drag-handle { width: 40px; height: 5px; background: rgba(255,255,255,0.3); border-radius: 10px; margin: 0 auto 16px; }
.sheet-header-title { font-size: 15px; font-weight: 800; color: #fff; text-align: center; margin-bottom: 16px; letter-spacing: 0.3px; }
.sheet-menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 10px; }
.sheet-menu-item { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 20px; padding: 13px 14px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: all 0.15s ease; }
.sheet-menu-item:active { transform: scale(0.96); background: rgba(255,255,255,0.1); }
.sheet-menu-wide { margin-bottom: 14px; }
.sheet-item-icon { width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sheet-item-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.sheet-item-title { font-size: 13px; font-weight: 800; color: #fff; line-height: 1.2; }
.sheet-item-sub { font-size: 11px; color: #94a3b8; font-weight: 600; margin-top: 2px; }
.sheet-close-btn { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); box-shadow: none; color: #cbd5e1; font-weight: 700; padding: 13px; border-radius: 18px; }

/* ПЬЕДЕСТАЛ */
.podium-box { display: flex; justify-content: center; align-items: flex-end; gap: 12px; margin: 16px 0 22px; }
.podium-seat { display: flex; flex-direction: column; align-items: center; background: rgba(255,255,255,0.04); border: 1px solid var(--border-glass); border-radius: 24px; padding: 14px 10px; width: 30%; }
.podium-avatar { width: 48px; height: 48px; border-radius: 50%; margin-bottom: 6px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 900; }
.leader-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--border-glass); border-radius: 16px; margin-bottom: 8px; }
.leader-avatar-circle { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #1e293b, #334155); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }

/* ПЕРЕКЛЮЧАТЕЛИ НАСТРОЕК */
.ios-toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.ios-toggle-row:last-child { border-bottom: none; }
.ios-switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.ios-switch input { opacity: 0; width: 0; height: 0; }
.ios-slider { position: absolute; cursor: pointer; inset: 0; background-color: rgba(255,255,255,0.18); transition: .25s; border-radius: 26px; }
.ios-slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .25s; border-radius: 50%; }
input:checked + .ios-slider { background-color: var(--axis-mint); }
input:checked + .ios-slider:before { transform: translateX(20px); }

.limit-screen-overlay { position: absolute; inset: 0; z-index: 50; background: rgba(4, 7, 17, 0.95); backdrop-filter: blur(36px); display: none; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.limit-countdown-clock { font-size: 40px; font-weight: 900; letter-spacing: 2px; color: #38bdf8; margin: 14px 0 20px; }
.agro-recommend-card { background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(6, 182, 212, 0.18)); border: 1.5px solid rgba(52, 211, 153, 0.45); border-radius: 26px; padding: 18px; margin-top: 10px; width: 100%; max-width: 340px; }

/* СТИЛИ КАРТОЧЕК ЗАДАНИЙ */
.task-card {
    background: rgba(14, 22, 38, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 26px;
    padding: 18px;
    margin-bottom: 14px;
    backdrop-filter: blur(34px) saturate(210%);
    -webkit-backdrop-filter: blur(34px) saturate(210%);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.16);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, max-height 0.45s ease, margin 0.4s ease, padding 0.4s ease;
    max-height: 250px;
}
.task-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.6), transparent);
}
.task-card.task-removing {
    opacity: 0 !important;
    transform: scale(0.92) translateY(-16px) !important;
    max-height: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-color: transparent !important;
}
.task-icon-box {
    width: 44px; height: 44px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.task-reward-pill {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(52, 211, 153, 0.6);
    color: #34d399;
    font-weight: 900;
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
}

/* ЭКРАН "ВСЕ ЗАДАНИЯ ВЫПОЛНЕНЫ" */
.tasks-empty-state {
    display: none;
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    backdrop-filter: blur(24px);
    margin-top: 10px;
}
.tasks-empty-badge {
    width: 70px; height: 70px; border-radius: 50%;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.25), rgba(16, 185, 129, 0.08));
    border: 1.5px solid rgba(52, 211, 153, 0.4);
    margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 30px rgba(52, 211, 153, 0.3);
}
