/* ==========================================
   GLOBAL MOBILE FIXES & ACCESSIBILITY 
   ========================================== */
html, body {
    overflow-x: hidden; /* Strictly prevent horizontal scrolling */
    width: 100%;
}

*, *::before, *::after {
    box-sizing: border-box; /* Prevent padding from breaking widths */
}

/* Ensure 44x44px minimum tap targets for touchscreens */
.nav-links a, .dropdown-content a, .mobile-submenu a, .tab-btn, .custom-option {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.hamburger {
    padding: 10px; /* Increase tap area */
    margin-right: -10px;
}

/* Fix Tables breaking the layout on articles.html */
.zodiac-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

/* ==========================================
   ROOT VARIABLES & BASE
   ========================================== */
:root {
    --bg-dark: #0f172a;              /* Темна синя основа */
    --bg-body: #05070a;              /* Найтемніший фон body */
    --bg-panel: rgba(15, 23, 42, 0.85);
    --glow-color: #d4af37;           /* Базовий ЗОЛОТИЙ колір Astro Insight */
    --glow-color-dim: rgba(212, 175, 55, 0.2); 
    --glow-color-mid: rgba(212, 175, 55, 0.4); 
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --color-success: #22c55e;        
    --color-success-hover: #16a34a;
    --color-danger: #ef4444;         
}

html { 
    scroll-behavior: smooth; 
    background-color: var(--bg-body); 
}

body {
    margin: 0; padding: 0; 
    font-family: 'Playfair Display', serif; 
    color: var(--text-main);
    background-color: transparent; 
    min-height: 100vh;
    position: relative;
}

/* ФІКСОВАНИЙ CANVAS ДЛЯ ЗІРОК */
#starlight-canvas {
    display: block;
    position: fixed;
    top: 15px; left: 0;
    width: 100vw; height: calc(100vh - 15px);
    background: radial-gradient(circle at center, var(--bg-dark) 0%, var(--bg-body) 100%);
    background-size: cover;       
    background-repeat: no-repeat; 
    z-index: -1;
    pointer-events: none;
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    background: rgba(5, 7, 10, 0.9); backdrop-filter: blur(10px);
    display: flex; justify-content: space-between; align-items: center; gap: 30px;
    padding: 15px 20px; z-index: 1000;
    border-bottom: 1px solid var(--glow-color);
    transition: border-color 0.8s ease;
}

/* ==========================================
   SITE LOGO STYLES (Synced with Aura System)
   ========================================== */
#site-logo-container {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px; /* Захист від деформації у flex-box */
    min-height: 80px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    
    /* НАЙГОЛОВНІШИЙ РЯДОК: відсікає все, що намагається вилізти за межі 50х50 */
    overflow: visible !important; 
    
    transition: opacity 0.4s ease; 
}

#site-logo-container svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: contain; /* Гарантує, що логотип впишеться без спотворень */
}

#site-logo-container:hover svg {
    /* При наведенні світіння стає яскравішим і ширшим (використовуємо --glow-color-mid, якщо хочеш, або просто --glow-color) */
    filter: drop-shadow(0 0 15px var(--glow-color, #d4af37));
    transform: scale(2.5); /* Збільшення розміру логотипу при наведенні */
}

/* Застосовуємо колір Аури до всіх ліній та контурів логотипу */
#site-logo-container .cls-1,
#site-logo-container .cls-3,
#site-logo-container .cls-4 {
    stroke: var(--glow-color, #d4af37) !important;
    transition: stroke 0.5s ease;
}

/* Застосовуємо колір Аури до заповнених частин логотипу */
#site-logo-container .cls-2 {
    fill: var(--glow-color, #d4af37) !important;
    transition: fill 0.5s ease;
}

.nav-links { display: flex; align-items: center; gap: 15px; }
.nav-links a { color: var(--text-main); text-decoration: none; font-size: 1.1rem; transition: 0.3s; }
.nav-links a:hover { color: var(--glow-color); }
.nav-logo-link { text-decoration: none; color: inherit; display: flex; align-items: center; }

.reset-btn {
    background: transparent; border: 1px solid var(--text-muted);
    color: var(--text-muted); padding: 5px 12px; border-radius: 15px;
    font-size: 0.9rem; cursor: pointer; transition: 0.3s; margin-left: 10px;
    font-family: 'Playfair Display', serif;
}
.reset-btn:hover { border-color: var(--glow-color); color: var(--glow-color); }

/* ==========================================
   MAIN LAYOUT & CARDS
   ========================================== */
.container {
    position: relative; z-index: 1; width: 95%; max-width: 1000px;
    margin: 100px auto 40px; text-align: center;
}

header h1 { font-size: 3.5rem; color: var(--glow-color); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 3px; font-weight: 700;}
.subtitle { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 20px; font-style: italic;}

section {
    background: var(--bg-panel); backdrop-filter: blur(5px);
    padding: 30px; border-radius: 8px; margin-bottom: 30px;
    border: 1px solid var(--glow-color-dim);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    transition: border-color 0.8s ease, box-shadow 0.8s ease;
}
section:hover { border-color: var(--glow-color); box-shadow: 0 0 20px rgba(0,0,0,0.6);}
section h3 { font-size: 2rem; margin-top: 0; color: var(--text-main); font-weight: 400;}

.omen-box { border-left: 3px solid var(--glow-color); display: flex; justify-content: center; gap: 10px; font-size: 1.2rem;}
.omen-label { font-weight: bold; color: var(--glow-color);}

.two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 30px; }

/* Forms & Inputs */
.selector-group, .ask-input-group { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 15px 0; }
select, input { padding: 12px; background: rgba(0,0,0,0.5); color: white; border: 1px solid var(--text-muted); border-radius: 4px; outline: none; font-family: 'Playfair Display', serif; font-size: 1.1rem;}
select:focus, input:focus { border-color: var(--glow-color); }
.ask-input-group input { width: 70%; }
.plus-icon { font-size: 2rem; color: var(--glow-color); }

.glow-btn {
    padding: 12px 25px; background: var(--glow-color); border: none; border-radius: 4px;
    color: var(--bg-body); font-weight: bold; cursor: pointer; transition: 0.3s; text-transform: uppercase; letter-spacing: 1px; font-family: 'Playfair Display', serif; font-size: 1rem;
}
.glow-btn:hover { background: var(--text-main); box-shadow: 0 0 15px var(--glow-color); }
.glow-btn.outline { background: transparent; border: 1px solid var(--glow-color); color: var(--glow-color); }
.glow-btn.outline:hover { background: var(--glow-color); color: var(--bg-body); }
.glow-btn.success-btn { background: var(--color-success); color: var(--bg-body); }
.glow-btn.success-btn:hover { background: var(--color-success-hover); box-shadow: 0 0 15px var(--color-success); }

.result-text { margin-top: 15px; font-style: italic; color: var(--glow-color); font-size: 1.2rem; min-height: 25px;}

