* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
  overflow-y: scroll;
}

/* Space Theme Background */
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%);
    min-height: 100vh;
    padding-top: 0px;
    margin: 0;
    color: #e5e7eb;
}

/* Header Styles */
.header {
    background: linear-gradient(to right, #1a1f4c, #2d1b4e);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-content {
    height: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    gap: 0.25rem;
}

.logo-icon {
    font-size: 2rem;
    color: #a78bfa;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: bold;
    background: linear-gradient(to right, #a78bfa, #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.beta-badge {
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    color: #a78bfa;
    text-decoration: none;
    gap: 0.25rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #c4b5fd;
}

/* Main Container */
.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Calculator Styles */
.calculator-wrapper {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 24px;
    position: relative;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

h1 {
    background: linear-gradient(45deg, #4338ca, #7c3aed);
    margin: -24px -24px 24px -24px;
    padding: 20px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    color: white;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.calculator-form {
    padding: 0;
}

.form-group {
    margin-bottom: 16px;
    background-color: transparent;
    border-radius: 4px;
    padding: 0;
    border: none;
    box-shadow: none;
}

.form-label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #e5e7eb;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 16px;
    background-color: rgba(15, 23, 42, 0.6);
    transition: all 0.2s;
    color: #fff;
}

.form-input:hover {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

.form-input:focus {
    outline: none;
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
    background-color: rgba(15, 23, 42, 0.8);
}

.form-input::placeholder {
    color: #64748b;
}

.button-group {
    display: flex;
    gap: 0.75rem;
    justify-content: stretch;
    width: 100%;
}

.calculate-button,
.reset-button {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.calculate-button {
    background: linear-gradient(45deg, #4338ca, #7c3aed);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.reset-button {
    background: rgba(148, 163, 184, 0.1);
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.calculate-button:hover {
    background: linear-gradient(45deg, #4338ca, #6d28d9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.reset-button:hover {
    background: rgba(148, 163, 184, 0.2);
    transform: translateY(-1px);
}

/* Results Section */
.results {
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.results-header {
    margin-bottom: 1.5rem;
}

.results-title {
    color: #a78bfa;
    text-align: center;
    font-size: 1.25rem;
    margin: 0;
}

.results-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Planet Cards */
.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;
}

.planet-details p {
    margin: 0;
}

.age, .weight {
    font-weight: 500;
    color: #e5e7eb;
}

.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 */
.faq-section {
    margin-top: 32px;
    padding: 24px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 32px;
}

.faq-section h2 {
    background: linear-gradient(to right, #a78bfa, #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    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);
    list-style: none;
    transition: all 0.2s;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.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);
}

.hidden {
    display: none;
}

/* Error Messages */
.error-message {
    color: #fca5a5 !important;
    background: rgba(220, 38, 38, 0.1) !important;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Input Feedback */
.input-feedback {
    color: #fca5a5 !important;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .header-container {
        padding: 0 1rem;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .beta-badge {
        font-size: 0.625rem;
        padding: 0.125rem 0.375rem;
    }
    
    .header-content {
        height: 3.5rem;
    }
    
    .calculator-wrapper {
        padding: 16px;
    }
    
    h1 {
        margin: -16px -16px 16px -16px;
        font-size: 20px;
    }
    
    .planet-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .planet-info-compact {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .header {
        position: fixed;
    }
    
    body {
        padding-top: 3.5rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
}