/* ============================================
   Numer - Main Stylesheet (Зелёная природная тема)
   ============================================ */

:root {
    --color-primary: #66bb6a;
    --color-primary-light: #81c784;
    --color-primary-dark: #4caf50;
    --color-primary-soft: #1e3a1e;
    --color-gold: #ffd54f;
    --color-gold-light: #ffe082;
    --color-gold-dark: #f9a825;
    --color-bg: #0f1f0f;
    --color-white: #ffffff;
    --color-text: #e0f5e0;
    --color-text-light: #c8f0c8;
    --color-text-lighter: #8fbc8f;
    --color-border: #2e5e2e;
    --color-success: #66bb6a;
    --color-error: #ef5350;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 50px;
    --shadow-sm: 0 2px 8px rgba(76, 175, 80, 0.08);
    --shadow-md: 0 4px 20px rgba(76, 175, 80, 0.12);
    --shadow-lg: 0 8px 40px rgba(76, 175, 80, 0.16);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* ---------- ФОН И ТУМАННОСТЬ ---------- */
body {
    font-family: var(--font-main);
    background: radial-gradient(ellipse at center, #1a2f1a 0%, #0a1a0a 60%, #051005 100%);
    color: var(--color-text);
    line-height: 1.6;
    font-weight: 400;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: 80px;
    position: relative;
    z-index: 0;
}

/* Запрет на вылезание контента за границы экрана */
main, section, .container, .panel-form, .panel-result, .page-section {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(255, 213, 79, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(76, 175, 80, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(255, 213, 79, 0.02) 0%, transparent 40%),
        radial-gradient(ellipse at 20% 90%, rgba(76, 175, 80, 0.02) 0%, transparent 45%);
}

#result-horoscope {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

#horAnswer {
    width: 100% !important;
    max-width: 100% !important;
}

.horoscope-sign-svg {
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto;
    animation: goldPulse 3s ease-in-out infinite;
}

.horoscope-sign-svg svg {
    width: 48px;
    height: 48px;
}

@keyframes goldPulse {
    0%, 100% { filter: brightness(1) sepia(0.5) hue-rotate(-10deg) saturate(1.5); }
    50% { filter: brightness(1.3) sepia(0.8) hue-rotate(10deg) saturate(2); }
}

.numer-share-btn {
    display: inline-block;
    vertical-align: middle;
}

/* ---------- ЗВЁЗДЫ ---------- */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    background: #ffd54f;
    border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
    opacity: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 0.6; transform: scale(1); }
}

/* ---------- HEADER ---------- */
.header { 
    position: fixed; top: 0; left: 0; right: 0; z-index: 100; 
    background: rgba(5, 16, 5, 0.9); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px); 
    border-bottom: 1.5px solid var(--color-gold);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.header .container { 
    display: flex; align-items: center; justify-content: space-between; 
    height: 56px; max-width: 100%; padding: 0 16px; 
}
.logo { 
    display: flex; align-items: center; gap: 6px; 
    font-size: 20px; font-weight: 600; 
    color: var(--color-gold); 
    text-decoration: none; letter-spacing: -0.5px; 
}
.logo img { height: 22px; width: auto; vertical-align: middle; filter: brightness(0) saturate(100%) invert(84%) sepia(36%) saturate(768%) hue-rotate(346deg) brightness(105%) contrast(103%); }
.auth-buttons { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}
.user-greeting { 
    display: inline-flex; 
    align-items: center; 
    gap: 0; 
    font-size: 12px; 
    color: var(--color-gold); 
    font-weight: 500; 
}
@media (min-width: 480px) { 
    .user-greeting { 
        display: inline-flex; 
    } 
}

.user-name-text {
    display: inline;
}
@media (max-width: 480px) {
    .user-name-text {
        display: none;
    }
}

/* Кнопка меню (три полоски) */
.menu-toggle-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 28px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    justify-content: center;
}
.menu-icon-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-gold);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.menu-toggle-btn:hover .menu-icon-bar {
    background: var(--color-gold-light);
}

/* Ссылки в меню */
.menu-link {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}
.menu-link:hover {
    background: rgba(255, 213, 79, 0.08);
    color: var(--color-gold);
}

/* Выезжающее меню */
.side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: #1a2f1a;
    border-left: 1.5px solid var(--color-gold);
    z-index: 600;
    padding: 24px 20px;
    transition: right 0.35s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
}
.side-menu.open {
    right: 0;
}
.menu-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 599;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.menu-close-btn {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--color-text-lighter);
}
.menu-close-btn:hover {
    color: var(--color-gold);
}

