/* Cosmic Theme CSS for AstroTools */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Cosmic Palette */
    --bg-dark: #0B0B15;
    --bg-deep: #121225;
    --primary-color: #FFD700;
    /* Starlight Gold */
    --primary-glow: rgba(255, 215, 0, 0.4);
    --secondary-color: #9D4EDD;
    /* Nebula Purple */
    --secondary-glow: rgba(157, 78, 221, 0.4);
    --accent-color: #00D2FF;
    /* Cosmic Blue */

    /* Text */
    --text-main: #FFFFFF;
    --text-muted: #A0A0C0;
    --text-dark: #0B0B15;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(10px);

    /* Gradients */
    --gradient-main: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    --gradient-cosmic: linear-gradient(135deg, #240046 0%, #10002B 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(157, 78, 221, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 210, 255, 0.10) 0%, transparent 25%);
    min-height: 100vh;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Stars Background Effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 20px 30px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 40px 70px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 50px 160px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 80px 120px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1.5px 1.5px at 110px 140px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1.5px 1.5px at 130px 180px, #fff, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    z-index: -1;
    opacity: 0.3;
    animation: twinkle 5s infinite;
}

@keyframes twinkle {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 0.3;
    }
}

/* Common Components */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
}

a {
    transition: all 0.3s ease;
    text-decoration: none;
}

/* Navbar Updates */
.navbar {
    background: rgba(11, 11, 21, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--text-main) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand i {
    color: var(--primary-color);
    filter: drop-shadow(0 0 5px var(--primary-glow));
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0%;
    height: 2px;
    background: var(--gradient-main);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.dropdown-menu {
    background: var(--bg-deep);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
}

.dropdown-item {
    color: var(--text-muted);
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-color);
}

.navbar-toggler {
    border-color: var(--glass-border);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero-section {
    padding-top: 120px;
    padding-bottom: 80px;
    position: relative;
}

.hero-section h1 {
    font-size: 3.5rem;
    background: linear-gradient(to right, #fff, #a0a0ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.hero-section .lead {
    color: var(--text-muted);
    font-size: 1.25rem;
}

/* Buttons */
.btn {
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-main);
    border: none;
    color: var(--text-dark);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    color: var(--text-dark);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--text-dark);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Glass Panels & Cards */
.glass-panel,
.tool-card,
.result-card,
.tool-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Tool Cards Grid */
.tool-card {
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.tool-card i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-main);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tool-card h5 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Forms */
.form-label {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    border-radius: 12px;
    padding: 12px 16px;
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-glow);
    color: var(--text-main);
    outline: none;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Fix for date inputs */
::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.6;
}

/* Tool Specifics */
.tool-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.tool-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gradient-main);
    margin: 1rem auto 0;
    border-radius: 3px;
}

.tool-header h2 {
    font-size: 2.5rem;
}

/* Results Area */
.result-card {
    background: rgba(30, 30, 50, 0.6);
    padding: 2rem;
    margin-top: 1rem;
    border-left: 4px solid var(--secondary-color);
}

.result-card h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.result-card h6 {
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

/* Accordion */
.accordion-item {
    background: transparent;
    border: 1px solid var(--glass-border);
    margin-bottom: 0.5rem;
    border-radius: 10px !important;
    overflow: hidden;
}

.accordion-button {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    background: rgba(157, 78, 221, 0.2);
    color: var(--primary-color);
}

.accordion-body {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
}

/* Footer of course */
footer {
    background-color: #05050A;
    border-top: 1px solid var(--glass-border);
    margin-top: 0;
    padding-top: 4rem;
}

.footer-brand h5 {
    background: var(--gradient-main);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.social-link {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--text-dark);
    transform: translateY(-3px);
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hero-image i {
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 0 20px var(--primary-glow));
}

/* Loading Spinners */
.loading {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 2rem auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Utility */
.text-primary {
    color: var(--primary-color) !important;
}

.text-warning {
    color: #FFA500 !important;
}

.text-info {
    color: #00D2FF !important;
}

.text-success {
    color: #00FF9D !important;
}

.text-danger {
    color: #FF4B4B !important;
}

/* Scroll to top */
.scroll-to-top {
    background: var(--gradient-main);
    color: var(--text-dark);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    position: fixed;
    bottom: 30px;
    right: 30px;
    cursor: pointer;
    box-shadow: 0 0 20px var(--primary-glow);
    display: none;
    /* Controlled by JS */
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.scroll-to-top.visible {
    display: flex;
}

.scroll-to-top:hover {
    transform: scale(1.1);
}

/* Tool Specific: Lucky Numbers */
.lucky-number {
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: inline-block;
    color: var(--text-main);
    font-weight: bold;
    margin: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.lucky-number.core {
    background: var(--gradient-main);
    color: var(--text-dark);
}

/* Tool Specific: Moon Phase */
.moon-phase-display {
    background: radial-gradient(circle at center, #2a2a40, #000);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tool Specific: Zoning */
.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.zodiac-card,
.zodiac-animal-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.zodiac-card:hover,
.zodiac-card.active,
.zodiac-animal-card:hover {
    background: rgba(157, 78, 221, 0.3);
    border-color: var(--secondary-color);
    transform: translateY(-5px);
}

.number-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem 1rem;
    height: 100%;
    transition: all 0.3s;
}

.number-card:hover {
    background: rgba(157, 78, 221, 0.2);
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.number-circle {
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background: var(--gradient-main);
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
    box-shadow: 0 0 15px var(--primary-glow);
}

.lucky-color {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    margin: 5px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
}

/* Newsletter Input */
.newsletter-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 15px;
    border-radius: 50px;
    width: 100%;
}

.newsletter-btn {
    border-radius: 50px;
    background: var(--gradient-main);
    border: none;
    color: #000;
    padding: 0 20px;
    font-weight: bold;
}