/* ==========================================================================
   PocketCalcs Solar/Space Theme

   Dark space theme for the Solar System Age Calculator.
   This is a more complex theme with dark mode styling.
   ========================================================================== */

:root {
    /* Primary brand colors - Purple */
    --color-primary: #7c3aed;
    --color-primary-hover: #6d28d9;
    --color-primary-rgb: 124, 58, 237;

    /* Accent - Light Purple */
    --color-accent: #a78bfa;
    --color-accent-light: #f0abfc;

    /* Header - Gradient */
    --color-header-bg: linear-gradient(to right, #1a1f4c, #2d1b4e);
    --color-header-text: #ffffff;
    --color-header-hover: #c4b5fd;
    --color-beta-badge-bg: linear-gradient(45deg, #4f46e5, #7c3aed);

    /* Body - Dark Space */
    --color-bg-body: #0a0f2c;
    --color-bg-card: rgba(30, 41, 59, 0.8);

    /* Text - Light for dark background */
    --color-text-primary: #e5e7eb;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #c4b5fd;

    /* Form elements */
    --color-border: rgba(255, 255, 255, 0.2);
    --color-input-bg: rgba(15, 23, 42, 0.6);

    /* Results - Transparent dark */
    --color-results-from: transparent;
    --color-results-to: transparent;
    --color-results-border: rgba(255, 255, 255, 0.1);
    --color-results-text: #a78bfa;

    /* FAQ - Dark with glass effect */
    --color-faq-from: rgba(15, 23, 42, 0.6);
    --color-faq-to: rgba(15, 23, 42, 0.6);
    --color-faq-border: rgba(255, 255, 255, 0.1);
    --color-faq-heading: #a78bfa;
}

/* ==========================================================================
   Space Theme Overrides
   ========================================================================== */

/* Space background with nebula effect */
body {
    background-color: #0a0f2c;
    background-image:
        radial-gradient(circle at 20% 40%, rgba(88, 103, 221, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 60%, rgba(255, 122, 195, 0.15) 0%, transparent 40%);
}

/* Header with border */
.header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Logo with gradient text */
.logo-text {
    background: linear-gradient(to right, #a78bfa, #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Solar theme logo - use default logo with white filter */
.logo-icon {
    filter: brightness(0) invert(1);
}

/* Beta badge with gradient and border */
.beta-badge {
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Calculator wrapper with glass effect */
.calculator-wrapper {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* H1 with gradient */
h1 {
    background: linear-gradient(45deg, #4338ca, #7c3aed);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Form inputs with dark background */
.form-input,
.input-control {
    background-color: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 8px;
}

.form-input::placeholder,
.input-control::placeholder {
    color: #64748b;
}

.form-input:hover,
.input-control:hover,
.form-input:focus,
.input-control:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
    background-color: rgba(15, 23, 42, 0.8);
}

/* Buttons with gradient */
.calculate-button {
    background: linear-gradient(45deg, #4338ca, #7c3aed);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.calculate-button:hover {
    background: linear-gradient(45deg, #4338ca, #6d28d9);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.reset-button {
    background: rgba(148, 163, 184, 0.1);
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.reset-button:hover {
    background: rgba(148, 163, 184, 0.2);
}

/* Results section */
.results {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    background: transparent;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
}

.results-title {
    color: #a78bfa;
    text-align: center;
    border-bottom: none;
}

/* Planet Cards (Solar calculator specific) */
.planet-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.planet-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    background: rgba(30, 41, 59, 0.8);
}

.planet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.planet-header h3 {
    background: linear-gradient(to right, #a78bfa, #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    font-size: 1.25rem;
}

.planet-info-compact {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #94a3b8;
}

.planet-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fun-fact {
    background: rgba(167, 139, 250, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    color: #c4b5fd;
    font-size: 0.925rem;
    border: 1px solid rgba(167, 139, 250, 0.2);
}

/* FAQ Section with glass effect */
.faq-section {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    margin-bottom: 32px;
}

.faq-section h2 {
    background: linear-gradient(to right, #a78bfa, #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.faq-item {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
}

.faq-question {
    padding: 1rem;
    cursor: pointer;
    font-weight: 500;
    color: #a78bfa;
    background: rgba(15, 23, 42, 0.6);
    transition: all 0.2s;
}

.faq-question:hover {
    background: rgba(30, 41, 59, 0.8);
}

.faq-answer {
    padding: 1rem;
    color: #e5e7eb;
    background: rgba(15, 23, 42, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Error states for dark theme */
.error-message {
    color: #fca5a5 !important;
    background: rgba(220, 38, 38, 0.1) !important;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .planet-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .planet-info-compact {
        width: 100%;
        justify-content: space-between;
    }
}