/* ---------- BUTTONS ---------- */
.btn { 
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; 
    padding: 10px 20px; font-family: var(--font-main); font-size: 14px; font-weight: 500; 
    border: none; border-radius: var(--radius-full); cursor: pointer; 
    transition: var(--transition); text-decoration: none; white-space: nowrap; 
}
.btn-primary {
    background: var(--color-gold);
    color: #0f1f0f;
    font-weight: 600;
}
.btn-primary:hover {
    background: var(--color-gold-light);
    color: #0f1f0f;
}
.btn-outline { 
    background: transparent; color: var(--color-gold); 
    border: 1.5px solid var(--color-gold); 
}
.btn-outline:hover { 
    background: rgba(255, 213, 79, 0.08); 
    border-color: var(--color-gold-light); 
    color: var(--color-gold-light); 
}
.btn-pdf { 
    background: var(--color-primary-soft); color: var(--color-primary-light); 
    border: 2px dashed var(--color-gold-light); 
    width: 100%; justify-content: center; padding: 10px; margin-top: 12px; font-size: 13px; 
}
.btn-pdf:hover { 
    background: rgba(76, 175, 80, 0.2); color: var(--color-gold); 
    border-color: var(--color-gold); 
}
.btn-share {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: #0f1f0f;
    border: none;
    width: 100%;
    justify-content: center;
    padding: 10px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
}
.btn-share:hover {
    background: linear-gradient(135deg, #388e3c, #4caf50);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.5);
}

/* ---------- INPUT DATE ---------- */
/* Убедись, что эти стили есть в style.css */
input[type="date"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 48px;
    box-sizing: border-box !important;
    border: 1.5px solid var(--color-gold) !important;
    text-align: center;
    padding: 12px 14px;
    font-size: 16px;
    background: rgba(15, 31, 15, 0.8);
    color: rgba(143, 188, 143, 0.4);
    border-radius: 50px;
    font-family: var(--font-main);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input[type="date"]:focus,
input[type="date"]:valid {
    color: var(--color-text);
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    display: flex;
    justify-content: center;
}

input[type="date"]::-webkit-datetime-edit {
    text-align: center;
    width: 100%;
}
input[type="date"]:focus {
    box-shadow: 0 0 10px rgba(255, 213, 79, 0.3) !important;
    outline: none;
}

#finBirthDate {
    color: rgba(143, 188, 143, 0.4);
}
#finBirthDate:focus,
#finBirthDate:valid {
    color: var(--color-text);
}

