:root {
    --bg-color: #0b0914;
    --card-bg: rgba(23, 18, 51, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --accent-primary: #8b5cf6;
    --accent-secondary: #ec4899;
    --accent-glow: rgba(139, 92, 246, 0.3);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-glow: #ffffff;
    --sidebar-width: 280px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.15) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(30, 27, 75, 0.4) 0px, transparent 100%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Navigation */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 9, 20, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
    height: 70px;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    text-decoration: none;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo svg {
    width: 28px;
    height: 28px;
    fill: var(--accent-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-main);
}

/* Language Switcher Styling */
.lang-switch-container {
    display: flex;
    align-items: center;
}

.lang-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text-main);
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.lang-select:focus {
    border-color: var(--accent-primary);
}

.lang-select option {
    background-color: #0b0914;
    color: var(--text-main);
}


/* Hero Section */
.hero {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem 2rem 1.5rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
}

.hero p {
    color: var(--text-muted);
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layout for Calculator */
.calc-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto 3rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .calc-container {
        grid-template-columns: 350px 1fr;
    }
}

/* Tabs switcher styling */
.tabs-container {
    display: flex;
    background: rgba(11, 9, 20, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 0.25rem;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.65rem 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: var(--transition);
    text-align: center;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: white;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

/* Glassmorphism Card Style */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 15px 35px -5px rgba(139, 92, 246, 0.1);
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: fit-content;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="date"], input[type="time"] {
    background: rgba(11, 9, 20, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 500;
    outline: none;
    transition: var(--transition);
    width: 100%;
}

input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.btn-calculate {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    margin-top: 0.5rem;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.btn-calculate:active {
    transform: translateY(0);
}

/* Results Panel */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.results-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    min-height: 350px;
    border: 2px dashed var(--card-border);
    border-radius: 24px;
    color: var(--text-muted);
    padding: 2rem;
}

.results-welcome svg {
    width: 80px;
    height: 80px;
    stroke: var(--accent-primary);
    stroke-width: 1.5;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.results-content {
    display: none;
    flex-direction: column;
    gap: 2rem;
}

/* Countdown Timer */
.countdown-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.countdown-item {
    background: rgba(11, 9, 20, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1rem 0.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.countdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.countdown-value {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 800;
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.countdown-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Age Stats */
.age-breakdown {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 500px) {
    .age-breakdown {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-card {
    background: rgba(11, 9, 20, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: clamp(1.1rem, 3.5vw, 1.4rem);
    font-weight: 700;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Extra Details Row */
.details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 500px) {
    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.detail-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(11, 9, 20, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.25rem;
}

.detail-icon {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
}

.detail-info {
    display: flex;
    flex-direction: column;
}

.detail-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 0.1rem;
}

.detail-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* Fun facts */
.facts-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(236, 72, 153, 0.08) 100%);
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.facts-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.facts-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.facts-list li {
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.4;
}

.facts-list li svg {
    min-width: 18px;
    height: 18px;
    stroke: var(--accent-secondary);
    margin-top: 0.1rem;
}

/* Divider */
.divider {
    width: 100%;
    height: 1px;
    background: var(--card-border);
    margin: 4rem 0;
}

/* Content Portal (Layout) */
.portal-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .portal-layout {
        grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    }
}

/* Sticky Sidebar */
.sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .sidebar {
        display: block;
        position: sticky;
        top: 100px;
        height: calc(100vh - 140px);
        overflow-y: auto;
        scrollbar-width: none;
    }

    .sidebar::-webkit-scrollbar {
        display: none;
    }
}

.sidebar-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.sidebar-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding-left: 0.25rem;
}

.sidebar-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-links a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-links a.active {
    color: var(--accent-secondary);
    background: rgba(139, 92, 246, 0.05);
    font-weight: 600;
}

/* Mobile TOC Dropdown */
.mobile-toc {
    display: block;
    margin-bottom: 2rem;
}

@media (min-width: 1024px) {
    .mobile-toc {
        display: none;
    }
}

.mobile-toc select {
    width: 100%;
    background: #18181b;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-main);
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
}

/* Main Content Styling */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 4.5rem;
    min-width: 0;
}

.blog-post {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 4.5rem;
}

.blog-post:last-of-type {
    border-bottom: none;
}

.post-tag {
    display: inline-block;
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-main);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

strong {
    color: var(--text-main);
}

/* Step Timeline */
.step-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
    border-left: 2px solid rgba(255, 255, 255, 0.05);
    padding-left: 1.5rem;
}

.step-item {
    position: relative;
}

.step-item::before {
    content: '';
    position: absolute;
    left: calc(-1.5rem - 6px);
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.step-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

/* Premium Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: rgba(24, 24, 27, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    overflow: hidden;
}

th, td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    color: var(--text-muted);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.01);
}

/* FAQ Details */
details {
    background: rgba(23, 18, 51, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition);
}

details[open] {
    border-color: rgba(139, 92, 246, 0.2);
}

summary {
    padding: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    font-family: monospace;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: var(--transition);
}

details[open] summary::after {
    content: '−';
    color: var(--accent-secondary);
}

.faq-answer {
    padding: 0 1.25rem 1.25rem 1.25rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
}

/* Footer Area */
footer {
    border-top: 1px solid var(--card-border);
    background: #090611;
    padding: 4rem 1.5rem 2rem 1.5rem;
    margin-top: 6rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .footer-container {
        grid-template-columns: 2fr 1fr;
    }
}

.footer-brand h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.footer-brand p {
    font-size: 0.9rem;
    max-width: 500px;
}

.footer-links h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text-main);
}

.footer-copyright {
    max-width: 1200px;
    margin: 3rem auto 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}
