/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #e0e7ff;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* ===== HEADER ===== */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.subtitle {
    color: var(--text-light);
    font-size: 1.05rem;
}

/* ===== CALCULATOR CARD ===== */
.calculator-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.input-group input[type="date"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    background: var(--bg);
}

.input-group input[type="date"]:focus {
    outline: none;
    border-color: var(--primary);
}

#calculate-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#calculate-btn:hover {
    background: var(--primary-dark);
}

/* ===== RESULTS ===== */
.results-section {
    animation: fadeIn 0.4s ease;
}

.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-main,
.result-details,
.result-fun,
.result-birthday {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.result-main h2 {
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.age-display {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.age-box {
    text-align: center;
    background: var(--primary-light);
    border-radius: 12px;
    padding: 20px 24px;
    min-width: 100px;
}

.age-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.age-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.detail-item {
    text-align: center;
    padding: 16px 8px;
    background: var(--bg);
    border-radius: 8px;
}

.detail-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Fun Facts */
.result-fun ul {
    list-style: none;
    margin-top: 12px;
}

.result-fun li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.result-fun li:last-child {
    border-bottom: none;
}

/* Birthday */
.result-birthday {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.result-birthday h3 {
    color: white;
}

#birthday-countdown {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 8px;
}

/* ===== SEO CONTENT ===== */
.seo-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-top: 30px;
}

.seo-content h2 {
    font-size: 1.3rem;
    margin: 20px 0 10px;
    color: var(--primary-dark);
}

.seo-content h2:first-child {
    margin-top: 0;
}

.seo-content h3 {
    font-size: 1.1rem;
    margin: 16px 0 8px;
}

.seo-content p {
    color: var(--text-light);
    margin-bottom: 12px;
}

/* ===== AD CONTAINERS ===== */
.ad-container {
    text-align: center;
    margin: 20px 0;
    min-height: 90px;
    background: var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.8rem;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 30px 16px;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.5rem;
    }

    .age-display {
        gap: 10px;
    }

    .age-box {
        min-width: 80px;
        padding: 16px 12px;
    }

    .age-number {
        font-size: 1.8rem;
    }

    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .calculator-card {
        padding: 20px;
    }
}