/* ---------- FLASH ---------- */
.flash-container { 
    position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 200; 
    display: flex; flex-direction: column; gap: 6px; width: 90%; max-width: 400px; 
}
.flash-message { 
    padding: 10px 16px; border-radius: var(--radius-md); font-size: 13px; font-weight: 500; 
    display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-md); 
    animation: slideDown 0.4s ease; 
}
.flash-success { background: #1a3a1a; color: var(--color-success); border: 1px solid #2e5e2e; }
.flash-error { background: #3a1a1a; color: var(--color-error); border: 1px solid #5e2e2e; }
.flash-info { background: var(--color-primary-soft); color: var(--color-primary-light); border: 1px solid var(--color-primary); }
.flash-close { background: none; border: none; font-size: 18px; cursor: pointer; color: inherit; opacity: 0.6; margin-left: auto; }
@keyframes slideDown { from { opacity: 0; transform: translateX(-50%) translateY(-16px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ---------- TAB BAR ---------- */
.tab-bar {
    position: fixed !important;
    bottom: 0 !important; left: 0 !important; right: 0 !important; z-index: 100 !important;
    background: rgba(5, 16, 5, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1.5px solid var(--color-gold) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    padding: 6px 0 10px !important;
    height: 62px !important;
    box-shadow: 
        0 -2px 4px rgba(0, 0, 0, 0.3),
        0 -4px 8px rgba(0, 0, 0, 0.2) !important;
}
.tab-item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #6a8f6a !important;
    text-decoration: none !important;
    cursor: pointer !important;
    border: none !important;
    background: none !important;
    font-family: 'Inter', sans-serif !important;
    transition: color 0.3s ease !important;
    flex: 1 !important;
    padding: 0 !important;
}
.tab-item.active { color: var(--color-gold) !important; }
.tab-item:hover { color: var(--color-primary-light) !important; }

.tab-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    transition: all 0.35s ease;
}
.tab-icon-svg svg {
    width: 30px;
    height: 30px;
    display: block;
    transition: all 0.35s ease;
}
.tab-item.active .tab-icon-svg {
    width: 38px;
    height: 38px;
}
.tab-item.active .tab-icon-svg svg {
    width: 38px;
    height: 38px;
}

.tab-center { position: relative !important; margin-top: -20px !important; }
.tab-center-icon {
    width: 52px !important;
    height: 52px !important;
    background: linear-gradient(135deg, #2e5e2e, #1e3a1e) !important;
    border: 1.5px solid var(--color-gold) !important;
    border-radius: 50% !important;
    color: var(--color-gold) !important;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 6px 12px rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
.tab-center:hover .tab-center-icon {
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.35),
        0 8px 16px rgba(0, 0, 0, 0.25) !important;
    transform: scale(1.1) !important;
}
.tab-center-icon .tab-icon-svg {
    width: 28px;
    height: 28px;
}
.tab-center-icon .tab-icon-svg svg {
    width: 28px;
    height: 28px;
}

/* ---------- HERO ---------- */
.hero { 
    min-height: calc(100vh - 140px); 
    display: flex; align-items: center; justify-content: center; 
    padding: 80px 16px 120px; position: relative; z-index: 2; 
}
.hero-content { text-align: center; max-width: 700px; width: 100%; }
.hero-badge { 
    display: inline-block; padding: 6px 16px; 
    background: rgba(30, 58, 30, 0.9); 
    border-radius: var(--radius-full); 
    font-size: 12px; color: var(--color-gold); 
    font-weight: 500; box-shadow: 0 0 15px rgba(76, 175, 80, 0.2); 
    margin-bottom: 16px; border: 1px solid var(--color-primary); 
}
.hero-title { 
    font-size: 24px; font-weight: 300; letter-spacing: -1px; 
    line-height: 1.2; color: var(--color-text); 
    margin-bottom: 10px; text-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}
@media (min-width: 768px) {
    .hero-title { font-size: 34px; }
}
.hero-highlight {
    background: linear-gradient(
        135deg,
        #d4a843 0%,
        #f5e6c8 25%,
        #d4a843 50%,
        #faeebc 75%,
        #d4a843 100%
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    letter-spacing: 4px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
    animation: goldShimmer 8s ease-in-out infinite;
}
@keyframes goldShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.hero-subtitle { 
    font-size: 14px; color: var(--color-text-light); 
    margin-bottom: 28px; line-height: 1.6; 
}

/* ---------- PORTAL BUTTONS ---------- */
.portal-buttons { 
    display: flex; flex-direction: column; align-items: center; 
    gap: 10px; margin-bottom: 16px; padding: 0 16px; 
}
.portal-item { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: stretch; }
.portal-btn { 
    width: 100%; padding: 14px 32px; border-radius: 50px; 
    border: 1.5px solid var(--color-gold); 
    background: transparent; 
    cursor: pointer; transition: all 0.35s ease; 
    font-family: var(--font-main); font-size: 14px; font-weight: 500; 
    color: var(--color-gold); 
    text-align: center; outline: none; 
    -webkit-tap-highlight-color: transparent; 
    text-decoration: none !important;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}
.portal-btn:hover, .portal-btn:focus-visible { 
    border-color: var(--color-gold-light); 
    color: var(--color-gold-light); 
    background: transparent;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.35),
        0 6px 12px rgba(0, 0, 0, 0.25),
        0 0 20px rgba(255, 213, 79, 0.15);
    transform: translateY(-2px);
}
.portal-btn.active { 
    border-color: var(--color-gold); 
    background: transparent; 
    color: var(--color-gold-light); 
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.3),
        0 5px 10px rgba(0, 0, 0, 0.2),
        0 0 15px rgba(255, 213, 79, 0.2);
}
.portal-drop { 
    max-height: 0; overflow: hidden; 
    transition: max-height 0.45s ease, margin 0.45s ease; 
    margin-top: 0; 
}
.portal-drop.open { max-height: none; overflow: visible; margin-top: 10px; }
.portal-drop-inner {
    background: rgba(30, 58, 30, 0.95);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.2);
    text-align: left;
    border: 1px solid var(--color-border);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.35s ease, transform 0.35s ease;
    overflow: visible !important;
    max-height: none !important;
}
.portal-btn[href] { display: flex; align-items: center; justify-content: center; }
.panel-title { font-size: 18px; font-weight: 600; color: var(--color-text); margin-bottom: 4px; }
.panel-subtitle { font-size: 13px; color: var(--color-text-lighter); margin-bottom: 16px; }
.panel-form { display: flex; flex-direction: column; gap: 12px; }
.input-group { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.input-group label { font-size: 12px; font-weight: 500; color: var(--color-text-light); }
.input-group input, .input-group select { 
    padding: 10px 14px; 
    border: 2px solid var(--color-border); 
    border-radius: var(--radius-md); 
    font-family: var(--font-main); font-size: 14px; 
    color: var(--color-text); 
    background: rgba(15, 31, 15, 0.8); 
    transition: var(--transition); outline: none; width: 100%; 
}
.input-group input:focus, .input-group select:focus { 
    border-color: var(--color-primary); 
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3); 
}
.input-row { display: flex; gap: 10px; flex-wrap: wrap; }
.person-block { 
    background: rgba(30, 58, 30, 0.7); 
    padding: 14px; border-radius: var(--radius-md); 
    flex: 1; min-width: 140px; 
}
.person-block h4 { font-size: 13px; color: var(--color-primary-light); margin-bottom: 8px; }
.panel-result {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    animation: fadeIn 0.4s ease;
    overflow: visible !important;
    max-height: none !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.result-code { 
    font-size: 32px; font-weight: 300; letter-spacing: 6px; 
    color: var(--color-gold); text-align: center; 
    text-shadow: 0 0 15px rgba(255, 213, 79, 0.4);
}
.result-label { 
    font-size: 11px; text-transform: uppercase; letter-spacing: 2px; 
    color: var(--color-text-lighter); text-align: center; margin-bottom: 8px; 
}
.result-text { font-size: 14px; color: var(--color-text); line-height: 1.7; margin-top: 6px; }
.result-highlight { 
    display: inline-block; padding: 3px 10px; 
    background: rgba(76, 175, 80, 0.15); 
    border-radius: var(--radius-full); 
    font-size: 12px; color: var(--color-primary-light); 
    font-weight: 500; margin-top: 6px; 
}
.login-hint { 
    display: flex; align-items: center; gap: 8px; 
    padding: 10px 14px; background: rgba(30, 58, 30, 0.7); 
    border-radius: var(--radius-md); font-size: 12px; 
    color: var(--color-text-lighter); margin-top: 12px; 
    border: 2px dashed var(--color-border); 
}
.login-hint i { color: var(--color-gold); font-size: 16px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- MODAL ---------- */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px); 
    z-index: 300; display: flex; align-items: flex-start; justify-content: center; 
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease; 
    padding: 40px 20px 100px; overflow-y: auto;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
#authModal { z-index: 500 !important; }
#authModal.active { z-index: 500 !important; }
#dailyCardModal { z-index: 350 !important; }
#dailyCardModal.active { z-index: 350 !important; }

.modal { 
    background: #1e3a1e; 
    border-radius: var(--radius-lg); 
    padding: 28px 22px; width: 90%; max-width: 400px; 
    position: relative; 
    box-shadow: 0 0 40px rgba(76, 175, 80, 0.3); 
    border: 1px solid var(--color-border); 
    max-height: 90vh; overflow-y: auto; 
}
.modal-card { max-width: 340px; text-align: center; padding-top: 10px; }
.modal-close { 
    position: absolute; top: 10px; right: 14px; 
    background: none; border: none; font-size: 26px; 
    cursor: pointer; color: var(--color-text-lighter); z-index: 1; 
}
.modal-close:hover { color: var(--color-gold); }
.modal h2 { 
    font-size: 20px; font-weight: 600; text-align: center; 
    margin-bottom: 18px; color: var(--color-text); 
}

#initStep4 .btn-primary:hover {
    color: var(--color-gold) !important;
}

.insight-answer-btn {
    color: var(--color-text) !important;
    border-color: var(--color-border) !important;
}
.insight-answer-btn:hover {
    color: var(--color-gold) !important;
    border-color: var(--color-gold) !important;
    background: rgba(255, 213, 79, 0.05) !important;
}

.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form input { 
    padding: 10px 14px; border: 2px solid var(--color-border); 
    border-radius: var(--radius-md); font-family: var(--font-main); 
    font-size: 14px; outline: none; 
    background: rgba(15, 31, 15, 0.8); 
    color: var(--color-text); 
}
.auth-form input:focus { border-color: var(--color-primary); box-shadow: 0 0 15px rgba(76, 175, 80, 0.3); }
.auth-form .btn { width: 100%; justify-content: center; padding: 10px; }
.auth-divider { text-align: center; margin: 14px 0; font-size: 12px; color: var(--color-text-lighter); }

/* ---------- LOADER ---------- */
.loading-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(15, 31, 15, 0.7); backdrop-filter: blur(4px); 
    z-index: 400; display: flex; align-items: center; justify-content: center; 
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease; 
}
.loading-overlay.active { opacity: 1; pointer-events: auto; }
.crystal-loader { text-align: center; }
.crystal { 
    width: 40px; height: 40px; margin: 0 auto 12px; 
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-primary-light)); 
    border-radius: 50% 50% 0 50%; transform: rotate(45deg); 
    animation: crystalSpin 1.5s ease-in-out infinite; 
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.4); 
}
.crystal-loader p { font-size: 14px; color: var(--color-primary-light); font-weight: 500; }
@keyframes crystalSpin { 0% { transform: rotate(45deg) scale(1); } 50% { transform: rotate(225deg) scale(1.3); } 100% { transform: rotate(405deg) scale(1); } }

