/* ========================================
   LOGO COLOR PALETTE
   Gold:    #ebcd15
   Aqua:    #5ce1e6
   Magenta: #ff65c3
   ======================================== */

/* ========================================
   GLOBAL BACKGROUND DARKENING OVERLAY
   Reduces brightness of cosmic-bg on all pages
   ======================================== */
body.cosmic-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
    pointer-events: none;
}

/* Glowing Galaxy Badge Animation */
@keyframes galaxy-glow {
    0%, 100% {
        box-shadow: 
            0 0 5px rgba(147, 51, 234, 0.5),
            0 0 10px rgba(147, 51, 234, 0.3),
            0 0 20px rgba(147, 51, 234, 0.2),
            inset 0 0 10px rgba(147, 51, 234, 0.1);
    }
    50% {
        box-shadow: 
            0 0 10px rgba(147, 51, 234, 0.8),
            0 0 20px rgba(147, 51, 234, 0.5),
            0 0 40px rgba(147, 51, 234, 0.3),
            0 0 60px rgba(99, 102, 241, 0.2),
            inset 0 0 15px rgba(147, 51, 234, 0.2);
    }
}

@keyframes galaxy-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.galaxy-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, 
        rgba(147, 51, 234, 0.9) 0%, 
        rgba(99, 102, 241, 0.9) 50%, 
        rgba(236, 72, 153, 0.9) 100%);
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: galaxy-glow 2s ease-in-out infinite;
    overflow: hidden;
}

.galaxy-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255, 255, 255, 0.1) 60deg,
        transparent 120deg,
        rgba(255, 255, 255, 0.05) 180deg,
        transparent 240deg,
        rgba(255, 255, 255, 0.1) 300deg,
        transparent 360deg
    );
    animation: galaxy-spin 6s linear infinite;
    pointer-events: none;
}

.galaxy-badge-icon {
    position: relative;
    z-index: 1;
}

.galaxy-badge-text {
    position: relative;
    z-index: 1;
}

:root {
    /* Primary Logo Colors */
    --color-gold: #ebcd15;
    --color-aqua: #5ce1e6;
    --color-magenta: #ff65c3;
    
    /* Tonal Variations */
    --color-gold-dark: #c9ad10;
    --color-gold-light: #f5e066;
    --color-aqua-dark: #3b9ea3;
    --color-aqua-light: #8eeef2;
    --color-magenta-dark: #c94d99;
    --color-magenta-light: #ff99d6;
    
    /* Accent (for Ophiuchus/Spirit) */
    --color-purple: #9b59b6;
    
    /* Semantic Colors */
    --color-success: #10b981;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
}

/* Utility Classes - Text Colors */
.text-gold { color: var(--color-gold); }
.text-aqua { color: var(--color-aqua); }
.text-magenta { color: var(--color-magenta); }
.text-purple { color: var(--color-purple); }

/* Utility Classes - Background Colors */
.bg-gold { background-color: var(--color-gold); }
.bg-aqua { background-color: var(--color-aqua); }
.bg-magenta { background-color: var(--color-magenta); }

/* Utility Classes - Border Colors */
.border-gold { border-color: var(--color-gold); }
.border-aqua { border-color: var(--color-aqua); }
.border-magenta { border-color: var(--color-magenta); }

/* Gradient Buttons */
.btn-aqua {
    background: linear-gradient(135deg, var(--color-aqua) 0%, var(--color-aqua-dark) 100%);
    color: white;
}
.btn-magenta {
    background: linear-gradient(135deg, var(--color-magenta) 0%, var(--color-magenta-dark) 100%);
    color: white;
}
.btn-gold {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
    color: #1a1a2e;
}

/* ========================================
   UNIFIED PANEL STYLING
   All panels (Solar, Lunar, Natal) use these classes
   ======================================== */

/* Panel Titles */
.panel-title {
    color: var(--color-gold);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.75rem;
}

/* Panel Descriptions */
.panel-description {
    color: #9ca3af; /* gray-400 */
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Section Headers (e.g., "Birth Location", "Placements") */
.section-header {
    color: var(--color-aqua);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header-alt {
    color: var(--color-magenta);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Tab Buttons */
.panel-tab {
    padding-bottom: 0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-magenta);
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    opacity: 0.7;
}

.panel-tab:hover {
    opacity: 1;
    color: var(--color-magenta);
}

.panel-tab.active {
    color: var(--color-gold);
    font-weight: 700;
    border-color: var(--color-gold);
    opacity: 1;
}

/* Summary Container */
.summary-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
}

/* Dark Container (used for charts, visuals) */
.dark-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1rem;
}