/* Zodiac Grid */
.zodiac-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; }
.card {
    background: rgba(0,0,0,0.4); padding: 25px 10px; border-radius: 8px; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.05); transition: 0.5s;
}
.card:hover { transform: translateY(-5px); border-color: var(--glow-color); background: rgba(0,0,0,0.7);}
.card .icon { font-size: 3rem; margin-bottom: 10px; transition: color 0.8s; }
.card h3 { margin: 0 0 5px 0; font-size: 1.4rem; }
.sign-motto { font-size: 0.9rem; color: var(--text-muted); font-style: italic; }

/* 3D Tarot */
.tarot-grid { display: flex; justify-content: center; gap: 20px; margin-top: 25px; flex-wrap: wrap; perspective: 1000px; }
.tarot-card { width: 130px; height: 210px; cursor: pointer; background: transparent; border: none; padding: 0;}
.tarot-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-style: preserve-3d; }
.tarot-card.flipped .tarot-inner { transform: rotateY(180deg); }
.tarot-front, .tarot-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 8px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 10px; }
.tarot-front { background: rgba(0,0,0,0.8); border: 2px solid var(--glow-color); color: var(--glow-color); font-size: 3.5rem; }
.tarot-back { background: var(--bg-panel); border: 2px solid var(--text-main); transform: rotateY(180deg); }
.tarot-title { color: var(--glow-color); font-size: 0.9rem; margin-bottom: 15px; font-style: italic;}
.tarot-name { font-weight: bold; font-size: 1.2rem; color: var(--text-main);}

/* ==========================================
   MODAL, TABS & ATTRIBUTES
   ========================================== */
.modal { 
    display: none; position: fixed; z-index: 2000; left: 0; top: 0; 
    width: 100%; height: 100%; background-color: rgba(0,0,0,0.85); overflow-y: auto;
}
.modal-content { 
    background-color: var(--bg-panel); border: 2px solid var(--glow-color); 
    width: 85%; max-width: 750px; max-height: 85vh; border-radius: 12px; 
    position: relative; box-shadow: 0 0 40px rgba(0,0,0,0.8);
    display: flex; flex-direction: column; margin: 100px auto 40px; 
}
.modal-header { flex: 0 0 auto; display: flex; justify-content: flex-end; padding: 10px 15px; background: rgba(0,0,0,0.2); }
.close-btn { font-size: 28px; cursor: pointer; color: var(--glow-color); line-height: 1; padding: 5px; }
.close-btn:hover { color: white; }
.modal-body { padding: 25px; overflow-y: auto; flex: 1; }
.glow-text { color: var(--glow-color); margin-top: 0; text-transform: uppercase; letter-spacing: 2px; font-size: 2.2rem; }

.modal-tabs { display: flex; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px; }
.tab-btn { flex: 1; background: transparent; border: none; color: var(--text-muted); padding: 12px; cursor: pointer; border-bottom: 3px solid transparent; font-family: 'Playfair Display', serif; font-size: 1.05rem; }
.tab-btn.active { color: var(--glow-color); border-bottom-color: var(--glow-color); font-weight: bold; }
.tab-content { display: none; line-height: 1.6; text-align: left; font-size: 1.1rem; }
.tab-content.active-content { display: block; animation: fadeIn 0.4s; }

.lucky-attributes { 
    display: flex; justify-content: space-between; align-items: center; gap: 15px; 
    background: rgba(0,0,0,0.4); padding: 15px; border-radius: 6px; 
    margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.1); flex-wrap: wrap;
}
.attribute-box { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.attr-label { color: var(--text-muted); font-style: italic; }
.attr-value { font-weight: bold; color: var(--text-main); }
.modal-actions { display: flex; flex-direction: row; gap: 15px; margin-top: 25px; }
.modal-actions button { flex: 1; padding: 12px; }

/* ==========================================
   DROPDOWN MENU FOR ARTICLES
   ========================================== */
.nav-dropdown { position: relative; display: inline-block; padding-bottom: 15px; margin-bottom: -15px; }
.nav-dropdown .dropbtn { cursor: pointer; color: var(--text-main); text-decoration: none; font-size: 1.1rem; transition: 0.3s; }
.nav-dropdown:hover .dropbtn { color: var(--glow-color); }
.dropdown-content {
    display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    background: rgba(5, 7, 10, 0.95); backdrop-filter: blur(15px); min-width: 180px;
    box-shadow: 0px 8px 32px rgba(0, 0, 0, 0.7); border: 1px solid var(--glow-color-dim);
    border-radius: 6px; z-index: 1010; padding: 6px 0; transition: all 0.3s ease;
}
.dropdown-content::before {
    content: ''; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
    border: 6px solid transparent; border-bottom-color: var(--glow-color-dim);
}
.dropdown-content a { color: var(--text-main); padding: 10px 18px; text-decoration: none; display: block; font-size: 1rem; text-align: left; transition: 0.2s; font-family: 'Playfair Display', serif; }
.dropdown-content a:hover { background: rgba(212, 175, 55, 0.1); color: var(--glow-color); }
.nav-dropdown:hover .dropdown-content { display: block; border-color: var(--glow-color); }

.mobile-submenu {
    display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 5px 0 15px 0;
    padding: 5px; background: rgba(255, 255, 255, 0.02); border-radius: 6px; width: 80%;
}
.mobile-submenu a { font-size: 1rem !important; color: var(--text-muted) !important; }
.mobile-submenu a:hover { color: var(--glow-color) !important; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================
   PERSONAL GRIMOIRE (Archive)
   ========================================== */
.archive-item { 
    background: rgba(0,0,0,0.4); padding: 15px; border-radius: 4px; margin-top: 15px; 
    border-left: 3px solid var(--glow-color); text-align: left; cursor: pointer;
    transition: all 0.3s ease; display: flex; justify-content: space-between; align-items: center;
}
.archive-item:hover { background: rgba(0,0,0,0.7); transform: translateX(5px); border-color: var(--text-main); }
.archive-info { flex-grow: 1; }
.archive-date { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 5px; font-style: italic; }
.delete-btn { background: transparent; border: none; color: var(--text-muted); font-size: 1.8rem; cursor: pointer; padding: 0 10px; transition: color 0.3s; line-height: 1; }
.delete-btn:hover { color: var(--color-danger); }

/* ==========================================
   MOBILE MENU BASE
   ========================================== */
.hamburger { display: none; flex-direction: column; gap: 6px; cursor: pointer; z-index: 2001; }
.hamburger span { width: 30px; height: 3px; background: var(--glow-color); transition: 0.3s; border-radius: 2px;}

.mobile-menu {
    position: fixed; top: 0; right: -100%; width: 100vw; height: 100vh;
    background: rgba(5, 7, 10, 0.98); backdrop-filter: blur(15px);
    z-index: 2000; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 35px;
    transition: 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
}
.mobile-menu.open { right: 0; }
.close-menu { position: absolute; top: 20px; right: 30px; font-size: 50px; color: var(--glow-color); cursor: pointer; }
.mobile-menu a { font-size: 2.2rem; color: var(--text-main); text-decoration: none; text-transform: uppercase; letter-spacing: 2px;}
.mobile-menu a:hover { color: var(--glow-color); }

/* ==========================================
   ABOUT SECTION
   ========================================== */
.about-container { max-width: 1000px; margin: 120px auto 60px; padding: 40px; background: var(--bg-panel); border-radius: 8px; border: 1px solid var(--glow-color-dim); box-shadow: 0 8px 32px rgba(0,0,0,0.5); text-align: center; }
.about-intro h1 { font-size: 2.8rem; color: var(--glow-color); margin-bottom: 20px; font-family: 'Playfair Display', serif; text-transform: uppercase; letter-spacing: 2px; }
.hero-text { font-size: 1.15rem; line-height: 1.7; color: var(--text-muted); max-width: 800px; margin: 0 auto 50px; font-family: sans-serif; }
.about-features h2 { font-size: 1.8rem; color: var(--text-main); margin-bottom: 30px; font-weight: 400; }
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; text-align: left; }
.feature-card { background: rgba(0, 0, 0, 0.4); padding: 25px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.05); transition: transform 0.4s ease, border-color 0.4s ease; }
.feature-card:hover { transform: translateY(-5px); border-color: var(--glow-color); background: rgba(0, 0, 0, 0.7); }
.feature-card h4 { font-size: 1.25rem; margin-top: 0; margin-bottom: 12px; color: var(--glow-color); font-family: 'Playfair Display', serif; }
.feature-card p { font-size: 1rem; line-height: 1.6; margin: 0; color: var(--text-muted); }