/* ---------- DAILY CARD ---------- */
.daily-card-wrapper { text-align: center; }
.daily-card-wrapper h3 { font-size: 16px; color: var(--color-primary-light); margin-bottom: 8px; }
.daily-card-wrapper p { font-size: 14px; color: var(--color-text); line-height: 1.6; margin-bottom: 8px; }

/* ---------- LIBRARY ---------- */
.page-section { 
    padding: 80px 0 120px; 
    position: relative; 
    z-index: 2; 
    max-width: 100%;
    box-sizing: border-box;
}
.container { 
    max-width: 800px; 
    margin: 0 auto; 
    padding: 0 16px;
    box-sizing: border-box;
}
.page-title { 
    font-size: 28px; font-weight: 600; color: var(--color-text); 
    text-align: center; margin-bottom: 4px; 
    text-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}
.page-subtitle { font-size: 14px; color: var(--color-text-lighter); text-align: center; margin-bottom: 24px; }
.library-filters { margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.search-box { 
    display: flex; align-items: center; gap: 10px; 
    background: rgba(30, 58, 30, 0.9); 
    border: 2px solid var(--color-border); 
    border-radius: var(--radius-full); padding: 10px 16px; 
}
.search-box i { color: var(--color-text-lighter); font-size: 18px; }
.search-box input { 
    border: none; outline: none; font-family: var(--font-main); 
    font-size: 14px; width: 100%; 
    background: transparent; color: var(--color-text); 
}
.filter-row { display: flex; gap: 8px; }
.filter-row select { 
    flex: 1; padding: 8px 12px; 
    border: 2px solid var(--color-border); 
    border-radius: var(--radius-full); 
    font-family: var(--font-main); font-size: 13px; 
    color: var(--color-text); outline: none; 
    background: rgba(30, 58, 30, 0.9); 
}
.cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 480px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .cards-grid { grid-template-columns: repeat(4, 1fr); } }
.tarot-card-mini { 
    background: rgba(30, 58, 30, 0.9); 
    border: 2px solid var(--color-border); 
    border-radius: var(--radius-md); padding: 14px; 
    cursor: pointer; transition: var(--transition); text-align: center; 
}
.tarot-card-mini:hover { 
    border-color: var(--color-gold); 
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3); 
    transform: translateY(-2px); 
}
.card-mini-number { font-size: 11px; color: var(--color-text-lighter); display: block; }
.card-mini-inner h4 { font-size: 13px; color: var(--color-primary-light); margin: 4px 0; }
.card-mini-suit { font-size: 20px; display: block; margin: 2px 0; }
.card-mini-keywords { font-size: 10px; color: var(--color-text-lighter); margin-top: 4px; }
.loading-placeholder { grid-column: 1/-1; text-align: center; padding: 40px; color: var(--color-text-lighter); }
.empty-state { grid-column: 1/-1; text-align: center; padding: 40px; color: var(--color-text-lighter); font-size: 14px; }

