/* ═══════════ RESET ═══════════ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-1: #0a0420;
    --bg-2: #1a0a3a;
    --bg-3: #2d1055;
    --gold: #d4af6a;
    --gold-light: #f4d78b;
    --lavender: #b8a3e0;
    --pink: #e0a3c4;
    --text: #ede6f5;
    --text-dim: #9788b5;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    overscroll-behavior: none;
}

body {
    font-family: 'Manrope', -apple-system, sans-serif;
    background: radial-gradient(circle at 50% 0%, #2d1055 0%, #1a0a3a 45%, #0a0420 100%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    position: relative;
    padding-bottom: 100px;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════ CANVAS ЗВЁЗДЫ ═══════════ */
.stars-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ═══════════ ОСНОВА ═══════════ */
.app {
    position: relative;
    z-index: 1;
    padding: 24px 20px 140px;
    max-width: 480px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 26px;
    animation: fadeDown 0.7s ease-out;
}

.moon {
    font-size: 42px;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 20px rgba(212, 175, 106, 0.7));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -6px, 0); }
}

.greeting {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 600;
    color: var(--gold-light);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.subtitle {
    font-size: 13px;
    color: var(--text-dim);
}

/* ═══════════ STATUS CHIP ═══════════ */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 7px 14px;
    background: rgba(212, 175, 106, 0.08);
    border: 1px solid rgba(212, 175, 106, 0.2);
    border-radius: 20px;
    color: var(--gold-light);
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s, border-color 0.2s;
}

.status-chip:active {
    transform: scale(0.96);
}

.status-chip.premium {
    background: linear-gradient(135deg, rgba(212, 175, 106, 0.2), rgba(224, 163, 196, 0.15));
    border-color: rgba(212, 175, 106, 0.5);
    color: var(--gold-light);
    font-weight: 600;
}

.status-chip.used {
    background: rgba(151, 136, 181, 0.08);
    border-color: rgba(151, 136, 181, 0.25);
    color: var(--text-dim);
}

.status-chip-icon {
    font-size: 13px;
}

.status-chip-text {
    line-height: 1;
}

/* ═══════════ КАРТА ДНЯ ═══════════ */
.day-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
    animation: fadeUp 0.7s ease-out 0.1s backwards;
}

.day-card {
    width: 150px;
    height: 245px;
    perspective: 1200px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: transform 0.3s;
}

.day-card:active {
    transform: scale(0.97);
}

.day-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.day-card.flipped .day-card-inner {
    transform: rotateY(180deg);
}

.day-card-face {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
}

.day-card-back {
    background:
    radial-gradient(circle at 30% 20%, rgba(212, 175, 106, 0.35), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(224, 163, 196, 0.3), transparent 55%),
    linear-gradient(135deg, #2a1255 0%, #1a0a3a 100%);
    border: 2px solid rgba(212, 175, 106, 0.5);
    box-shadow:
    0 0 30px rgba(212, 175, 106, 0.35),
    0 18px 35px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { box-shadow: 0 0 30px rgba(212, 175, 106, 0.35), 0 18px 35px rgba(0, 0, 0, 0.5); }
    50% { box-shadow: 0 0 55px rgba(212, 175, 106, 0.65), 0 18px 35px rgba(0, 0, 0, 0.5); }
}

.day-card-symbol {
    font-size: 56px;
    color: var(--gold-light);
    opacity: 0.75;
    text-shadow: 0 0 25px var(--gold);
}

.day-card-front {
    transform: rotateY(180deg);
    background: #1a0a3a;
    border: 2px solid rgba(212, 175, 106, 0.7);
    box-shadow: 0 0 40px rgba(212, 175, 106, 0.55);
}

.day-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.day-info {
    max-width: 340px;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s 0.5s, transform 0.5s 0.5s;
    margin-bottom: 12px;
}

.day-info.visible {
    opacity: 1;
    transform: translateY(0);
}

.day-info-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 6px;
}

.day-info-text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    font-style: italic;
}

/* ═══════════ КНОПКА ═══════════ */
.btn-primary {
    padding: 14px 28px;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1a0a3a;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(212, 175, 106, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:active {
    transform: scale(0.95);
    box-shadow: 0 4px 16px rgba(212, 175, 106, 0.5);
}

.btn-primary.hidden {
    display: none;
}

/* ═══════════ РАСКЛАДЫ ═══════════ */
.spreads {
    animation: fadeUp 0.7s ease-out 0.2s backwards;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 14px;
    padding-left: 4px;
}

.spreads-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.spread-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 106, 0.15);
    border-radius: 16px;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.2s, background 0.2s;
    font-family: inherit;
}