/* Gradient Buttons (unified) */
.btn-primary {
    background: linear-gradient(135deg, var(--color-aqua) 0%, var(--color-aqua-dark) 100%);
    color: white;
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--color-magenta) 0%, var(--color-magenta-dark) 100%);
    color: white;
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Data Labels */
.data-label {
    color: #6b7280; /* gray-500 */
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-value {
    color: white;
    font-size: 0.875rem;
}

.data-value-highlight {
    color: var(--color-gold);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Fonts */
.font-orbitron { font-family: 'Orbitron', sans-serif; }

/* Backgrounds */
.cosmic-bg {
    background-color: #05050a; /* Fallback color */
    /* Use the uploaded cosmic image */
    background-image: url('../images/heic0601a.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* ========================================
   UNIFIED GLASS CONTAINER SYSTEM
   All containers use consistent grey + glass effect
   Base: rgba(0, 0, 0, 0.3) + blur(12px) + white/10 border
   ======================================== */

/* Glassmorphism - Main Panels (Box with full border) */
.glass-panel {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Glass Strip (Header/Footer - No border defined here) */
.glass-strip {
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    /* Note: backdrop-filter removed to fix dropdown z-index issues */
}

/* Panel Card (Sidebar Items) - Matches glass-panel */
.panel-card {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.25s ease;
    position: relative; 
}

.panel-card:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 6px 25px rgba(34, 211, 238, 0.15);
    transform: translateY(-2px);
}

/* Glass Container - Alternative class name for consistency */
.glass-container {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Glass Modal - For popups and dialogs */
.glass-modal {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Interaction Cursors */
.cursor-move { cursor: move; cursor: grab; }
.cursor-move:active { cursor: grabbing; }

/* Nav Links */
.nav-link {
    color: #9ca3af;
    font-family: 'Exo 2', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}
.nav-link:hover {
    color: #22d3ee;
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

/* Animations & Modal */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }

.modal-backdrop { backdrop-filter: blur(5px); background-color: rgba(0,0,0,0.7); }
.modal-content { transition: all 0.3s ease; transform: scale(0.95); opacity: 0; }
.modal-content.active { transform: scale(1); opacity: 1; }

/* Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(34, 211, 238, 0.3); }

/* Remove Button - Base styling (hidden by default) */
.remove-panel-btn {
    opacity: 0;
    z-index: 50;
    cursor: pointer;
    background-color: transparent;
    border: none;
    line-height: 1;
    transition: opacity 0.2s, color 0.2s, background-color 0.2s;
}

/* ========================================
   DASHBOARD SIDEBAR & PANEL ITEMS
   (Consolidated from dashboard.css)
   ======================================== */

/* Sidebar layout */
.panel-sidebar {
    height: 100%;
}

.panel-list {
    max-height: 100%;
}

/* Panel item base styling */
.panel-item {
    position: relative;
    user-select: none;
    cursor: grab;
}

/* Active panel item */
.panel-item.active {
    background-color: var(--color-purple);
    border-color: var(--color-purple);
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.panel-item.active h3, 
.panel-item.active p {
    color: white;
}

/* Remove button visibility */
.panel-item:hover .remove-panel-btn {
    opacity: 1;
    background-color: rgba(255, 0, 0, 0.1);
}

.panel-item.active .remove-panel-btn {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
}

.panel-item.active .remove-panel-btn:hover {
    color: #1a1a2e;
    background-color: #fca5a5;
}

/* SortableJS ghost element */
.sortable-ghost {
    opacity: 0.4;
    background-color: rgba(88, 166, 255, 0.2);
    border: 1px dashed var(--color-aqua);
    transform: scale(0.98);
}

/* ========================================
   CONTENT WRAPPER UTILITY
   ======================================== */
.content-wrapper {
    position: relative;
    z-index: 1;
}

/* ========================================
   CHART CONTAINER MINIMUM HEIGHT
   ======================================== */
.chart-container-min {
    min-height: 450px;
}