/* ---------- ADMIN ---------- */
.admin-page { max-width: 700px; margin: 60px auto; padding: 20px; }
.admin-page h1 { font-size: 24px; font-weight: 300; text-align: center; margin-bottom: 30px; color: var(--color-primary-light); }
.admin-form { display: flex; flex-direction: column; gap: 12px; max-width: 300px; margin: 0 auto; }
.admin-form input { 
    padding: 10px 14px; border: 2px solid var(--color-border); 
    border-radius: var(--radius-md); font-family: var(--font-main); 
    font-size: 14px; background: rgba(15, 31, 15, 0.8); 
    color: var(--color-text); 
}
.admin-hint { text-align: center; font-size: 12px; color: var(--color-text-lighter); margin-top: 10px; }
.admin-section { 
    background: rgba(30, 58, 30, 0.9); 
    border: 1px solid var(--color-border); 
    border-radius: var(--radius-md); padding: 16px; margin-bottom: 20px; 
}
.admin-section h2 { font-size: 16px; color: var(--color-text); margin-bottom: 12px; }
.prompt-item { margin-bottom: 12px; }
.prompt-item h3 { font-size: 13px; color: var(--color-text-light); margin-bottom: 4px; }
.prompt-item textarea { 
    width: 100%; border: 1px solid var(--color-border); 
    border-radius: var(--radius-sm); padding: 8px; 
    font-family: monospace; font-size: 12px; resize: vertical; 
    margin-bottom: 6px; background: rgba(15, 31, 15, 0.8); 
    color: var(--color-text); 
}
.admin-section table { width: 100%; font-size: 11px; border-collapse: collapse; }
.admin-section th, .admin-section td { 
    padding: 6px 8px; text-align: left; 
    border-bottom: 1px solid var(--color-border); 
}
.admin-section th { color: var(--color-text-lighter); font-weight: 500; }