.spread-card:active {
    transform: scale(0.96);
    border-color: rgba(212, 175, 106, 0.55);
    background: rgba(212, 175, 106, 0.08);
}

.spread-card.locked::after {
    content: '🔒';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 14px;
    opacity: 0.9;
    filter: drop-shadow(0 0 6px rgba(212, 175, 106, 0.5));
}

.spread-icon {
    font-size: 26px;
    margin-bottom: 8px;
}

.spread-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.spread-desc {
    font-size: 11px;
    color: var(--text-dim);
}

/* ═══════════ ЭКРАН РАСКЛАДА ═══════════ */
.spread-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, #2d1055 0%, #1a0a3a 45%, #0a0420 100%);
    z-index: 100;
    padding: 20px;
    padding-bottom: 30px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translate3d(0, 100%, 0);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    visibility: hidden;
}

.spread-screen.open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
}

.back-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 175, 106, 0.25);
    color: var(--gold-light);
    font-size: 20px;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}

.back-btn:active {
    transform: scale(0.92);
}

.spread-header {
    text-align: center;
    margin-top: 45px;
    margin-bottom: 18px;
}

.spread-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 6px;
}

.spread-hint {
    font-size: 13px;
    color: var(--text-dim);
    font-style: italic;
}

.question-block {
    max-width: 400px;
    margin: 0 auto 20px;
    width: 100%;
}

#questionInput {
width: 100%;
padding: 12px 14px;
border-radius: 14px;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(212, 175, 106, 0.15);
color: var(--text);
font-family: 'Manrope', sans-serif;
font-size: 14px;
resize: none;
outline: none;
transition: border-color 0.2s;
line-height: 1.4;
}

#questionInput:focus {
border-color: rgba(212, 175, 106, 0.55);
}

#questionInput::placeholder {
color: var(--text-dim);
}

/* ═══════════ КОЛОДА ═══════════ */
.spread-board {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    position: relative;
}

.deck {
    position: relative;
    width: 120px;
    height: 195px;
    cursor: pointer;
    transition: opacity 0.5s, transform 0.5s;
    will-change: transform, opacity;
}

.deck.hidden {
    opacity: 0;
    transform: scale(0.7);
    pointer-events: none;
}

.deck-shadow {
    position: absolute;
    inset: -12px;
    border-radius: 20px;
    background: radial-gradient(circle, rgba(212, 175, 106, 0.55), transparent 70%);
    filter: blur(15px);
    animation: pulseGlow 2.4s ease-in-out infinite;
    will-change: opacity, transform;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.55; transform: scale(0.92); }
    50% { opacity: 1; transform: scale(1.05); }
}

.deck-card {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background:
    radial-gradient(circle at 30% 20%, rgba(212, 175, 106, 0.35), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(224, 163, 196, 0.3), transparent 55%),
    linear-gradient(135deg, #2a1255 0%, #1a0a3a 100%);
    border: 2px solid rgba(212, 175, 106, 0.55);
    box-shadow:
    0 0 30px rgba(212, 175, 106, 0.4),
    0 18px 35px rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--gold-light);
    opacity: 0.85;
    will-change: transform;
}

.deck:active .deck-card {
    transform: scale(0.96);
}

.deck-hint {
    position: absolute;
    bottom: -42px;
    font-size: 13px;
    color: var(--text-dim);
    font-style: italic;
    transition: opacity 0.4s;
    text-align: center;
    width: 100%;
    animation: fadeInOut 2.2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ═══════════ ЛЕТЯЩАЯ КАРТА ═══════════ */
.flying-card {
    position: fixed;
    z-index: 500;
    pointer-events: none;
    perspective: 1000px;
    transition:
    left 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.85s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: left, top;
}

.flying-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flying-card.flipped .flying-card-inner {
    transform: rotateY(180deg);
}

.flying-card-face {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background-size: cover;
    background-position: center;
}

.flying-card-back {
    background:
    radial-gradient(circle at 30% 20%, rgba(212, 175, 106, 0.35), transparent 55%),
    linear-gradient(135deg, #2a1255 0%, #1a0a3a 100%);
    border: 2px solid rgba(212, 175, 106, 0.55);
    box-shadow: 0 0 30px rgba(212, 175, 106, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    color: var(--gold-light);
}

.flying-card-front {
    transform: rotateY(180deg);
    border: 2px solid rgba(212, 175, 106, 0.7);
    box-shadow: 0 0 35px rgba(212, 175, 106, 0.6);
}

/* ═══════════ РЕЗУЛЬТАТ ═══════════ */
.result-screen {
    position: absolute;
    inset: 0;
    padding: 20px;
    padding-bottom: 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
    background: radial-gradient(circle at 50% 0%, #2d1055 0%, #1a0a3a 45%, #0a0420 100%);
    z-index: 10;
}

.result-screen.visible {
    opacity: 1;
    pointer-events: auto;
}

.result-cards {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 60px;
    margin-bottom: 26px;
    flex-wrap: wrap;
    min-height: 210px;
}

.result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s, transform 0.5s;
}

.result-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.result-card-img {
    width: 90px;
    height: 150px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(212, 175, 106, 0.6);
    box-shadow: 0 0 25px rgba(212, 175, 106, 0.4);
    margin-bottom: 8px;
}

.result-card-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--gold-light);
    text-align: center;
    line-height: 1.2;
}

.result-interp {
    max-width: 440px;
    margin: 0 auto 30px;
}

.interp-block {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 106, 0.15);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s, transform 0.5s;
}

