@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #06d6a0;
    --warning: #ffd60a;
    --danger: #f72585;
    --dark: #0f0f23;
    --dark-card: #1a1a2e;
    --dark-lighter: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle, #0F3276 0%, #0F2143 100%);
    background-attachment: scroll;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Background overlay effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    z-index: -1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Main Card - The key component */
.main-card {
    background: rgba(15, 50, 118, 0.2);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    min-height: 600px;
}

/* Top highlight line effect */
.main-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

/* Calculator specific styles */
.calculator-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 32px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: -40px -40px 32px -40px;
    border-radius: 24px 24px 0 0;
}

.calculator-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calculator-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    color: var(--text-secondary);
}

.calculator-body {
    /* Body styles handled by main-card padding */
}

.calc-instruction {
    text-align: center;
    margin-bottom: 24px;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.calc-schedule-section {
    margin-bottom: 24px;
}

.calc-schedule-label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 12px;
    text-align: center;
}

.calc-radio-group {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px;
    width: 100%;
}

.calc-radio-group label {
    flex: 1;
    font-weight: 500;
    cursor: pointer;
    padding: 12px 24px;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.calc-radio-group input[type="radio"] {
    display: none;
}

.calc-radio-group input[type="radio"]:checked + span {
    color: var(--text-primary);
}

.calc-radio-group label:has(input[type="radio"]:checked),
.calc-radio-group label.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.calc-input-group {
    position: relative;
}

.calc-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    opacity: 0.9;
}

.calc-input {
    width: 100%;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    -moz-appearance: textfield;
}

.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calc-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.calc-input::placeholder {
    color: var(--text-secondary);
}

.toggle-advanced {
    display: block;
    text-align: center;
    color: var(--primary);
    margin: 20px auto;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 8px 16px;
    transition: all 0.3s ease;
    border-radius: 6px;
    width: fit-content;
}

.toggle-advanced:hover {
    text-decoration: underline;
    color: var(--primary-dark);
    background: rgba(99, 102, 241, 0.1);
}

.calc-advanced-fields {
    display: none;
    margin: 20px 0;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    flex-direction: column;
    gap: 20px;
}

.calc-advanced-fields.show {
    display: flex;
}

.calc-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
}

.calc-button {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    flex: 1;
    max-width: 300px;
}

.calc-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.1);
    transform: none;
    box-shadow: none;
}

.calc-button.reset {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    box-shadow: none;
}

.calc-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.4);
}

.calc-button.reset:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.calc-results {
    text-align: center;
    margin-top: 32px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.calc-results h3 {
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--text-primary);
}

#costOutput {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#costOutput p {
    margin: 8px 0;
    font-size: 1rem;
    line-height: 1.5;
}

#costOutput p strong {
    font-size: 1.2rem;
    color: var(--success);
}

#costOutput hr {
    margin: 16px 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Typography styles */
h1, h2 {
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: 2rem;
}

p {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.6;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .main-card {
        padding: 24px;
        border-radius: 20px;
        min-height: 400px;
    }

    .calculator-header {
        padding: 24px;
        margin: -24px -24px 24px -24px;
        border-radius: 20px 20px 0 0;
    }

    .calculator-header h1 {
        font-size: 1.5rem;
    }

    .calculator-subtitle {
        font-size: 1rem;
    }

    .calc-radio-group label {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .calc-button {
        padding: 12px 24px;
        font-size: 1rem;
    }

    .calc-actions {
        flex-direction: column;
    }

    .calc-button {
        width: 100%;
    }

    h2 {
        font-size: 1.5rem;
    }

    p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .main-card {
        padding: 20px;
        border-radius: 16px;
    }

    .calculator-header {
        padding: 20px;
        margin: -20px -20px 20px -20px;
        border-radius: 16px 16px 0 0;
    }

    .calc-radio-group {
        flex-direction: column;
    }

    .calc-radio-group label {
        width: 100%;
    }

    h2 {
        font-size: 1.3rem;
    }
}
