        /* CSS Variables for consistent theming */
        :root {
            --primary-bg: #0a0a1a;
            --secondary-bg: #101025;
            --card-bg: #1a1a3a;
            --accent-bg: #2a2a4a;
            --text-primary: #ffffff;
            --text-secondary: #e0e0e0;
            --text-muted: #9a9acc;
            --text-dim: #aaaaaa;
            --accent-color: #8a8aff;
            --hover-color: #4a4a6a;
            --border-color: #3a3a5a;
            --gradient-primary: linear-gradient(145deg, #1a1a3a, #0a0a1a);
            --gradient-card: linear-gradient(135deg, #1a1a3a, #2a2a4a);
            --shadow-light: 0 2px 10px rgba(138, 138, 255, 0.1);
            --shadow-medium: 0 4px 15px rgba(138, 138, 255, 0.2);
            --shadow-heavy: 0 8px 25px rgba(138, 138, 255, 0.3);
            --transition-fast: 0.2s ease;
            --transition-medium: 0.3s ease;
            --border-radius: 12px;
            --border-radius-small: 8px;
        }

        /* Reset and base styles */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: var(--primary-bg);
            color: var(--text-secondary);
            line-height: 1.6;
            overflow-x: hidden;
        }

        /* Loading spinner */
        .loading-spinner {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--primary-bg);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            transition: opacity 0.5s ease;
        }

        .loading-spinner.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .spinner {
            width: 50px;
            height: 50px;
            border: 3px solid var(--border-color);
            border-top: 3px solid var(--accent-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

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

        /* Navigation Header */
        .nav-header {
            background: var(--gradient-primary);
            padding: 1rem 0;
            position: sticky;
            top: 0;
            z-index: 100;
            backdrop-filter: blur(10px);
            border-bottom: 1px solid var(--border-color);
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .nav-brand {
            font-size: 1.5rem;
            font-weight: bold;
            color: var(--text-primary);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .nav-brand::before {
            content: '🌙';
            font-size: 1.8rem;
        }

        .nav-menu {
            display: flex;
            list-style: none;
            gap: 2rem;
            align-items: center;
        }

        .nav-menu a {
            color: var(--text-secondary);
            text-decoration: none;
            transition: color var(--transition-fast);
            font-weight: 500;
        }

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

        .mobile-menu-toggle {
            display: none;
            background: none;
            border: none;
            color: var(--text-primary);
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0.5rem;
        }

        /* Main content */
        .main-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0rem 1rem 0;
            min-height: calc(100vh - 200px);
        }

        /* Hero section */
        .hero-section {
            text-align: center;
            padding: 3rem 1rem;
            background: var(--gradient-primary);
            border-radius: var(--border-radius);
            margin-bottom: 2rem;
            box-shadow: var(--shadow-light);
        }

        .hero-section h1 {
            color: var(--text-primary);
            font-weight: 700;
            font-size: clamp(2rem, 5vw, 3rem);
            margin-bottom: 1rem;
            background: linear-gradient(45deg, #fff, var(--accent-color));
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .hero-section p {
            font-size: clamp(1rem, 3vw, 1.2rem);
            color: var(--text-muted);
            max-width: 600px;
            margin: 0 auto;
        }

        /* Calendar navigation */
        .calendar-navigation {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
            gap: 1rem;
            background: var(--secondary-bg);
            padding: 1rem;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-light);
        }

        .nav-controls {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        #current-month {
            margin: 0;
            min-width: 200px;
            text-align: center;
            color: var(--text-primary);
            font-size: clamp(1.2rem, 4vw, 1.5rem);
            font-weight: 600;
        }

        .nav-btn, .today-btn {
            background: var(--gradient-card);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
            padding: 0.75rem 1.5rem;
            border-radius: var(--border-radius-small);
            cursor: pointer;
            transition: all var(--transition-fast);
            font-weight: 500;
            white-space: nowrap;
        }

        .nav-btn:hover, .today-btn:hover {
            background: var(--hover-color);
            transform: translateY(-2px);
            box-shadow: var(--shadow-medium);
        }

        .nav-btn:active, .today-btn:active {
            transform: translateY(0);
        }

        /* Calendar container */
        .calendar-container {
            background: var(--secondary-bg);
            padding: 1.5rem;
            border-radius: var(--border-radius);
            margin-bottom: 2rem;
            box-shadow: var(--shadow-light);
        }

        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 0.5rem;
            position: relative;
        }

        .calendar-grid.loading::before {
            content: 'Loading Moon Data...';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(16, 16, 37, 0.95);
            color: var(--text-primary);
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: clamp(1rem, 4vw, 1.5rem);
            z-index: 10;
            border-radius: var(--border-radius);
            backdrop-filter: blur(5px);
        }

        .calendar-header {
            text-align: center;
            font-weight: bold;
            padding: 1rem 0.5rem;
            color: var(--text-muted);
            font-size: clamp(0.8rem, 3vw, 1rem);
        }

        .calendar-day {
            background: var(--gradient-card);
            border-radius: var(--border-radius-small);
            padding: 0.75rem;
            text-align: center;
            min-height: clamp(100px, 15vw, 120px);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            cursor: pointer;
            transition: all var(--transition-fast);
            border: 2px solid transparent;
            position: relative;
            overflow: hidden;
        }

        .calendar-day::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--gradient-card);
            opacity: 0;
            transition: opacity var(--transition-fast);
            z-index: -1;
        }

        .calendar-day:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-medium);
            border-color: var(--accent-color);
        }

        .calendar-day:hover::before {
            opacity: 1;
        }

        .calendar-day.other-month {
            opacity: 0.4;
        }

        .calendar-day.today {
            border-color: var(--accent-color);
            box-shadow: var(--shadow-light);
        }

        .calendar-day.selected {
            background: var(--hover-color);
            border-color: var(--text-primary);
            transform: translateY(-5px);
            box-shadow: var(--shadow-heavy);
        }

        .day-number {
            font-weight: bold;
            align-self: flex-end;
            font-size: clamp(0.9rem, 3vw, 1.1rem);
            color: var(--text-primary);
        }

        .moon-icon {
            font-size: clamp(1.5rem, 5vw, 2.5rem);
            margin: 0.25rem 0;
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
        }

        .illumination-percent {
            font-size: clamp(0.7rem, 2.5vw, 0.8rem);
            color: var(--text-dim);
            font-weight: 500;
        }

        /* Details section */
        .moon-details {
            background: var(--secondary-bg);
            padding: 2rem;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-light);
        }

        .moon-details h3 {
            color: var(--text-primary);
            font-size: clamp(1.3rem, 4vw, 1.75rem);
            margin-bottom: 1.5rem;
            text-align: center;
        }

        .details-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 1rem;
        }

        .detail-item {
            background: var(--gradient-card);
            padding: 1rem;
            border-radius: var(--border-radius-small);
            border: 1px solid var(--border-color);
            transition: all var(--transition-fast);
        }

        .detail-item:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-light);
        }

        .detail-label {
            display: block;
            font-size: 0.9rem;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
            font-weight: 500;
        }

        .detail-value {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-primary);
            word-break: break-word;
        }

        .zodiac-history {
            grid-column: 1 / -1;
        }

        .zodiac-history-list {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin-top: 1rem;
        }

        .zodiac-history-item {
            background: var(--accent-bg);
            padding: 0.75rem 1rem;
            border-radius: var(--border-radius-small);
            font-size: 0.9rem;
            border: 1px solid var(--border-color);
            transition: all var(--transition-fast);
        }

        .zodiac-history-item:hover {
            background: var(--hover-color);
            transform: translateY(-1px);
        }

        /* Modal styles */
        #moonInfoModal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.9);
            z-index: 1000;
            overflow-y: auto;
            padding: 1rem;
            backdrop-filter: blur(5px);
        }

        #moonInfoModal.visible {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .modal-content {
            background: var(--secondary-bg);
            max-width: 900px;
            margin: 2rem auto;
            padding: 2rem;
            border-radius: var(--border-radius);
            position: relative;
            border: 1px solid var(--border-color);
            box-shadow: var(--shadow-heavy);
            animation: slideUp 0.3s ease;
        }

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

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border-color);
        }

        .modal-title {
            font-size: clamp(1.3rem, 4vw, 1.5rem);
            color: var(--text-primary);
            font-weight: 600;
        }

        #closeModalBtn {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0.5rem;
            border-radius: var(--border-radius-small);
            transition: all var(--transition-fast);
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        #closeModalBtn:hover {
            background: var(--hover-color);
            transform: scale(1.1);
        }

        #modal-date {
            color: var(--text-muted);
            margin-bottom: 1.5rem;
            display: block;
            font-size: 1.1rem;
            text-align: center;
            font-weight: 500;
        }

        /* Mobile optimizations */
        @media (max-width: 768px) {
            .nav-menu {
                position: fixed;
                top: 70px;
                left: -100%;
                width: 100%;
                height: calc(100vh - 70px);
                background: var(--secondary-bg);
                flex-direction: column;
                justify-content: flex-start;
                align-items: center;
                padding-top: 2rem;
                transition: left var(--transition-medium);
                border-top: 1px solid var(--border-color);
            }

            .nav-menu.active {
                left: 0;
            }

            .nav-menu a {
                font-size: 1.2rem;
                padding: 1rem;
                width: 100%;
                text-align: center;
                border-bottom: 1px solid var(--border-color);
            }

            .mobile-menu-toggle {
                display: block;
            }

            .calendar-navigation {
                flex-direction: column;
                text-align: center;
            }

            .nav-controls {
                order: 2;
                flex-wrap: wrap;
                justify-content: center;
            }

            #current-month {
                order: 1;
                margin-bottom: 1rem;
            }

            .today-btn {
                order: 3;
                margin-top: 1rem;
            }

            .calendar-grid {
                gap: 0.25rem;
            }

            .calendar-day {
                padding: 0.5rem;
                min-height: 90px;
            }

            .details-grid {
                grid-template-columns: 1fr;
            }

            .modal-content {
                margin: 1rem auto;
                padding: 1.5rem;
            }

            .hero-section {
                padding: 2rem 1rem;
            }

            .moon-details {
                padding: 1.5rem;
            }
        }

        @media (max-width: 480px) {
            .main-content {
                padding: 0rem 0rem 0;
            }

            .calendar-container, .moon-details {
                padding: 1rem;
            }

            .calendar-day {
                min-height: 80px;
                padding: 0.4rem;
            }

            .moon-icon {
                font-size: 1.5rem;
            }

            .day-number {
                font-size: 0.9rem;
            }

            .illumination-percent {
                font-size: 0.7rem;
            }

    
        }

        /* Smooth scrolling */
        html {
            scroll-behavior: smooth;
        }

        /* Focus styles for accessibility */
        .nav-btn:focus, .today-btn:focus, .calendar-day:focus, #closeModalBtn:focus {
            outline: 2px solid var(--accent-color);
            outline-offset: 2px;
        }

        /* Print styles */
        @media print {
            .nav-header, #moonInfoModal {
                display: none !important;
            }
            
            .main-content {
                max-width: none;
                margin: 0;
                padding: 0;
            }
            
            .calendar-day {
                break-inside: avoid;
            }
        }
        