.interp-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.interp-block-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 19px;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.interp-block-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px var(--gold);
    flex-shrink: 0;
}

.interp-block-text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
}

.interp-final {
    background: linear-gradient(135deg, rgba(212, 175, 106, 0.18), rgba(224, 163, 196, 0.12));
    border: 1px solid rgba(212, 175, 106, 0.45);
    border-radius: 16px;
    padding: 20px;
    margin-top: 16px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s, transform 0.5s;
}

.interp-final.visible {
    opacity: 1;
    transform: translateY(0);
}

.interp-final-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 10px;
    text-align: center;
}

.interp-final-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    text-align: center;
    font-style: italic;
}

/* ═══════════ КНОПКИ РЕЗУЛЬТАТА ═══════════ */
.result-actions {
    display: flex;
    gap: 8px;
    max-width: 440px;
    margin: 0 auto;
    padding-bottom: 30px;
}

.btn-back-result,
.btn-share,
.btn-again {
    padding: 14px 6px;
    border-radius: 14px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.15s, opacity 0.15s;
    white-space: nowrap;
    text-align: center;
}

.btn-back-result {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 175, 106, 0.3);
    color: var(--gold-light);
}

.btn-again {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 175, 106, 0.3);
    color: var(--gold-light);
}

.btn-share {
    flex: 1.3;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #1a0a3a;
    box-shadow: 0 8px 24px rgba(212, 175, 106, 0.4);
}

.btn-back-result:active,
.btn-share:active,
.btn-again:active {
    transform: scale(0.95);
    opacity: 0.85;
}

/* ═══════════ ЭКРАН ИСТОРИИ ═══════════ */
.history-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, #2d1055 0%, #1a0a3a 45%, #0a0420 100%);
    z-index: 90;
    padding: 20px;
    padding-bottom: 100px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translate3d(0, 100%, 0);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    visibility: hidden;
}

.history-screen.open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
}

.history-list {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 106, 0.15);
    border-radius: 16px;
    padding: 14px 16px;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.2s, background 0.2s;
    animation: fadeUp 0.5s ease-out backwards;
}

.history-item:active {
    transform: scale(0.98);
    border-color: rgba(212, 175, 106, 0.5);
    background: rgba(212, 175, 106, 0.08);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    gap: 10px;
}

.history-spread-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--gold-light);
}

.history-date {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
}

.history-mini-cards {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.history-mini-card {
    width: 38px;
    height: 62px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(212, 175, 106, 0.35);
    box-shadow: 0 0 10px rgba(212, 175, 106, 0.15);
}

.history-preview {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-dim);
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-empty {
    max-width: 320px;
    margin: 80px auto 0;
    text-align: center;
    display: none;
}

.history-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
    filter: drop-shadow(0 0 20px rgba(212, 175, 106, 0.4));
}

.history-empty-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 8px;
}

.history-empty-sub {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}

.history-clear {
    display: block;
    margin: 30px auto 0;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(224, 100, 120, 0.3);
    border-radius: 12px;
    color: #e09aa8;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s, border-color 0.2s;
}

.history-clear:active {
    transform: scale(0.96);
    background: rgba(224, 100, 120, 0.1);
    border-color: rgba(224, 100, 120, 0.5);
}

/* ═══════════ ПРОСМОТР ИЗ ИСТОРИИ ═══════════ */
.history-detail {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, #2d1055 0%, #1a0a3a 45%, #0a0420 100%);
    z-index: 110;
    padding: 20px;
    padding-bottom: 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translate3d(0, 100%, 0);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    visibility: hidden;
}

