:root {
            --primary: #f43f5e;
            --primary-hover: #e11d48;
            --bg: #111827;
            --card-bg: #1f2937;
            --text: #f9fafb;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', system-ui, sans-serif;
        }

        body {
            background-color: var(--bg);
            color: var(--text);
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: 100vh;
            padding: 20px;
            transition: direction 0.3s ease;
        }

        header {
            text-align: center;
            margin: 40px 0;
        }

        h1 {
            font-size: 2.5rem;
            color: var(--primary);
            margin-bottom: 10px;
        }

        .card {
            background-color: var(--card-bg);
            padding: 40px;
            border-radius: 16px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            width: 100%;
            max-width: 500px;
            margin-bottom: 40px;
        }

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

        label {
            display: block;
            margin-bottom: 10px;
            font-size: 1.1rem;
            color: #9ca3af;
        }

        input[type="date"], input[type="number"] {
            width: 100%;
            padding: 15px;
            font-size: 1.2rem;
            border-radius: 8px;
            border: 1px solid #374151;
            background: #374151;
            color: white;
            outline: none;
        }
        
        input[type="date"]::-webkit-calendar-picker-indicator {
            filter: invert(1);
        }

        button {
            background-color: var(--primary);
            color: white;
            border: none;
            padding: 15px 30px;
            font-size: 1.1rem;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.2s;
            width: 100%;
            font-weight: bold;
        }

        button:hover {
            background-color: var(--primary-hover);
        }

        #result-container {
            margin-top: 30px;
            display: none;
            animation: fadeIn 0.5s;
            text-align: center;
        }

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

        .highlight {
            font-size: 1.8rem;
            color: var(--primary);
            font-weight: bold;
            margin: 15px 0;
            background: rgba(244, 63, 94, 0.1);
            padding: 10px;
            border-radius: 8px;
        }

        .seo-content {
            max-width: 800px;
            line-height: 1.8;
            color: #d1d5db;
        }
        .seo-content h2 {
            color: white;
            margin-top: 20px;
        }
        
        /* RTL support */
        [dir="rtl"] {
            text-align: right;
        }
        [dir="rtl"] header {
            text-align: center;
        }
        [dir="rtl"] #result-container {
            text-align: center;
        }

/* Footer */
footer {
    width: 100%;
    margin-top: 60px;
    padding: 30px 20px;
    border-top: 1px solid var(--card-bg);
    text-align: center;
}
.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}
.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: var(--primary);
}
.copyright {
    color: #6b7280;
    font-size: 0.85rem;
}

/* Static Pages */
.page-card {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 800px;
    margin-top: 20px;
    margin-bottom: 40px;
    line-height: 1.7;
}
.page-card h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #374151;
    padding-bottom: 15px;
    color: var(--primary);
}
.page-card h2 {
    font-size: 1.5rem;
    color: #f9fafb;
    margin: 30px 0 15px 0;
}
.page-card p {
    margin-bottom: 15px;
    color: #d1d5db;
    font-size: 1.05rem;
}
.page-card ul, .page-card ol {
    margin-left: 25px;
    margin-bottom: 15px;
    color: #d1d5db;
    font-size: 1.05rem;
}
.page-card li {
    margin-bottom: 8px;
}
.page-card a {
    color: var(--primary);
    text-decoration: none;
}
.page-card a:hover {
    text-decoration: underline;
}
.nav-back {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    max-width: 800px;
    margin-top: 20px;
}
.nav-back a {
    color: #9ca3af;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: color 0.2s;
}
.nav-back a:hover {
    color: var(--text);
}

/* Granular Life Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin-top: 25px;
    margin-bottom: 25px;
}
.stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s ease, background 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.07);
}
.stat-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #60a5fa;
    margin-bottom: 5px;
}
.stat-label {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Milestone Timeline Table */
.milestone-section {
    margin-top: 40px;
    width: 100%;
    max-width: 800px;
}
.milestone-table-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-top: 20px;
    overflow-x: auto;
}
.milestone-table-container h3 {
    color: var(--text);
    margin-bottom: 20px;
    font-size: 1.4rem;
}
.milestone-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.milestone-table th, .milestone-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.milestone-table th {
    color: #9ca3af;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.milestone-table td {
    color: #e5e7eb;
    font-size: 0.95rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}
.badge-achieved {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
}
.badge-next {
    background: rgba(244, 63, 94, 0.2);
    color: #f43f5e;
    animation: pulse 2s infinite;
}
.badge-future {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}
.btn-cal-link {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa !important;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}
.btn-cal-link:hover {
    background: rgba(96, 165, 250, 0.3);
    text-decoration: none !important;
}

/* FAQ Accordion */
.faq-section {
    width: 100%;
    max-width: 800px;
    margin-top: 50px;
    margin-bottom: 40px;
}
.faq-section h2 {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 25px;
    text-align: center;
}
.faq-item {
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}
.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 20px;
    font-size: 1.1rem;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-question:hover {
    background: rgba(255,255,255,0.03);
}
.faq-question::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}
.faq-item.active .faq-question::after {
    content: '−';
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
    color: #d1d5db;
    line-height: 1.7;
    font-size: 1rem;
}
.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 20px 20px 20px;
}

