/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
    line-height: 1.5;
    color: #2d3748;
    background: #f8fafc;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.title {
    font-size: 2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 1rem;
    color: #718096;
    font-weight: 400;
}

/* Main Layout */
.main {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.calculator-grid {
    display: grid;
    gap: 0;
}

/* Card Styles */
.card {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.card:last-child {
    border-bottom: none;
}


.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}


/* Radio Groups */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.radio-option:hover {
    border-color: #cbd5e0;
}

.radio-option:has(input:checked) {
    border-color: #667eea;
    background: #f0f4ff;
}

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

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option:has(input:checked) .radio-custom {
    border-color: #667eea;
}

.radio-option:has(input:checked) .radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #667eea;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.radio-label {
    font-weight: 500;
    font-size: 1rem;
}

/* Parameter Groups */
.parameter-group {
    margin-bottom: 1.5rem;
}

.parameter-label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

/* Dropdown Styles */
.dropdown {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    font-size: 1rem;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown:hover {
    border-color: #cbd5e0;
}

.dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Time Options */
.time-options {
    display: grid;
    gap: 0.75rem;
}

.time-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.time-option:hover {
    border-color: #cbd5e0;
}

.time-option:has(input:checked) {
    border-color: #667eea;
    background: #f0f4ff;
}

.time-option input[type="radio"] {
    display: none;
}

.time-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.time-option:has(input:checked) .time-custom {
    border-color: #667eea;
}

.time-option:has(input:checked) .time-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #667eea;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.time-label {
    font-weight: 600;
    font-size: 1rem;
    flex: 1;
}

.time-days {
    font-size: 0.9rem;
    color: #718096;
}

/* Results Card */
.results-card {
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}


.result-item.primary {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.result-label {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
}

.result-item.primary .result-label {
    opacity: 0.9;
}

.result-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.result-item.primary .result-value {
    font-size: 1.5rem;
}

/* Calculation Breakdown */
.calculation-breakdown {
    margin-top: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.copyable-breakdown {
    cursor: pointer;
    transition: all 0.2s ease;
}

.copyable-breakdown:hover {
    background: #f0f4ff;
    border-color: #cbd5e0;
}

.calculation-breakdown h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.calculation-note {
    font-size: 0.9rem;
    color: #718096;
    font-style: italic;
    margin-bottom: 0.75rem;
}

.formula {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #718096;
}

.copy-icon {
    margin-left: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.copyable-breakdown:hover .copy-icon {
    opacity: 1;
}

.formula strong {
    color: #667eea;
    font-weight: 600;
}

/* Coming Soon */
.coming-soon {
    text-align: center;
    padding: 1.5rem;
    color: #718096;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0.75rem;
    }
    
    .title {
        font-size: 1.75rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .slider-labels {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 0.75rem;
    }
    
    .time-option,
    .radio-option {
        padding: 0.75rem;
    }
    
    .result-value {
        font-size: 1.1rem;
    }
    
    .result-item.primary .result-value {
        font-size: 1.25rem;
    }
}


/* Focus States for Accessibility */
.slider:focus,
.radio-option:focus-within,
.time-option:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .main {
        box-shadow: none;
    }
    
    .card:hover {
        background: white;
    }
}