.history-detail.open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
}

.history-detail-question {
    max-width: 400px;
    margin: 0 auto 20px;
    padding: 12px 16px;
    background: rgba(212, 175, 106, 0.08);
    border: 1px solid rgba(212, 175, 106, 0.2);
    border-radius: 12px;
    font-size: 13px;
    font-style: italic;
    color: var(--text);
    text-align: center;
    line-height: 1.5;
}

.history-detail-question::before {
    content: '«';
    color: var(--gold-light);
    margin-right: 2px;
}

.history-detail-question::after {
    content: '»';
    color: var(--gold-light);
    margin-left: 2px;
}

/* ═══════════ МОДАЛКА ПРЕМИУМА ═══════════ */
.premium-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 2, 15, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.premium-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.premium-sheet {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background:
    radial-gradient(circle at 50% 0%, rgba(212, 175, 106, 0.12), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(184, 163, 224, 0.1), transparent 40%),
    linear-gradient(180deg, #1a0a3a 0%, #0f0528 100%);
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    border-top: 1px solid rgba(212, 175, 106, 0.4);
    padding: 30px 24px 40px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.premium-overlay.open .premium-sheet {
    transform: translateY(0);
}

.premium-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 175, 106, 0.2);
    color: var(--text-dim);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}

.premium-close:active {
    transform: scale(0.9);
}

.premium-icon {
    text-align: center;
    font-size: 56px;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 30px rgba(212, 175, 106, 0.7));
    animation: float 3s ease-in-out infinite;
}

.premium-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--gold-light);
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.premium-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 24px;
    font-style: italic;
}

.premium-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
    padding: 0 4px;
}

.premium-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text);
}

.premium-feature-check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #1a0a3a;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    box-shadow: 0 0 12px rgba(212, 175, 106, 0.5);
}

.premium-buy {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 16px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border: none;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(212, 175, 106, 0.4);
    transition: transform 0.15s, box-shadow 0.15s;
    font-family: 'Manrope', sans-serif;
}

.premium-buy:active {
    transform: scale(0.97);
    box-shadow: 0 6px 20px rgba(212, 175, 106, 0.55);
}

.premium-buy-price {
    font-size: 22px;
    font-weight: 700;
    color: #1a0a3a;
    letter-spacing: 0.5px;
}

.premium-buy-text {
    font-size: 12px;
    font-weight: 600;
    color: #1a0a3a;
    opacity: 0.75;
    letter-spacing: 0.3px;
}

.premium-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-dim);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.premium-divider::before,
.premium-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(212, 175, 106, 0.15);
}

.premium-promo {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.promo-input {
    flex: 1;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 106, 0.2);
    border-radius: 12px;
    color: var(--text);
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    text-transform: uppercase;
}

.promo-input:focus {
    border-color: rgba(212, 175, 106, 0.55);
}

.promo-input::placeholder {
    color: var(--text-dim);
    text-transform: none;
}

.promo-btn {
    padding: 12px 20px;
    background: rgba(212, 175, 106, 0.12);
    border: 1px solid rgba(212, 175, 106, 0.35);
    border-radius: 12px;
    color: var(--gold-light);
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s;
}

.promo-btn:active {
    transform: scale(0.95);
    background: rgba(212, 175, 106, 0.2);
}

.premium-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
    min-height: 16px;
    font-style: italic;
}

.premium-note.success {
    color: var(--gold-light);
    font-style: normal;
    font-weight: 600;
}

.premium-note.error {
    color: #e09aa8;
    font-style: normal;
}

/* Скрытие блока промокода, если уже премиум */
.premium-promo.hidden,
.premium-divider.hidden,
.premium-buy.hidden {
    display: none;
}

/* ═══════════ ТАБ-БАР ═══════════ */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 10px 0 max(10px, env(safe-area-inset-bottom));
    background: rgba(10, 4, 32, 0.98);
    border-top: 1px solid rgba(212, 175, 106, 0.15);
    z-index: 50;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5);
}

.tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: inherit;
    cursor: pointer;
    padding: 4px 16px;
    transition: color 0.2s;
}

.tab-icon {
    font-size: 20px;
    line-height: 1;
}

.tab-label {
    font-size: 10px;
    font-weight: 500;
}

.tab.active {
    color: var(--gold-light);
}

/* ═══════════ АНИМАЦИИ ═══════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translate3d(0, 20px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translate3d(0, -10px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}
