@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #10b981;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(255, 255, 255, 0.05);
    --danger: #ef4444;
}

.toggle-btn {
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--glass-border);
    background: var(--input-bg);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.toggle-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* --- Header Styles --- */
.main-header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 20px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.3);
}

.logo span {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    color: #fff;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid var(--glass-border);
    padding: 8px 20px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.mobile-menu-btn {
    display: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Layout Wrapper (adjusted) --- */
.calculator-wrapper {
    width: 100%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    margin-top: 40px;
    /* added margin due to sticky header */
    padding: 0 20px;
}

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

.calc-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--glass-shadow);
}

.results-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

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

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
}

input,
select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    padding: 14px 16px 14px 44px;
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.btn-calc {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-calc:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
}

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

.payment-result {
    text-align: center;
    padding: 30px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.payment-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.payment-amount {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.pi-sub-label {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-card {
    background: var(--glass);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.stat-card .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-card .value {
    font-size: 1.2rem;
    font-weight: 700;
}

.chart-container {
    background: var(--glass);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--glass-border);
    flex-grow: 1;
    min-height: 250px;
}

.error-msg {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

.seo-content {
    margin-top: 60px;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
    opacity: 0;
    padding: 0 20px;
    /* Added padding */
}

.seo-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    background: linear-gradient(to right, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 24px;
}

.seo-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 12px;
}

.seo-content ul {
    list-style: none !important;
    padding: 0 !important;
}

.seo-content ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 15px;
}

.seo-content ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 800;
}

/* --- Footer Styles --- */
.main-footer {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border-top: 1px solid var(--glass-border);
    margin-top: 80px;
    padding-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 0 20px 60px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
}

.footer-desc {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
    max-width: 300px;
}

.footer-links-group h4,
.footer-social h4 {
    color: #fff;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links-group a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.footer-links-group a:hover {
    color: var(--primary);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    border-color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    body {
        padding: 0;
    }

    /* Reset body padding since we use internal wrappers */
    .calc-card {
        padding: 25px;
    }

    h1 {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-logo,
    .social-icons {
        justify-content: center;
    }

    .footer-desc {
        margin: 0 auto;
    }
}

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

    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 480px) {
    .row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .payment-amount {
        font-size: 2.2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.transparency-section h4 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.02em;
}

.transparency-section p,
.transparency-section li {
    color: var(--text-muted);
}

.transparency-section ul li {
    margin-bottom: 8px;
}