/* ==========================================
   STATIC PAGES BACKGROUND
   ========================================== */
body.static-page { background: radial-gradient(circle at center, var(--bg-dark) 0%, var(--bg-body) 100%) !important; background-size: cover !important; background-repeat: no-repeat !important; }

/* ==========================================
   HELP CENTER & FAQ
   ========================================== */
.faq-container { max-width: 800px; margin: 120px auto 60px; padding: 40px; background: var(--bg-panel); border-radius: 8px; border: 1px solid var(--glow-color-dim); box-shadow: 0 8px 32px rgba(0,0,0,0.5); text-align: left; }
.faq-header { border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; margin-bottom: 35px; text-align: center; }
.faq-header h1 { font-size: 2.5rem; color: var(--glow-color); margin: 0 0 10px 0; text-transform: uppercase; letter-spacing: 2px;}
.faq-header p { font-size: 1.1rem; color: var(--text-muted); margin: 0; font-family: sans-serif; }
.faq-category-title { font-size: 1.3rem; color: var(--text-main); margin: 30px 0 15px 0; font-weight: 400; letter-spacing: 1px; display: flex; align-items: center; }
.faq-category-title::after { content: ''; flex-grow: 1; margin-left: 15px; height: 1px; background: rgba(255, 255, 255, 0.05); }
details { background: rgba(255, 255, 255, 0.01); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 6px; margin-bottom: 12px; padding: 16px 20px; transition: all 0.3s ease; }
details[open] { border-color: var(--glow-color-mid); background: rgba(255, 255, 255, 0.03); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); }
summary { font-size: 1.1rem; color: var(--text-main); font-family: sans-serif; cursor: pointer; list-style: none; position: relative; padding-right: 30px; font-weight: 400; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '→'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--text-muted); transition: transform 0.3s ease, color 0.3s ease; }
details[open] summary::after { transform: translateY(-50%) rotate(90deg) !important; color: var(--glow-color); }
details p, details ul { margin-top: 15px; margin-bottom: 0; font-family: sans-serif; color: var(--text-muted); font-size: 1rem; line-height: 1.6; }
details li { margin-bottom: 8px; }
.faq-footer { text-align: center; margin-top: 50px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.05); }
.faq-footer h3 { color: var(--text-main); font-size: 1.4rem; font-weight: 400; margin: 0 0 10px 0; }
.faq-footer p { color: var(--text-muted); font-family: sans-serif; }
.faq-footer a { color: var(--glow-color); text-decoration: none; }
.faq-footer a:hover { text-decoration: underline; }

/* ==========================================
   PRIVACY POLICY & TERMS
   ========================================== */
.privacy-container, .terms-container { max-width: 800px; margin: 120px auto 60px; padding: 40px; background: var(--bg-panel); border-radius: 8px; border: 1px solid var(--glow-color-dim); box-shadow: 0 8px 32px rgba(0,0,0,0.5); text-align: left; }
.privacy-header, .terms-header { border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; margin-bottom: 30px; text-align: center; }
.privacy-header h1, .terms-header h1 { font-size: 2.5rem; color: var(--glow-color); margin: 0 0 10px 0; text-transform: uppercase; letter-spacing: 2px;}
.privacy-intro-summary { background: rgba(255, 255, 255, 0.03); border-left: 3px solid var(--glow-color); padding: 20px; margin-bottom: 40px; border-radius: 0 4px 4px 0; }
.privacy-section, .terms-section { margin-bottom: 35px; }
.privacy-section h2, .terms-section h2 { font-size: 1.4rem; color: var(--text-main); margin-bottom: 15px; font-weight: 400; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 5px; }
.privacy-section p, .privacy-section li, .terms-section p, .terms-section li { font-size: 1.05rem; line-height: 1.7; color: var(--text-muted); margin-bottom: 12px; font-family: sans-serif; }
.privacy-section ul, .terms-section ul { padding-left: 20px; margin-bottom: 15px; }
.privacy-section strong, .terms-section strong { color: var(--glow-color); font-weight: normal; }
.hr-divider { border: 0; height: 1px; background: linear-gradient(to right, transparent, var(--glow-color-dim), transparent); margin: 30px 0; }
.last-updated { font-size: 1rem; color: var(--text-muted); font-style: italic; margin: 0; }

/* ==========================================
   CONTACT SUPPORT
   ========================================== */
.contact-container { max-width: 900px; margin: 120px auto 60px; padding: 40px; background: var(--bg-panel); border-radius: 8px; border: 1px solid var(--glow-color-dim); box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
.contact-header { border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; margin-bottom: 40px; text-align: center; }
.contact-header h1 { font-size: 2.5rem; color: var(--glow-color); margin: 0 0 10px 0; text-transform: uppercase; letter-spacing: 2px;}
.contact-header p { font-size: 1.1rem; color: var(--text-muted); margin: 0; font-family: sans-serif; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; text-align: left; }
.contact-info h2 { font-size: 1.5rem; color: var(--text-main); margin-top: 0; margin-bottom: 15px; font-weight: 400; }
.contact-info p { font-size: 1.05rem; line-height: 1.6; color: var(--text-muted); font-family: sans-serif; margin-bottom: 25px; }
.info-details { list-style: none; padding: 0; margin: 0 0 30px 0; }
.info-details li { font-family: sans-serif; color: var(--text-muted); margin-bottom: 15px; display: flex; align-items: center; font-size: 1rem; }
.info-details strong { color: var(--glow-color); font-weight: normal; margin-right: 8px; }
.social-links { display: flex; gap: 15px; }
.social-links a { color: var(--text-muted); font-family: sans-serif; text-decoration: none; font-size: 0.95rem; border: 1px solid rgba(255, 255, 255, 0.1); padding: 8px 15px; border-radius: 4px; transition: all 0.3s ease; }
.social-links a:hover { border-color: var(--glow-color); color: var(--glow-color); }
.contact-form { background: rgba(0,0,0,0.3); padding: 30px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.05); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; color: var(--text-muted); margin-bottom: 8px; font-family: sans-serif; font-size: 0.95rem; }
.form-group input, .form-group textarea { width: 100%; box-sizing: border-box; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.1); color: white; padding: 12px 15px; border-radius: 4px; font-family: sans-serif; font-size: 1rem; transition: border-color 0.3s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--glow-color); }
.form-group textarea { resize: vertical; min-height: 120px; }
.submit-btn { width: 100%; padding: 14px; background: var(--glow-color); color: var(--bg-body); border: none; border-radius: 4px; font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: all 0.3s ease; }
.submit-btn:hover { background: var(--text-main); box-shadow: 0 0 15px var(--glow-color); }

