/* * main.css 
 * Combined Stylesheet (style.css + cosmic_landing.css + menu)
 * Version: 2.2 (Table Text Color Fix)
 */

:root {
    /* --- GLOBAL COLOR PALETTE (Green Theme) --- */
    --bg-color: #0f172a;        /* Dark Slate Background */
    --text-color: #e2e8f0;      /* Light Text */
    --heading-color: #f0fdf4;   /* Mint White Headings */
    
    /* ACCENTS */
    --accent-color: #4ade80;    /* Bright Green (Main) */
    --accent-hover: #86efac;    /* Lighter Green (Hover) */
    --btn-text: #064e3b;        /* Dark Green (Text on Button) */
    
    /* CARDS & CONTAINERS */
    --card-bg: #1e293b;         
    --border-color: #334155; 
    
    /* COSMIC / GOLD ACCENTS (For Moon Page) */
    --gold-accent: #e0b760;
    --gold-hover: #d4a545;
}

/* --- BASE STYLES --- */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
    width: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Gadugi', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    color: var(--heading-color);
    margin-top: 0;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

/* --- LAYOUT UTILITIES --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

main {
    flex: 1; /* Pushes footer down */
}

/* --- SHARED MENU STYLES --- */
#menu {
    width: 100%;
    z-index: 0;
    position: absolute;
    top: 0;             /* Force top alignment */
    margin-top: 0;      /* Remove top margin */
    padding-top: 0;     /* Remove top padding */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    margin-bottom: 100px;
}

/* Fix for potential margin collapse inside the navbar */
#menu .navbar {
    margin-top: 0 !important;
    /* padding-top: 0.5rem; 
    */      
    /* Restore standard bootstrap padding inside */
    padding-bottom: 0.5rem;
}

/* Optional: Overwrite Bootstrap Navbar to match Green Theme */
.navbar-dark.bg-dark {
    background-color: #020617 !important; /* Darker than slate */
    border-bottom: 1px solid var(--border-color);
}

/* --- FERTILIZER TABLE STYLES --- */
.fertilizer-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    color: var(--text-color);
}

.fertilizer-table th {
    background-color: var(--card-bg);
    color: var(--accent-color);
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

.fertilizer-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color); /* Added to ensure readability against dark bg */
}

.fertilizer-table tr:hover {
    background-color: rgba(74, 222, 128, 0.05); /* Subtle green hover */
}

.sort-arrow {
    font-size: 0.8em;
    margin-left: 5px;
}

/* --- COSMIC LANDING & MOON CLOCK STYLES --- */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    pointer-events: none; 
    background: #0b0d17; /* Deep cosmic background */
}

.moon-display { 
    background: rgba(30, 30, 30, 0.7); 
    padding: 30px; 
    border-radius: 20px; 
    margin: 30px auto; 
    display: inline-block; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.5); 
    backdrop-filter: blur(8px); /* Glass effect */
    border: 1px solid var(--border-color);
    text-align: center;
    max-width: 800px;
}

img#currentMoonImage { 
    width: 250px; 
    height: 250px; 
    border-radius: 50%; 
    object-fit: cover; 
    background: #000; 
    transition: transform 0.3s ease;
    box-shadow: 0 0 30px rgba(224, 183, 96, 0.15); /* Subtle gold glow */
}

img#currentMoonImage:hover { transform: scale(1.05); }

.data-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    text-align: left; 
    margin-top: 20px; 
}

.data-grid .label { 
    color: #94a3b8; 
    font-size: 0.8rem; 
    text-transform: uppercase; 
}

.data-grid .value { 
    color: #fff; 
    font-size: 1.1rem; 
    font-weight: bold; 
}

#digital-clock { 
    color: var(--gold-accent); 
    font-family: monospace; 
}

/* Cosmic Button (Gold Variant) */
.btn-clock {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 24px;
    background-color: var(--gold-accent);
    color: #121212;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-clock:hover {
    background-color: var(--gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(224, 183, 96, 0.4);
}

/* --- FOOTER --- */
footer {
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 2rem 0;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    background-color: rgba(15, 23, 42, 0.9);
}

/* Keeping CSS simple and specific to the footer to avoid conflicts.
       Background is a deep 'cosmic' dark blue/black.
    */
    .cosmic-footer {
        background-color: #0b0d17;
        color: #adb5bd;
    }
    
    .cosmic-footer h5 {
        color: #ffffff;
        margin-bottom: 1.5rem;
    }
    
    .cosmic-footer a {
        color: #adb5bd;
        text-decoration: none;
        transition: color 0.2s;
    }
    
    .cosmic-footer a:hover {
        color: #ffffff;
        text-decoration: underline;
    }

    .cosmic-divider {
        border-color: rgba(255, 255, 255, 0.1);
    }

#currentMoonName {
	position: absolute; 
	top: 42%;
}

#currentMoonPhase { 
	position: absolute; 
	top: 54%;
}
#phasePercentage { 
	position: absolute; 
	top: 64%;
}

