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

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9edf2 100%);
    padding: 30px 20px;
    color: #1e293b;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 32px;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.calculator-header {
    background: linear-gradient(135deg, #1e3c5c 0%, #1a2c3e 100%);
    color: white;
    padding: 32px 28px;
    text-align: center;
}

.calculator-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.calculator-header p {
    opacity: 0.85;
    font-size: 0.95rem;
}

.calculator-body {
    padding: 32px;
}

.form-section {
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.form-section:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-section h3 {
    font-size: 1.2rem;
    margin-bottom: 18px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    min-width: 180px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #475569;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input[type="date"] {
    font-family: inherit;
}

.radio-group, .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.radio-label, .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 8px 12px;
    background: white;
    border-radius: 40px;
    border: 1.5px solid #e2e8f0;
    transition: all 0.2s;
}

.radio-label:hover, .checkbox-label:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.radio-label input, .checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.warning {
    color: #e67e22;
    font-size: 0.8rem;
    margin-top: 8px;
    padding: 6px 12px;
    background: #fff3e0;
    border-radius: 8px;
    display: none;
}

.warning.show {
    display: block;
}

.form-buttons {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: #1e293b;
    border: 1.5px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.result-section {
    background: #f1f5f9;
    border-top: 2px solid #e2e8f0;
    padding: 28px 32px;
}

.result-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #0f172a;
}

.result-content {
    background: white;
    border-radius: 20px;
    padding: 24px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
}

.result-content p {
    color: #64748b;
    text-align: center;
    font-family: inherit;
}
/* Подсказка */
.hint {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 12px;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 8px;
}
/* Адаптивность */
@media (max-width: 768px) {
    .calculator-body {
        padding: 20px;
    }
    
    .form-section {
        padding: 16px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .result-content {
        font-size: 0.75rem;
    }
}