/* ==========================================
   GLOBAL SITE FOOTER
   ========================================== */
.site-footer { text-align: center; padding: 40px 20px 20px; margin-top: 50px; border-top: 1px solid var(--glow-color-dim); color: var(--text-muted); font-family: sans-serif; font-size: 0.95rem; }
.site-footer p { margin: 0 0 15px 0; }
.footer-links { display: flex; justify-content: center; align-items: center; gap: 15px; flex-wrap: wrap; }
.footer-links a { color: var(--glow-color); text-decoration: none; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--text-main); text-shadow: 0 0 8px var(--glow-color); }
.footer-links .divider { color: rgba(255, 255, 255, 0.2); }

/* ==========================================
   ASTRO-COMPATIBILITY PREMIUM WIDGET
   ========================================== */
.compatibility-section { padding: 60px 20px; display: flex; justify-content: center; align-items: center; }
.compatibility-container { background: transparent; border: none; padding: 40px 30px; max-width: 650px; width: 100%; text-align: center; box-shadow: none; }
.compatibility-container h2 { font-family: 'Playfair Display', serif; font-size: 2.2rem; color: var(--text-main); margin-top: 0; margin-bottom: 10px; text-shadow: 0 0 10px rgba(212, 175, 55, 0.2); }
.compatibility-subtitle { font-family: sans-serif; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 35px; }
.compatibility-form { display: flex; justify-content: space-between; align-items: flex-end; gap: 15px; margin-bottom: 35px; }
.select-group { flex: 1;display:flex; flex-direction: column; gap: 15px;text-align: left; }
.input-wrapper { display: flex; flex-direction: column; gap: 8px; }
.select-group label { font-family: sans-serif; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--glow-color); padding-left: 5px; }
.cosmic-connector { font-size: 1.5rem; color: var(--glow-color); padding-bottom: 8px; text-shadow: 0 0 10px var(--glow-color); animation: pulseGlow 2s infinite ease-in-out; }
.compat-btn { background: var(--glow-color); border: none; border-radius: 8px; padding: 14px 35px; color: var(--bg-body); font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: bold; text-transform: uppercase; cursor: pointer; letter-spacing: 1px; transition: all 0.3s ease; box-shadow: 0 0 10px rgba(212, 175, 55, 0.4); }
.compat-btn:hover { transform: translateY(-2px); background: var(--text-main); color: var(--bg-body); box-shadow: 0 0 20px var(--glow-color); }
.compat-btn:active { transform: translateY(1px); }
.compat-result-box { margin-top: 30px; padding: 20px; background: rgba(5, 7, 10, 0.6); border-left: 3px solid var(--glow-color); border-radius: 4px 8px 8px 4px; text-align: left; font-family: 'Playfair Display', serif; font-size: 1.1rem; line-height: 1.6; color: var(--text-main); animation: fadeIn 0.5s ease-out; }
#compatibility-result { margin-top: 30px; text-align: center; border: none; box-shadow: none; background: transparent; padding: 0; }
.compat-score-circle { width: 140px; height: 140px; margin: 0 auto 25px; border-radius: 50%; background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, rgba(5, 7, 10, 0.8) 100%); border: 2px solid var(--glow-color); box-shadow: 0 0 30px rgba(212, 175, 55, 0.3); display: flex; align-items: center; justify-content: center; font-size: 3.8rem; font-family: 'Playfair Display', serif; color: var(--glow-color); }
.compat-analytics { display: flex; flex-direction: column; gap: 15px; text-align: left; }
.insight-box { padding: 15px 20px; border-radius: 8px; background: rgba(255, 255, 255, 0.03); border-left: 4px solid; }
.strength-box { border-left-color: #4CAF50; }
.growth-box { border-left-color: #FF9800; }
.insight-box h4 { margin: 0 0 8px 0; font-size: 1.1rem; letter-spacing: 1px; }
.insight-box p { margin: 0; font-size: 0.95rem; color: var(--text-main); line-height: 1.5; }

@keyframes pulseGlow { 0%, 100% { opacity: 0.6; text-shadow: 0 0 5px var(--glow-color); } 50% { opacity: 1; text-shadow: 0 0 15px var(--glow-color), 0 0 25px var(--glow-color); } }

/* ==========================================
   BLOG POST STYLES & ZODIAC ARTICLES
   ========================================== */
.blog-post { max-width: 800px; margin: 0 auto; padding: 20px; background: rgba(5, 7, 10, 0.6); border-radius: 12px; border: 1px solid rgba(212, 175, 55, 0.2); box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); }
.blog-header { text-align: center; margin-bottom: 40px; }
.blog-title { color: var(--glow-color); font-size: 2.5rem; line-height: 1.3; margin-bottom: 15px; letter-spacing: 1px; }
.blog-meta { color: var(--text-muted); font-style: italic; font-size: 1rem; border-bottom: 1px solid rgba(212, 175, 55, 0.3); padding-bottom: 20px; }
.blog-content { color: var(--text-main); font-size: 1.15rem; line-height: 1.8; text-align: left; }
.blog-content h2 { color: var(--glow-color); margin-top: 40px; margin-bottom: 20px; font-size: 1.8rem; letter-spacing: 1px; }
.blog-content p { margin-bottom: 20px; }

.zodiac-table th, .zodiac-table td { padding: 15px; border-bottom: 1px solid rgba(212, 175, 55, 0.3); text-align: left; }
.zodiac-table th { color: var(--glow-color); font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }
.zodiac-table tr:hover { background: rgba(212, 175, 55, 0.05); }

.articles-container { padding-top: 100px; padding-bottom: 50px; }
.page-title { text-align: center; color: var(--glow-color, #d4af37); font-size: 2.5rem; margin-bottom: 10px; text-shadow: 0 0 15px rgba(212, 175, 55, 0.5); }
.page-subtitle { text-align: center; color: #ccc; margin-bottom: 50px; }
.zodiac-article-block { background: rgba(20, 20, 30, 0.7); border-left: 4px solid var(--glow-color, #d4af37); border-radius: 0 8px 8px 0; padding: 30px; margin-bottom: 40px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); transition: transform 0.3s ease, border-color 0.3s ease; }
.zodiac-article-block:hover { transform: translateX(10px); }
.zodiac-article-block h2 { color: #fff; margin-bottom: 15px; font-size: 1.8rem; display: flex; align-items: center; gap: 10px; }
.article-content p { color: #ddd; line-height: 1.6; margin-bottom: 15px; }

/* ==========================================
   SVG ICONS & WIDGET SELECTS
   ========================================== */

/* 1. Гнучкий розмір (для карток та модалок Celestial Readings) */
.zodiac-svg-icon { 
    width: 50%; 
    height: 50%; 
    display: inline-block; 
    vertical-align: middle; 
}

/* 2. Обмеження 100px ТІЛЬКИ для випадаючих списків сумісності */
.selected-content .zodiac-svg-icon,
.custom-option .zodiac-svg-icon {
    width: 100px !important; 
    height: 100px !important; 
    margin-right: 2px;
}

/* 3. Збережені ефекти світіння та ховеру (Vector Minimalism) */
.zodiac-svg-icon circle, .zodiac-svg-icon path { fill: var(--glow-color) !important; transition: fill 0.3s ease, filter 0.3s ease; }
.zodiac-card:hover .zodiac-svg-icon circle, .zodiac-card:hover .zodiac-svg-icon path { fill: #ffffff !important; filter: drop-shadow(0 0 8px var(--glow-color)); }

/* ========================================== */

.custom-select { position: relative; width: 100%; min-width: 220px; }
.select-trigger { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: rgba(20, 20, 30, 0.8); border: 1px solid rgba(212, 175, 55, 0.4); border-radius: 8px; color: #fff; cursor: pointer; transition: all 0.3s ease; }
.select-trigger:hover { border-color: var(--glow-color, #d4af37); box-shadow: 0 0 10px rgba(212, 175, 55, 0.2); }
.selected-content { display: flex; align-items: center; gap: 12px; }
.custom-options { position: absolute; top: 100%; left: 0; width: 100%; background: #12121a; border: 1px solid rgba(212, 175, 55, 0.4); border-radius: 8px; margin-top: 5px; padding: 0; list-style: none; max-height: 190px; overflow-y: auto; z-index: 100; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s ease; }
.custom-options.open { opacity: 1; visibility: visible; transform: translateY(0); }
.custom-option { display: flex; align-items: center; padding: 8px 16px; gap: 10px; cursor: pointer; color: #fff; font-size: 0.95rem; transition: background 0.2s; }
.custom-option:hover { background: rgba(212, 175, 55, 0.15); }
.dropdown-icon { width: 20px; height: 20px; display: flex; justify-content: center; align-items: center; color: var(--glow-color, #d4af37); }
.dropdown-icon svg { width: 100%; height: 100%; fill: currentColor; display: block; }

/* ==========================================
   MODAL TITLE LINK
   ========================================== */
.modal-title-link { color: var(--glow-color, #d4af37); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: all 0.3s ease; cursor: pointer; }
.modal-title-link:hover { text-shadow: 0 0 15px var(--glow-color, #d4af37); transform: scale(1.05); }
.modal-title-link .link-icon { font-size: 0.6em; opacity: 0.7; transition: transform 0.3s ease; }
.modal-title-link:hover .link-icon { transform: translate(3px, -3px); }

/* ==========================================
   CONSOLIDATED TABLET & MOBILE MÓDOSÍTÁSOK (1024px, 768px, 480px)
   ========================================== */
@media (max-width: 1024px) {
    .zodiac-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    /* Performance */
    *, *::before, *::after {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    /* Navigation */
    #desktopNav { display: none; } 
    .hamburger { display: flex; flex-direction: column; gap: 6px; cursor: pointer; } 
    
    /* Typography Scaling */
    header h1 { font-size: 2.2rem; margin-top: 10px;}
    .subtitle { font-size: 1rem; }
    section h3 { font-size: 1.6rem; }
    .blog-title, .faq-header h1, .contact-header h1, .terms-header h1, .privacy-header h1, .about-intro h1, .page-title { 
        font-size: 1.8rem; 
    }
    
    /* Spacing & Layouts */
    section { padding: 20px 15px; }
    .two-col-grid { grid-template-columns: 1fr; gap: 20px;}
    .contact-grid { grid-template-columns: 1fr; gap: 30px; }
    
    /* Zodiac Grids */
    .zodiac-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .card { padding: 15px 5px; }
    .card .icon { font-size: 2.5rem; }
    .card h3 { font-size: 1.1rem; }
    
    /* Tarot Cards (FIXED ASPECT RATIO) */
    .tarot-grid { 
        flex-direction: row; 
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 15px;
    }
    .tarot-card { 
        width: 30%; 
        min-width: 90px; 
        max-width: 120px; 
        height: 170px; /* Restored tall card shape */
    } 
    
    /* Forms & Inputs */
    .ask-input-group, .selector-group { flex-direction: column; width: 100%; }
    .ask-input-group input, .selector-group select { width: 100%; }
    .glow-btn, .submit-btn, input, select { width: 100%; min-height: 48px; }
    
    /* Fortune Modal */
    .modal-content { 
        width: 95% !important; 
        margin: 80px auto 20px !important; 
        padding: 25px 15px; 
    }
    .modal-body { padding: 15px; }
    .glow-text { font-size: 1.8rem !important; }
    .modal-tabs { flex-wrap: wrap; }
    .tab-btn { flex: 1 1 100%; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 10px;}
    .modal-actions { flex-direction: column; gap: 10px;}
    
    /* Modal Attributes (FIXED STACKING) */
    .lucky-attributes { 
        flex-direction: column; 
        align-items: stretch; 
        gap: 12px; 
    }
    .attribute-box {
        justify-content: space-between;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        padding-bottom: 5px;
    }
    .attribute-box:last-child { border-bottom: none; }
    .attribute-box.energy-box { justify-content: center !important; text-align: center; }

    /* Compatibility Widget */
    .compatibility-section { padding: 40px 15px; }
    .compatibility-container { padding: 25px 15px; }
    .compatibility-form { flex-direction: column; align-items: stretch; gap: 15px; margin-bottom: 25px; }
    .select-group { width: 100%; }
    .custom-select { min-width: 100%; } /* Prevents overflow */
    .cosmic-connector { transform: rotate(90deg); margin: 10px 0; padding-bottom: 0; }
    .compat-btn { width: 100%; }
    
    /* Articles & Static Pages (FIXED RIGHT SHIFT) */
    .privacy-container, .faq-container, .contact-container, .about-container, .terms-container { 
        margin: 100px auto 40px; 
        width: 92%;
        padding: 25px 15px; 
    }
    .blog-post, .zodiac-article-block {
        padding: 20px 15px;
        border-radius: 8px;
    }

    /* About Page Mobile Fixes */
    .features-grid { grid-template-columns: 1fr; gap: 20px; }
    .hero-text { font-size: 1.05rem; margin-bottom: 30px; }
    .feature-card { padding: 20px 15px; }
}

@media (max-width: 480px) {
    /* Typography */
    header h1 { font-size: 1.8rem; }
    .subtitle { font-size: 0.9rem; }
    .blog-title { font-size: 1.5rem; }
    .glow-text { font-size: 1.5rem !important; }

    /* Zodiac Grid */
    .zodiac-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .card { padding: 12px 5px; }
    .card .icon { font-size: 2rem; }
    .card h3 { font-size: 1rem; }

    /* Tarot Card scaling for very small screens (iPhone SE) */
    .tarot-card { 
        width: 45%; 
        max-width: 130px; 
        height: 160px; 
    }

    /* Fortune Modal */
    .modal-content { margin: 85px auto 20px !important; padding: 20px 12px; }

    /* Compatibility */
    .compat-score-circle {
        width: 110px;
        height: 110px;
        font-size: 2.8rem;
    }

    /* Compact static page margins for very small screens */
    .privacy-container, .faq-container, .contact-container, .about-container, .terms-container { 
        margin: 85px auto 30px; 
        width: 95%; 
        padding: 20px 10px; 
    }
}
@media (min-width: 769px) {
    #planetsGrid {
        grid-template-columns: repeat(5, 1fr);
    }
}
.site-footer .social-links {
    display: flex;
    justify-content: center !important; /* A !important biztosítja, hogy felülírja a korábbi szabályokat */
    align-items: center;
    width: 100%; /* Kényszeríti, hogy a doboz kitöltse a teret, így van mihez képest középre kerülnie */
    margin-top: 25px;
    gap: 20px;
}


/* ==========================================
   DYNAMIC LOGO GLOW SYSTEM
   ========================================== */
.nav-logo {
    display: flex;
    align-items: center;
    max-height: 60px; /* Примусовий ліміт висоти для шапки, щоб вона не розтягувалася */
}

/* Базовий стан контейнера */
.logo-svg-container {
    width: 100px; /* Компактний розмір для шапки */
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--glow-color, #d4af37); 
    /* Базове легке світіння */
    filter: drop-shadow(0 0 6px var(--glow-color, rgba(212, 175, 55, 0.4)));
    transition: filter 0.4s ease, color 0.4s ease;
    display: inline-block;
}

/* Базовий стан самого малюнка (Зум) */
.logo-svg-container svg {
    width: 100%;
    height: 100%;
    display: block;
    transform: scale(1.8); /* Відсікаємо пусті поля вектора */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Плавна анімація з ефектом пружинки */
}

/* 🪄 МАГІЯ ПРИ НАВЕДЕННІ (HOVER) */
.nav-logo:hover .logo-svg-container {
    /* Посилюємо світіння навколо логотипу */
    filter: drop-shadow(0 0 15px var(--glow-color, rgba(212, 175, 55, 0.9))); 
}

.nav-logo:hover .logo-svg-container svg {
    /* Логотип ще більше збільшується при наведенні */
    transform: scale(2); 
}
/* ==========================================
   PHASE 2: CUSTOM DATE PICKER DESIGN
   ========================================== */

/* 1. Стилізуємо саме поле вводу (робимо його схожим на custom-select) */
input[type="date"].gold-select {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: rgba(15, 23, 42, 0.6); /* Темний напівпрозорий фон сайту */
    border: 1px solid rgba(212, 175, 55, 0.4); /* Приглушена золота рамка */
    border-radius: 8px; /* Заокруглення як у дропдаунах */
    color: #e2e8f0; /* Світлий текст */
    font-family: inherit; /* Успадковує шрифт сайту */
    font-size: 1rem;
    padding: 12px 15px; /* Просторі відступи */
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Легка внутрішня тінь для об'єму */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    color-scheme: dark; /* Підтримка темної теми */
}

/* 2. Ефект при наведенні та кліку (фокусі) */
input[type="date"].gold-select:hover,
input[type="date"].gold-select:focus {
    border-color: var(--glow-color, #d4af37); /* Рамка стає яскраво-золотою */
    background: rgba(20, 30, 50, 0.8);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 3. Перефарбовуємо іконку календарика браузера в золото */
input[type="date"].gold-select::-webkit-calendar-picker-indicator {
    background-color: transparent;
    cursor: pointer;
    opacity: 0.7;
    /* CSS-магія: перетворюємо чорну іконку на золоту за допомогою фільтрів */
    filter: invert(75%) sepia(40%) saturate(600%) hue-rotate(350deg) brightness(100%);
    transition: all 0.3s ease;
    padding: 2px;
}

/* 4. Іконка календарика світиться при наведенні */
input[type="date"].gold-select::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    filter: invert(85%) sepia(50%) saturate(800%) hue-rotate(350deg) brightness(120%);
    transform: scale(1.1); /* Трохи збільшується */
}
/* ==========================================
   UI/UX FIX: WIDE COMPATIBILITY RESULTS (PREMIUM GLASSMORPHISM)
   ========================================== */

/* 1. Головний контейнер результатів (Вириваємо за межі батьківського блоку) */
#compatibilityResult {
    width: 90vw; /* Займає 90% ширини екрану */
    max-width: 950px; /* Достатньо місця для комфортного читання */
    position: relative;
    left: 50%;
    transform: translateX(-50%); /* Ідеальне центрування відносно всього екрану */
    
    margin-top: 50px; /* Більше простору від кнопки */
    padding: 40px; /* Дихаючий простір всередині */
    
    /* Естетика Astro Insight: Матове скло та золото */
    background: rgba(15, 23, 42, 0.65); 
    backdrop-filter: blur(12px); /* Ефект матового скла */
    -webkit-backdrop-filter: blur(12px);
    
    border: 1px solid rgba(212, 175, 55, 0.3); /* Ніжна золота рамка */
    border-radius: 16px; /* Більш сучасне, м'яке заокруглення */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05); /* Глибока тінь + верхній блік */
    box-sizing: border-box;
    z-index: 10;
}

/* 2. Обгортка для блоків аналітики */
.compat-analytics {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px; /* Більша відстань між натальною базою та транзитами */
    margin-top: 35px;
}

/* 3. Внутрішні інформаційні блоки (Planetary Analysis та Astro-Weather) */
.insight-box {
    width: 100% !important; /* Розтягуємо на всю доступну ширину */
    padding: 25px 30px; 
    background: rgba(0, 0, 0, 0.55); /* Темніший контрастний фон */
    
    border: 1px solid rgba(255, 255, 255, 0.03); /* Дуже легка рамочка для об'єму */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    
    box-sizing: border-box;
    line-height: 1.7; /* Ідеально для читання великих текстів */
    font-size: 1.05rem;
    color: #e2e8f0; /* Світло-сірий, приємний для очей текст */
    
    transition: transform 0.3s ease, border-color 0.3s ease;
}

/* Легкий ефект підняття при наведенні на блоки з текстом */
.insight-box:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 175, 55, 0.2);
}

/* 4. Заголовки всередині блоків */
.insight-box h4 {
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}
/* ==========================================
   TAROT WIDGET: CYBER ORACLE GLASSMORPHISM
   ========================================== */

.tarot-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    perspective: 1000px; /* Required for 3D flip effect */
    flex-wrap: wrap;
}

.tarot-card {
    width: 200px;
    height: 320px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
}

.tarot-card:hover {
    transform: translateY(-10px);
}

.tarot-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

/* Toggle this class via JS to flip the card */
.tarot-card.flipped .tarot-inner {
    transform: rotateY(180deg);
}

.tarot-front, .tarot-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    
    /* Cyber Oracle Glassmorphism */
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glow-color-mid);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), inset 0 0 15px var(--glow-color-dim);
}

/* The card back (what you see before flipping) */
.tarot-front {
    font-size: 3rem;
    color: var(--glow-color);
}

/* The actual card face (what you see after flipping) */
.tarot-back {
    transform: rotateY(180deg);
    background: rgba(5, 7, 10, 0.85);
}

.tarot-position-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.tarot-card-title {
    font-size: 1.2rem;
    color: var(--text-main);
    font-weight: bold;
    margin-bottom: 5px;
}

.tarot-card-type {
    font-size: 0.8rem;
    color: var(--glow-color);
    font-style: italic;
}
/* ==========================================
   TAROT AI READING: TYPOGRAPHY & LOADER
   ========================================== */

.oracle-reading {
    display: none; /* Hidden until triggered */
    margin-top: 40px;
    padding: 35px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    color: #e2e8f0;
    line-height: 1.8;
    font-size: 1.1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 215, 0, 0.05);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 1s ease-in-out;
}

.oracle-reading h3 {
    color: #ffd700;
    margin-bottom: 15px;
    margin-top: 25px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 1.2rem;
}

.oracle-reading h3:first-child {
    margin-top: 0;
}

.oracle-reading p {
    margin-bottom: 15px;
}

.oracle-reading strong {
    color: #ffffff;
    font-weight: 600;
}

/* Mystical Loader Animation */
.oracle-loader {
    text-align: center;
    padding: 30px;
}

.glow-text {
    color: #ffd700;
    font-style: italic;
    letter-spacing: 2px;
    animation: pulseGlow 1.5s infinite alternate;
}

@keyframes pulseGlow {
    from { opacity: 0.5; text-shadow: 0 0 5px rgba(255, 215, 0, 0.2); }
    to { opacity: 1; text-shadow: 0 0 15px rgba(255, 215, 0, 0.8); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.reading-error {
    color: #ff4c4c;
    text-align: center;
    font-style: italic;
}
/* ==========================================
   ASTRO INSIGHT PRELOADER (CLEANED & OPTIMIZED)
   ========================================== */
body.no-scroll { overflow: hidden; height: 100vh; }

#astro-preloader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: #050505;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 1.2s ease, opacity 0.4s ease;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px; /* Гнучкий розмір замість жорсткого для захисту мобілок */
    text-align: center;
}

/* Великий логотип по центру прелоадера */
#intro-logo-container {
    width: 280px; 
    height: 280px; /* Ідеальний квадрат 1:1 */
    display: flex;
    justify-content: center;
    align-items: center;
    transform-origin: top left;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.17, 1);
    will-change: transform;
}

#intro-logo-container svg {
    width: 100%; height: 100%;
    filter: drop-shadow(0 0 30px var(--glow-color, #d4af37));
    transform: scale(1.8);
}

#intro-logo-container .cls-1, 
#intro-logo-container .cls-3, 
#intro-logo-container .cls-4 {
    stroke: var(--glow-color, #d4af37) !important;
}
#intro-logo-container .cls-2 {
    fill: var(--glow-color, #d4af37) !important;
}

/* Напис Astro Insight на прелоадері */
.intro-title {
    margin-top: -20px; /* Підтягуємо текст до квадрата */
    font-size: 4rem;
    color: var(--glow-color, #d4af37);
    text-transform: uppercase;
    text-shadow: 0 0 20px var(--glow-color, #d4af37);
    opacity: 0;
    display: inline-block;
    transform-origin: top left;
    margin-left: 0; 
    white-space: nowrap; /* Забороняємо перенос тексту */
    animation: textReveal 1.5s ease-out forwards 0.3s;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.17, 1), opacity 0.5s ease;
}

@keyframes textReveal {
    0% { letter-spacing: 30px; opacity: 0; }
    100% { letter-spacing: 2px; opacity: 1; }
}

/* ==========================================
   СТИЛІ ДЛЯ ТЕКСТУ В ШАПЦІ (Місце посадки)
   ========================================== */
.nav-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--glow-color, #d4af37);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-left: 10px; /* Безпечний та гармонійний відступ */
    text-shadow: 0 0 8px var(--glow-color, #d4af37);
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

/* ==========================================
   МОБІЛЬНА АДАПТАЦІЯ ДЛЯ ПРЕЛОАДЕРА
   ========================================== */
@media (max-width: 768px) {
    #intro-logo-container {
        width: 300px;  /* Пропорційне зменшення для телефонів */
        height: 300px; 
    }
    .intro-title {
        font-size: 2.2rem;
        margin-top: 10px;
    }
    .nav-title {
        font-size: 1.2rem;
        margin-left: 8px;
    }
}
/* =========================================
   CUSTOM COSMIC CURSOR (Astro Insight)
   ========================================= */

/* Застосовуємо ТІЛЬКИ для пристроїв із точною мишкою (ПК/Ноутбуки) */
@media (pointer: fine) {
    /* Жорстко ховаємо ВСІ системні курсори (стрілки, ручки, палички) на ВСІХ елементах */
    *, *::before, *::after {
        cursor: none !important;
    }
    
    #cursor-dot, #cursor-aura {
        position: fixed;
        top: 0;
        left: 0;
        pointer-events: none; /* ДУЖЕ ВАЖЛИВО: дозволяє клікати крізь курсор */
        border-radius: 50%;
        z-index: 99999; /* Поверх усіх інших елементів */
        transform: translate(-50%, -50%); /* Центруємо відносно координат */
    }

    /* Центральна зірочка (рухається миттєво) */
    #cursor-dot {
        width: 6px;
        height: 6px;
        background-color: var(--glow-color, #d4af37);
        box-shadow: 0 0 10px var(--glow-color, #d4af37);
    }

    /* Орбіта/Аура (рухається із затримкою) */
    #cursor-aura {
        width: 36px;
        height: 36px;
        border: 1px solid rgba(212, 175, 55, 0.4);
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
        transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
        will-change: transform; /* Підказка для браузера: вмикає GPU-прискорення */
    }

    /* Стан "Увага": коли курсор наведено на посилання чи кнопку */
    #cursor-aura.hovering {
        width: 55px;
        height: 55px;
        background-color: rgba(212, 175, 55, 0.1);
        border-color: var(--glow-color, #d4af37);
    }
}
/* =========================================
   КАСТОМІЗАЦІЯ ТЕКСТУ ТА ВВОДУ
   ========================================= */

/* 1. Золота блимаюча каретка для полів вводу */
input, textarea {
    caret-color: var(--glow-color, #d4af37);
}

/* 2. Космічне золоте виділення тексту */
::selection {
    background-color: rgba(212, 175, 55, 0.4); /* Напівпрозорий золотий */
    color: #fff; /* Текст стає білим для контрасту */
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.8); /* Легке світіння виділеного тексту */
}

/* 3. Ховаємо стандартний текстовий курсор */
p, h1, h2, h3, h4, h5, h6, span, li, input, textarea {
    cursor: none;
}

/* 4. Новий стан Аури над текстом (Витягується в лінію) */
#cursor-aura.text-hover {
    width: 4px;
    height: 28px; /* Робимо високим */
    border-radius: 2px;
    background-color: rgba(212, 175, 55, 0.6);
    border: none;
    box-shadow: 0 0 10px var(--glow-color, #d4af37);
}
/* ==========================================
   INTERACTIVE TOOLTIPS (INFO ICONS)
   ========================================== */
.info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--glow-color);
    color: var(--glow-color);
    font-size: 0.9rem;
    font-family: sans-serif;
    font-style: normal;
    font-weight: bold;
    vertical-align: middle;
    margin-left: 12px;
    cursor: pointer;
    position: relative;
    box-shadow: 0 0 5px var(--glow-color-dim);
    transition: all 0.3s ease;
}

/* Світіння при наведенні */
.info-tooltip:hover {
    background: var(--glow-color);
    color: var(--bg-body);
    box-shadow: 0 0 15px var(--glow-color);
}

/* Сама плашка підказки (Glassmorphism) */
.info-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 160%; /* Виринає зверху над іконкою */
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    width: max-content;
    max-width: 250px; /* Щоб текст не був нескінченно довгим */
    padding: 12px 18px;
    background: rgba(15, 23, 42, 0.85); /* Темно-синій матовий фон */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glow-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: 'Playfair Display', serif;
    font-weight: normal;
    text-align: center;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Плавна пружинка */
    z-index: 1000;
}

/* Маленький золотий трикутник, що вказує на іконку */
.info-tooltip::before {
    content: '';
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    border-width: 7px;
    border-style: solid;
    border-color: var(--glow-color) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

/* Анімація появи при наведенні (або тапі на телефоні) */
.info-tooltip:hover::after,
.info-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Мобільна адаптація: щоб текст не вилазив за екран */
@media (max-width: 768px) {
    .info-tooltip::after {
        white-space: normal;
        width: 220px;
        font-size: 0.9rem;
    }
}
/* ==========================================
   POSITIONING FOR COSMIC INSIGHT (OMEN BOX) TOOLTIP
   ========================================== */
#itOmen {
    position: relative; /* База для координат */
}

/* Ставимо іконку по центру правого краю контейнера */
#itOmen .info-tooltip {
    position: absolute;
    right: 15px;           /* Прив'язка до правого краю */
    left: auto;
    top: 50%;              /* Опускаємо на 50% висоти */
    transform: translateY(-50%); /* Ідеальне вертикальне центрування */
    margin-left: 0;
}

/* Підказка відкривається зверху над іконкою і зміщується вліво */
#itOmen .info-tooltip::after {
    left: auto;
    right: 0;
    bottom: 160%;
    top: auto;
    transform: translateY(15px);
}

/* Золотий трикутник вказівника точно під іконку */
#itOmen .info-tooltip::before {
    left: auto;
    right: 5px;
    bottom: 120%;
    top: auto;
    border-color: var(--glow-color) transparent transparent transparent;
    transform: translateY(15px);
}

/* Анімація появления при наведенні */
#itOmen .info-tooltip:hover::after,
#itOmen .info-tooltip:hover::before {
    transform: translateY(0);
}
/* ==========================================
   TOOLTIPS FOR TWO-COLUMN GRID WIDGETS
   ========================================== */
.two-col-grid .info-tooltip::after {
    max-width: 210px; /* Зменшена ширина для комфортного читання у вузьких колонках */
}

@media (max-width: 768px) {
    .two-col-grid .info-tooltip::after {
        max-width: 190px;
    }
}
/* ==========================================
   MODAL ACTION BUTTONS TOOLTIPS
   ========================================== */
.modal-actions {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-top: 25px;
}

.btn-with-tooltip {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    gap: 8px;
}

.btn-with-tooltip .glow-btn {
    flex: 1; /* Кнопка займає весь доступний простір */
}

/* Налаштування позиціонування підказки над кнопками */
.btn-with-tooltip .info-tooltip::after {
    bottom: 140%;
    left: auto;
    right: -10px; /* Прив'язуємо правий край підказки до іконки, текст росте вліво */
    transform: translateY(10px); /* Прибрали translateX */
    max-width: 240px;
    z-index: 2050; /* Вище за модальне вікно */
}

/* Налаштовуємо золотий трикутник-вказівник */
.btn-with-tooltip .info-tooltip::before {
    bottom: 110%;
    left: auto;
    right: 5px; /* Стрілочка вказує рівно на іконку ? */
    transform: translateY(10px);
    z-index: 2050;
}

/* Анімація появи (плавний рух тільки вгору) */
.btn-with-tooltip .info-tooltip:hover::after,
.btn-with-tooltip .info-tooltip:hover::before {
    transform: translateY(0);
}

/* Адаптація для мобільних пристроїв */
@media (max-width: 768px) {
    .modal-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-with-tooltip {
        width: 100%;
    }
}
#custom-svg-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 38px;  /* Компактний та зручний розмір курсора */
    height: 38px;
    pointer-events: none;
    z-index: 99999;
    filter: drop-shadow(0 0 5px var(--glow-color, #d4af37));
    transition: transform 0.1s ease-out, width 0.3s ease, height 0.3s ease, filter 0.3s ease;
}

#custom-svg-cursor svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* При наведенні на кнопки курсор трохи більшає і яскравіше світиться */
#custom-svg-cursor.hovering {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 15px var(--glow-color, #d4af37));
}


h2, h3, h4, .omen-box {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap; 
    gap: 10px;       
}

.info-tooltip {
    flex-shrink: 0; 
    margin-left: 0 !important; 
}


#itOmen .info-tooltip {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
}

@media (max-width: 768px) {
  
    .info-tooltip::after,
    #itOmen .info-tooltip::after,
    .btn-with-tooltip .info-tooltip::after {
        position: fixed !important;
        left: 15px !important;
        right: 15px !important;
        bottom: 25px !important;
        top: auto !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        transform: translateY(20px) !important; 
        z-index: 999999 !important; 
        box-sizing: border-box;
        text-align: center;
    }

  
    .info-tooltip:hover::after,
    .info-tooltip:active::after,
    #itOmen .info-tooltip:hover::after,
    .btn-with-tooltip .info-tooltip:hover::after {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }


    .info-tooltip::before,
    #itOmen .info-tooltip::before,
    .btn-with-tooltip .info-tooltip::before {
        display: none !important;
    }
}