/* ---------- ERROR PAGE ---------- */
.error-page { 
    display: flex; flex-direction: column; align-items: center; 
    justify-content: center; min-height: 100vh; text-align: center; padding: 40px; 
}
.error-page h1 { font-size: 60px; margin-bottom: 16px; }
.error-page p { font-size: 16px; color: var(--color-text-light); margin-bottom: 24px; }

/* ---------- DESKTOP ---------- */
@media (min-width: 768px) {
    .hero-title { font-size: 34px; }
    .hero-subtitle { font-size: 16px; }
    .portal-drop-inner { padding: 28px; }
    .tab-bar { display: none; }
    body { padding-bottom: 0; }
}

/* ---------- PROFILE ---------- */
.profile-tabs { 
    display: flex; 
    gap: 6px; 
    margin-bottom: 20px; 
    justify-content: center;
    flex-wrap: wrap;
}
.profile-tab { 
    padding: 7px 12px; 
    border: 1.5px solid var(--color-border); 
    border-radius: var(--radius-full); 
    background: rgba(30, 58, 30, 0.9); 
    font-family: var(--font-main); 
    font-size: 12px; 
    cursor: pointer; 
    transition: var(--transition); 
    color: var(--color-text-light); 
    white-space: nowrap;
}
.profile-tab { 
    padding: 8px 18px; border: 2px solid var(--color-border); 
    border-radius: var(--radius-full); 
    background: rgba(30, 58, 30, 0.9); 
    font-family: var(--font-main); font-size: 13px; cursor: pointer; 
    transition: var(--transition); color: var(--color-text-light); 
}
.profile-tab.active { 
    border-color: var(--color-primary); 
    background: rgba(76, 175, 80, 0.15); 
    color: var(--color-primary-light); font-weight: 600; 
}
.profile-panel { display: none; }
.profile-panel.active { display: block; }
.profile-panel textarea { 
    width: 100%; border: 2px solid var(--color-border); 
    border-radius: var(--radius-md); padding: 10px; 
    font-family: var(--font-main); font-size: 14px; resize: vertical; 
    background: rgba(15, 31, 15, 0.8); color: var(--color-text); 
}
.diary-entry { animation: fadeIn 0.3s ease; }

.btn-sm { padding: 6px 12px; font-size: 11px; flex: 1 1 auto; min-width: 60px; }

.portal-drop.open .portal-drop-inner { margin-bottom: 100px; }

/* ---------- TAROT ANIMATION ---------- */
.card-deck { position: relative; width: 140px; height: 190px; margin: 0 auto 20px; transition: all 0.8s ease; }
.deck-card { 
    position: absolute; width: 120px; height: 170px; 
    border-radius: 14px; 
    background: linear-gradient(135deg, #1a3a1a, #2e5e2e); 
    border: 2px solid var(--color-gold); 
    left: 10px; top: 10px; transition: all 0.6s ease; 
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); 
}
.deck-card-1 { transform: rotate(-5deg); z-index: 5; }
.deck-card-2 { transform: rotate(-2deg); z-index: 4; }
.deck-card-3 { transform: rotate(0deg); z-index: 3; }
.deck-card-4 { transform: rotate(2deg); z-index: 2; }
.deck-card-5 { transform: rotate(5deg); z-index: 1; }

.deck-open .deck-card-1 { transform: rotate(-18deg) translateX(-30px); }
.deck-open .deck-card-2 { transform: rotate(-8deg) translateX(-14px); }
.deck-open .deck-card-3 { transform: rotate(0deg); }
.deck-open .deck-card-4 { transform: rotate(8deg) translateX(14px); }
.deck-open .deck-card-5 { transform: rotate(18deg) translateX(30px); }