/* --- MOBILE CALENDAR FIXES --- */

/* This media query targets typical mobile screen widths */
@media (max-width: 768px) {
    /* Main calendar grid container */
    .calendar-container {
        /* Add horizontal scrolling if content overflows */
        overflow-x: auto;
    }

    /* The calendar grid itself */
    .calendar-grid {
        /* Force a minimum width to prevent cells from becoming too small */
        min-width: 320px;
        /* Reduce the gap between cells */
        gap: 1px;
    }
    
    /* Day of the week headers */
    .calendar-header {
        font-size: 0.7rem;
        padding: 0.5rem;
    }

    /* Individual calendar day cells */
    .calendar-day {
        /* Set a fixed minimum width for each day cell */
        min-width: 45px;
        /* Reduce min-height for better fit */
        min-height: 70px;
        /* Reduce padding inside the cell */
        padding: 0.5rem 0.25rem;
    }

    /* Day number within the cell */
    .day-number {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }

    /* Moon icon within the cell */
    .moon-icon {
        font-size: 1.5rem;
        margin-bottom: 0.2rem;
    }

    /* Illumination percentage text */
    .illumination-percent {
        font-size: 0.65rem;
        text-align: center;
    }
}

/* --- ZODIAC HISTORY CARD STYLES --- */

