:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #22c55e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 { font-size: 2rem; margin-bottom: 10px; color: var(--primary); }

.calculator-card, .results-card, .modal-content {
    background: var(--card);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.input-group { display: flex; flex-direction: column; }

label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

input, select {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
    background: none;
    border: 1px solid var(--border);
    padding: 10px;
    width: 100%;
    margin-top: 20px;
    cursor: pointer;
}

/* Results Styling */
.hidden { display: none !important; }

.results-card {
    border-top: 4px solid var(--success);
    animation: fadeIn 0.5s ease-out;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.result-item {
    padding: 15px;
    background: var(--bg);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.result-item span { font-size: 0.85rem; color: var(--text-light); }
.result-item strong { font-size: 1.25rem; }
.result-item.highlight { background: #eff6ff; border: 1px solid #bfdbfe; }
.result-item.highlight strong { color: var(--primary); }

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content { max-width: 500px; text-align: center; }
.modal-content h3 { margin-bottom: 15px; }
.modal-content input { width: 100%; margin-bottom: 10px; }
.privacy-note { font-size: 0.75rem; color: var(--text-light); margin-top: 15px; }
.error-text { color: #dc2626; font-size: 0.8rem; margin-bottom: 10px; display: block; }

/* Misc */
.info-section { margin-top: 50px; font-size: 0.9rem; }
.faq summary { font-weight: 600; cursor: pointer; padding: 10px 0; }
.disclaimer { margin-top: 30px; padding: 20px; background: #fff7ed; border-radius: 8px; color: #9a3412; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .results-grid { grid-template-columns: 1fr; }
}