.flying-card { 
    width: 120px; height: 170px; perspective: 800px; 
    margin: -140px auto 70px; cursor: pointer; 
    position: relative; z-index: 10; 
    opacity: 0; transform: translateY(40px) scale(0.7); 
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1); 
}
.card-fly-out { opacity: 1 !important; transform: translateY(-60px) scale(1) !important; margin-bottom: 30px !important; }
.flying-card-inner { 
    position: relative; width: 100%; height: 100%; 
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1); 
    transform-style: preserve-3d; 
}
.flying-card-inner.flipped { transform: rotateY(180deg); }
.flying-card .card-front, .flying-card .card-back { 
    position: absolute; width: 100%; height: 100%; 
    backface-visibility: hidden; border-radius: 14px; 
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); 
    display: flex; align-items: center; justify-content: center; 
}
.flying-card .card-front { 
    background: linear-gradient(135deg, #1a3a1a, #2e5e2e); 
    border: 2px solid var(--color-gold); 
}
.flying-card .card-back { 
    background: var(--color-white); 
    border: 2px solid var(--color-gold); 
    transform: rotateY(180deg); 
}
.card-hint { 
    text-align: center; font-size: 13px; color: var(--color-primary-light); 
    margin-top: -30px; margin-bottom: 15px; position: relative; z-index: 5; 
    animation: pulse 1.5s ease-in-out infinite; 
}
.daily-card-text { 
    text-align: center; animation: fadeIn 0.5s ease; 
    padding-top: 0; margin-top: -40px; position: relative; z-index: 5; 
}
.card-fly-out.vibrating { animation: flyAndVibrate 0.6s ease-in-out infinite; }

@keyframes flyAndVibrate {
    0%, 100% { transform: translateY(-60px) scale(1) rotate(0deg); }
    25% { transform: translateY(-60px) scale(1) rotate(-3deg); }
    75% { transform: translateY(-60px) scale(1) rotate(3deg); }
}

/* ---------- TARIFFS ---------- */
.tariffs-grid { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.tariff-card { 
    background: rgba(30, 58, 30, 0.95); 
    border: 2px solid var(--color-border); 
    border-radius: var(--radius-lg); padding: 28px 22px; 
    width: 100%; max-width: 320px; text-align: center; 
    position: relative; transition: var(--transition); 
    display: flex; flex-direction: column; 
}
.tariff-card:hover { 
    border-color: var(--color-gold); 
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.3); 
    transform: translateY(-4px); 
}
.tariff-recommended { 
    border-color: var(--color-gold); 
    box-shadow: 0 0 25px rgba(255, 213, 79, 0.2); 
}
.tariff-popular { 
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%); 
    background: linear-gradient(135deg, #4caf50, #66bb6a); 
    color: #0f1f0f; padding: 6px 18px; 
    border-radius: var(--radius-full); font-size: 12px; 
    font-weight: 600; white-space: nowrap; 
}
.tariff-badge { font-size: 42px; margin-bottom: 8px; }
.tariff-name { font-size: 22px; font-weight: 600; color: var(--color-text); margin-bottom: 4px; }
.tariff-price { font-size: 28px; font-weight: 300; color: var(--color-gold); margin-bottom: 4px; }
.tariff-desc { font-size: 13px; color: var(--color-text-lighter); margin-bottom: 20px; line-height: 1.5; }
.tariff-features { list-style: none; padding: 0; text-align: left; margin-bottom: 20px; flex: 1; }
.tariff-features li { 
    padding: 6px 0; font-size: 13px; color: var(--color-text-light); 
    border-bottom: 1px solid #2e5e2e; 
}
.tariff-features li:last-child { border-bottom: none; }
@media (max-width: 768px) { 
    .tariffs-grid { flex-direction: column; align-items: center; } 
    .tariff-card { max-width: 100%; } 
}

/* Градиентные цифры психоматрицы */
.psycho-digit {
    background: linear-gradient(135deg, #d4a843, #d4879a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* ---------- TARIFFS MINI ---------- */
.tariffs-mini { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.tariff-mini-card { 
    background: rgba(30, 58, 30, 0.9); 
    border: 2px solid var(--color-border); 
    border-radius: var(--radius-md); padding: 18px 14px; 
    flex: 1; min-width: 150px; max-width: 200px; 
    text-align: center; transition: var(--transition); 
}
.tariff-mini-card:hover { border-color: var(--color-gold); box-shadow: 0 0 15px rgba(76, 175, 80, 0.2); }
.tariff-mini-card.current { 
    border-color: var(--color-primary); 
    background: rgba(76, 175, 80, 0.15); 
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3); 
}
.tariff-mini-card h3 { font-size: 16px; font-weight: 600; color: var(--color-text); margin: 6px 0 2px; }
.tariff-mini-card ul { margin: 10px 0; }
.tariff-mini-card ul li { padding: 2px 0; }
@media (max-width: 480px) { 
    .tariffs-mini { flex-direction: column; align-items: center; } 
    .tariff-mini-card { max-width: 100%; width: 100%; } 
}

.input-group textarea { 
    resize: none; overflow: hidden; 
    transition: height 0.1s ease, border-color 0.3s ease; 
}
.input-group textarea:focus { 
    border-color: var(--color-primary) !important; 
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3); 
}

.btn-outline.btn-sm.active { 
    background: var(--color-gold) !important; 
    border-color: var(--color-gold) !important; 
    color: #0f1f0f !important; 
    font-weight: 600; 
}

#pythDescription, #pythDescription p { 
    max-height: none !important; overflow: visible !important; 
    white-space: pre-wrap !important; word-wrap: break-word !important; 
}

.sentence-selectable, .share-sentence { 
    cursor: pointer; transition: background 0.2s ease; 
    border-radius: 4px; padding: 1px 2px; 
}
.sentence-selectable:hover, .share-sentence:hover { 
    background: rgba(76, 175, 80, 0.15); 
}
.sentence-selectable.selected, .share-sentence.selected { 
    background: rgba(76, 175, 80, 0.3) !important; 
    border-bottom: 2px solid var(--color-primary); 
}

#shareBar { animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

#result-horoscope span[style*="font-weight:600"] {
    display: block;
    text-align: center;
    color: var(--color-gold) !important;
    margin-top: 14px;
    font-size: 13px;
}