/* Main container for the cards */
.zodiac-history-container {
    padding: 1.5rem;
    background-color: var(--bg-secondary); /* A background color for the section */
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: var(--spacing-xl);
}

/* A wrapper to create a grid/stack layout for the cards */
.zodiac-cards-wrapper {
    display: grid;
    gap: var(--spacing-md); /* Space between the cards */
}

/* Style for each individual zodiac card */
.zodiac-card {
    background-color: var(--bg-tertiary); /* Lighter background for the card */
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect for the cards */
.zodiac-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Style for the zodiac sign title (e.g., Gemini, Taurus) */
.zodiac-card-title {
    font-size: var(--font-size-lg);
    font-weight: bold;
    color: var(--accent-primary);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Style for the date range text */
.zodiac-card-dates {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Style for the "Recent Zodiac History" heading */
.zodiac-history-heading {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    text-align: left;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}


/* ==============================================
   FOOTER STYLES - RESTORED AND CONSOLIDATED
   ============================================== */

.footer {
    background: linear-gradient(135deg, #0B0C1A 0%, #1A1A2E 100%);
    border-top: 2px solid #3D3D3D;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
    text-align: center; /* Consolidated from a previous duplicate, ensures center alignment */
    padding: 20px; /* Consolidated from a previous duplicate */
    color: #666; /* Consolidated from a previous duplicate */
    font-size: 14px; /* Consolidated from a previous duplicate */
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #FF6F00, transparent);
}

.footer .container {
    padding: 40px 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Footer Links */
.footer-links-simple nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.footer-links-simple nav ul li {
    margin: 5px;
}

.footer-links-simple nav ul li a {
    color: #B0B0B0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    
    display: inline-block;
    border: 1px solid transparent;
}

.footer-links-simple nav ul li a:hover {
    color: #FFB74D;
    background: rgba(255, 111, 0, 0.1);
    border-color: rgba(255, 111, 0, 0.3);
    transform: translateY(-2px);
}

/* Footer Text */
.footer p {
    color: #888;
    font-size: 14px;
    line-height: 1.6;
    margin: 15px 0;
}

.footer .copyright {
    font-size: 13px;
    color: #666;
    margin: 20px 0 10px 0;
    border-top: 1px solid #3D3D3D;
    padding-top: 20px;
}

.footer .copyright a {
    color: #FF6F00;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer .copyright a:hover {
    color: #FFB74D;
}

.footer .site-name {
    background: linear-gradient(135deg, #FF6F00, #FFB74D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.footer .tagline {
    font-size: 12px;
    color: #777;
    font-style: italic;
    max-width: 600px;
    margin: 15px auto 0;
    line-height: 1.5;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-links-simple nav ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .footer-links-simple nav ul li {
        margin: 0;
        display: flex;
        justify-content: center;
    }
    
    .footer-links-simple nav ul li a {
        padding: 12px 16px;
        width: 100%;
        text-align: center;
        font-size: 13px;
        border-radius: 15px;
        background: rgba(45, 45, 45, 0.6);
        border: 1px solid rgba(255, 111, 0, 0.2);
    }
    
    .footer-links-simple nav ul li a:hover {
        background: rgba(255, 111, 0, 0.15);
        border-color: rgba(255, 111, 0, 0.4);
        transform: translateY(-1px);
    }
    
    .footer .container {
        padding: 40px 15px 20px;
    }
    
    .footer p {
        font-size: 13px;
        margin: 12px 0;
    }
    
    .footer .tagline {
        font-size: 11px;
        margin: 20px auto 0;
        padding: 0 10px;
    }
    
    .footer .copyright {
        margin: 25px 0 15px 0;
        padding-top: 25px;
    }
}

/* Update your existing footer CSS with these changes */
.footer {
    background: linear-gradient(135deg, #0B0C1A 0%, #1A1A2E 100%);
    border-top: 2px solid #3D3D3D;
    margin-top: 60px;
    padding: 40px 0; /* Increased vertical padding */
    text-align: center;
    color: #666;
    font-size: 14px;
    width: 100%; /* Ensure full width */
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Only horizontal padding */
    display: flex;
    flex-direction: column;
    align-items: center; /* This ensures everything is centered */
}

.footer-content {
    width: 100%;
    max-width: 100%; /* Allow it to take full container width */
}

/* Footer Links - ensure proper centering */
.footer-links-simple nav ul {
    list-style: none;
    padding: 0;
    margin: 0 auto 30px; /* Center the ul */
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center the items */
    gap: 15px;
    max-width: 100%; /* Prevent overflow */
}

/* Footer Text - ensure consistent alignment */
.footer p {
    color: #888;
    font-size: 14px;
    line-height: 1.6;
    margin: 15px auto; /* Center paragraphs */
    max-width: 100%; /* Prevent text from stretching too wide */
}

.footer .tagline {
    max-width: 800px; /* Give a reasonable max-width for readability */
    margin: 15px auto 0; /* Center with top margin */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer {
        padding: 30px 0;
    }
    
    .footer .container {
        padding: 0 15px;
    }
    
    .footer-links-simple nav ul {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        max-width: 100%;
    }
    
    .footer p, 
    .footer .tagline {
        padding: 0 10px; /* Add some padding on mobile */
    }
}