:root {
    --bg-color: #0b0f19;
    --panel-bg: rgba(20, 25, 40, 0.6);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #8b5cf6;
    --accent-hover: #a78bfa;
    --gann-center: #f59e0b;
    --gann-cross: #3b82f6;
    --gann-diagonal: #ec4899;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Deep Space Background / Stars */
#stars, #stars2, #stars3 {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background: transparent;
}

#stars {
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 5s infinite linear;
}

#stars2 {
    background-image: 
        radial-gradient(1px 1px at 10px 10px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 150px 150px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 300px 300px;
    animation: twinkle 7s infinite linear;
    opacity: 0.5;
}

@keyframes twinkle {
    0% { opacity: 0.5; transform: translateY(0); }
    50% { opacity: 1; }
    100% { opacity: 0.5; transform: translateY(-50px); }
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Glassmorphism Classes */
.glass-header {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    animation: fadeIn 0.4s ease-out forwards;
}

.glass-card {
    background: rgba(30, 35, 55, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 1.5rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header & Navigation */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo-icon {
    font-size: 1.5rem;
    color: var(--accent);
    animation: spinSlow 10s linear infinite;
}
@keyframes spinSlow {
    100% { transform: rotate(360deg); }
}

.tabs {
    display: flex;
    gap: 1rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: var(--text-main);
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.5);
}

.merriman-table tr.highlight {
    background: rgba(250, 204, 21, 0.8) !important;
    color: #000;
    font-weight: bold;
}

/* Content Area */
.section-header {
    margin-bottom: 2rem;
}
.section-header p {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Controls */
.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

input[type="date"], input[type="number"] {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

input[type="date"]:focus, input[type="number"]:focus {
    border-color: var(--accent);
}

.glow-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.glow-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 25px rgba(167, 139, 250, 0.6);
    transform: translateY(-2px);
}

/* Table */
.table-wrapper {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid var(--panel-border);
}

.table-wrapper::-webkit-scrollbar {
    width: 8px;
}
.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    background: rgba(0, 0, 0, 0.4);
    position: sticky;
    top: 0;
    font-weight: 600;
    color: var(--text-muted);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Gann Grid */
.gann-results {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.gann-grid-container {
    flex: 2;
    overflow: auto;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--panel-border);
}

.gann-grid {
    display: grid;
    gap: 4px;
    /* Grid template defined via JS based on size */
}

.gann-cell {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.gann-cell:hover {
    transform: scale(1.1);
    z-index: 10;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Gann Highlights */
.gann-center {
    background: var(--gann-center);
    color: black;
    font-weight: bold;
    box-shadow: 0 0 15px var(--gann-center);
}

.gann-cross {
    background: rgba(59, 130, 246, 0.3);
    border: 1px solid var(--gann-cross);
}

.gann-diagonal {
    background: rgba(236, 72, 153, 0.3);
    border: 1px solid var(--gann-diagonal);
}

.gann-info {
    flex: 1;
}

.gann-info ul {
    list-style: none;
    margin-top: 1rem;
}

.gann-info li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.dot-center { background: var(--gann-center); }
.dot-cross { background: var(--gann-cross); }
.dot-diag { background: var(--gann-diagonal); }

/* --- V2 Additions --- */
/* Zodiac & Sectors Grid */
.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.zodiac-card {
    background: rgba(30, 35, 55, 0.4);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.zodiac-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
    background: rgba(40, 45, 75, 0.6);
}

.zodiac-card h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.zodiac-card p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-muted);
}

/* Footer / Disclaimer */
.glass-footer {
    background: rgba(15, 10, 20, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 50, 50, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.disclaimer {
    color: #cbd5e1;
    font-size: 0.85rem;
    line-height: 1.5;
}

.disclaimer strong {
    color: #ef4444; /* red-500 */
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.warning-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.chart-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--panel-border);
}

/* --- Explanations & Highlight Additions --- */
.how-to-read {
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent);
    background: rgba(139, 92, 246, 0.1);
}

.how-to-read h4 {
    color: #f8fafc;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.how-to-read p {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.text-jupiter {
    color: #fbbf24;
}

.text-saturn {
    color: #ef4444; /* red-500 */
}

.planet-select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--panel-border);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    outline: none;
    font-size: 1rem;
    margin-left: 0.5rem;
}

.planet-select:focus {
    border-color: var(--accent);
}

/* Dynamic Zodiac Highlighting */
.jupiter-strong {
    background: rgba(251, 191, 36, 0.15) !important;
    border: 1px solid rgba(251, 191, 36, 0.6) !important;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}
.jupiter-strong h3 {
    color: #fbbf24 !important;
}

.saturn-weak {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.6) !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}
.saturn-weak h3 {
    color: #fca5a5 !important;
}

/* FullCalendar Dark Mode Overrides */
.fc {
    color: #e2e8f0;
}
.fc-theme-standard td, .fc-theme-standard th {
    border-color: rgba(255,255,255,0.1);
}
.fc-button-primary {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
}
.fc-button-primary:hover {
    background-color: var(--accent-hover) !important;
}
.fc-day-today {
    background-color: rgba(139, 92, 246, 0.15) !important;
}
.fc-event {
    cursor: pointer;
}

/* Responsive */
.hamburger-btn {
    display: none;
    background: none;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.2rem 0.6rem;
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 950px) {
    .glass-header {
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .lang-toggle-container {
        margin-right: 1rem !important;
    }

    .hamburger-btn {
        display: block;
    }

    .tabs {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .tabs.show-tabs {
        display: flex;
    }
}