/* ---------- NUMER DIALOG ---------- */
.numer-message { 
    padding: 10px 14px; border-radius: 12px; 
    margin-bottom: 8px; font-size: 13px; line-height: 1.5; 
}
.numer-message.numer-answer { 
    background: rgba(76, 175, 80, 0.1); 
    color: var(--color-text); 
}
.numer-message.numer-question { 
    background: rgba(30, 58, 30, 0.9); 
    border: 1px solid var(--color-border); 
    color: var(--color-text-light); text-align: right; 
}
.numer-marquee-item { 
    display: inline-block; padding: 6px 14px; 
    background: rgba(30, 58, 30, 0.9); 
    border-radius: 20px; font-size: 12px; 
    color: var(--color-text-light); cursor: pointer; 
    border: 1px solid var(--color-border); 
    transition: all 0.2s ease; 
}
.numer-marquee-item:hover { 
    border-color: var(--color-primary); 
    color: var(--color-primary-light); 
}

/* ---------- ONBOARDING ---------- */
.init-theme { 
    display: inline-block; padding: 8px 16px; 
    background: rgba(30, 58, 30, 0.9); 
    border: 2px solid var(--color-border); 
    border-radius: 20px; font-size: 13px; 
    color: var(--color-text-light); cursor: pointer; 
    transition: all 0.2s ease; user-select: none; 
}
.init-theme:hover { 
    border-color: var(--color-gold) !important; 
    color: var(--color-gold) !important; 
    background: rgba(255, 213, 79, 0.08) !important; 
}
.init-theme.selected { 
    background: rgba(255, 213, 79, 0.12) !important; 
    border-color: var(--color-gold) !important; 
    color: var(--color-gold) !important; 
    font-weight: 500; 
}

.user-zodiac {
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
    color: var(--color-gold);
}
.user-zodiac svg {
    width: 18px;
    height: 18px;
    display: block;
}

@keyframes marqueeScroll1 {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes marqueeScroll2 {
    0% { transform: translateX(-30%); }
    100% { transform: translateX(-80%); }
}
@keyframes marqueeScroll3 {
    0% { transform: translateX(-15%); }
    100% { transform: translateX(-65%); }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideUp {
    from { transform: translateX(-50%) translateY(20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ---------- FOOTER ---------- */
.site-footer {
    background: rgba(5, 16, 5, 0.95);
    border-top: 1px solid var(--color-border);
    padding: 20px 16px 90px 16px;
    margin-top: 40px;
    text-align: center;
}
.footer-container {
    max-width: 800px;
    margin: 0 auto;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 4px;
    margin-bottom: 12px;
    font-size: 12px;
}
.footer-links a {
    color: var(--color-text-lighter);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover {
    color: var(--color-gold);
}
.footer-divider {
    color: var(--color-border);
}
.footer-copy {
    font-size: 11px;
    color: var(--color-text-lighter);
    opacity: 0.7;
}

/* ---------- НАТАЛЬНАЯ КАРТА SVG ---------- */
.nr-wheel-wrap {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.nr-wheel {
    width: 100%;
    height: auto;
    display: block;
}

.nr-wheel-sign {
    cursor: default;
    transition: opacity 0.2s ease;
}

.nr-wheel-sign:hover {
    opacity: 1 !important;
}

.nr-wheel-sign image {
    transition: opacity 0.2s ease;
}

.nr-wheel-planet {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.nr-wheel-planet:hover {
    opacity: 0.7;
}

.nr-asp-line {
    transition: opacity 0.3s ease;
}

.nr-asp-line:hover {
    opacity: 1 !important;
}

.tariff-mini-card {
    position: relative;
    overflow: visible;
}