:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f172a;
    --accent: #10b981;
    --background: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Bank Category Colors */
    --private: #3b82f6;
    --state: #ef4444;
    --islamic: #10b981;
    --foreign: #8b5cf6;
}

/* Dark Mode Overrides */
body.dark-mode {
    --primary: #6366f1;
    --primary-dark: #818cf8;
    --secondary: #f8fafc;
    --background: #020617;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --white: #0f172a;
    --border: #1e293b;
    --shadow: 0 10px 40px rgba(0,0,0,0.5);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4, .logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header styling */
.main-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 3000;
    backdrop-filter: blur(8px);
    transition: background-color 0.3s, border-color 0.3s;
}

/* Dark Mode Utilities */
body.dark-mode .main-header { background-color: rgba(15, 23, 42, 0.9); }
body.dark-mode .hero-section,
body.dark-mode .loan-hero,
body.dark-mode .emi-hero { background: linear-gradient(135deg, #020617 0%, #0f172a 100%); }
body.dark-mode .rate-card, 
body.dark-mode .white-card, 
body.dark-mode .checker-card { background: var(--white); border-color: var(--border); }
body.dark-mode input, 
body.dark-mode select { background: #1e293b; color: white; border-color: #334155; }
body.dark-mode .lang-toggle { background: #1e293b; border-color: #334155; }
body.dark-mode .lang-toggle button.active { background: #334155; color: white; }

.main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    color: var(--secondary);
    text-decoration: none;
}

.logo span span {
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none !important;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--secondary);
    padding: 10px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Language Switcher */
.lang-toggle {
    display: flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 99px;
    border: 1px solid #e2e8f0;
}

.lang-toggle button {
    padding: 4px 12px;
    border-radius: 99px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.2s;
}

.lang-toggle button.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Multi-language font support */
body.lang-bn {
    font-family: 'Hind Siliguri', sans-serif;
}

/* Futuristic UI Blocks */
.glass-dark {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.neon-glow {
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.25);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1;
}

/* Feature list fix */
.feature-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    line-height: 1.4;
}

/* Glassmorphism & Modern Text Gradients */
.text-gradient {
    background: linear-gradient(135deg, #1e293b, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Dropdown styling */
.dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 10px 0;
    z-index: 1000;
    top: 100%;
    border: 1px solid var(--border);
    animation: fadeIn 0.3s ease;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
}

.dropdown-content a:hover {
    background-color: #f8fafc;
    color: var(--primary);
}

.dropdown:hover .dropdown-content {
    display: block;
}

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

/* Buttons */
.btn-primary-outline {
    border: 1.5px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    background: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

.btn-submit {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* Hero Section */
.hero-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, var(--white) 0%, var(--background) 100%);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    max-width: 850px;
    line-height: 1.2;
}

.hero-text h1 span {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 3.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Calculator Card */
.calculator-card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 900px;
    border: 1px solid var(--border);
}

.calc-grid {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--secondary);
}

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

.currency-tag {
    position: absolute;
    left: 1rem;
    font-weight: 700;
    color: var(--text-muted);
}

.input-with-icon input {
    width: 100%;
    padding: 1rem 1rem 1rem 2.5rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: border-color 0.2s;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary);
}

.tenure-toggle {
    display: flex;
    background-color: var(--background);
    padding: 0.4rem;
    border-radius: 12px;
    gap: 0.25rem;
}

.tenure-btn {
    flex: 1;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    background: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.tenure-btn.active {
    background-color: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow);
}

.tax-toggle {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Results Section */
.results-section {
    padding: 4rem 0 8rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.header-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.header-info p {
    color: var(--text-muted);
}

.filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-box input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background-color: var(--white);
    width: 250px;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--primary);
}

.filters select {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background-color: var(--white);
    font-weight: 500;
    cursor: pointer;
    outline: none;
}

/* Bank Grid & Cards */
.bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.bank-card {
    background-color: var(--white);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.bank-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.best-badge {
    position: absolute;
    top: 1.5rem;
    right: -2.5rem;
    background-color: var(--accent);
    color: var(--white);
    padding: 0.25rem 3rem;
    font-size: 0.7rem;
    font-weight: 800;
    transform: rotate(45deg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    z-index: 1;
    letter-spacing: 0.5px;
}

.empty-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 2rem;
    background-color: var(--white);
    border-radius: 24px;
    border: 2px dashed var(--border);
    color: var(--text-muted);
}

.empty-results i {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-results h3 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.bank-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.bank-card.private::before { background-color: var(--private); }
.bank-card.islamic::before { background-color: var(--islamic); }
.bank-card.state::before { background-color: var(--state); }
.bank-card.foreign::before { background-color: var(--foreign); }

.bank-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.bank-logo-wrap {
    width: 48px;
    height: 48px;
    background-color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.bank-logo-wrap.large {
    width: 64px;
    height: 64px;
}

.bank-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

.bank-info {
    flex: 1;
}

.bank-info h3 {
    font-size: 1.25rem;
    color: var(--secondary);
}

.bank-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    margin-top: 0.4rem;
    display: inline-block;
}

.bank-icon-placeholder {
    width: 48px;
    height: 48px;
    background-color: var(--background);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.rate-badge {
    text-align: right;
}

.interest-rate {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
}

.interest-rate span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.maturity-info {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.amount-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.maturity-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.profit-data {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.profit-item span:first-child {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.profit-item span:last-child {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Footer Styling */
.main-footer {
    background-color: var(--secondary);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    margin-bottom: 4rem;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: #94a3b8;
    max-width: 400px;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

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

/* FAQ Section */
.faq-section {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
}

.section-center-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-center-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

.faq-item h4 {
    margin-bottom: 1rem;
    color: var(--secondary);
    font-size: 1.1rem;
}

.faq-item p {
    color: var(--text-muted);
}

/* Scroll Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 99;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    transform: translateY(-5px);
    background-color: var(--primary-dark);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--white);
    width: 95%;
    max-width: 850px;
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scheme-details-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.suggestion-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 16px;
    padding: 1.5rem;
}

.suggestion-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestion-content h5 {
    color: var(--secondary);
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.senior-toggle-group {
    padding-top: 1rem;
    border-top: 1px solid #eee;
    margin-top: 1rem;
}

.checkbox-label:hover span {
    color: var(--primary);
}

.guide-section {
    padding: 100px 0;
    background: #fdfdfd;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.guide-card {
    background: #fff;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    border: 1px solid #f2f2f2;
}

.guide-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.06);
}

.guide-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.guide-card h3 {
    margin-bottom: 1rem;
    color: var(--secondary);
    font-size: 1.3rem;
}

.guide-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Modal Responsiveness */
@media (max-width: 768px) {
    .modal-content {
        width: 92% !important;
        padding: 2.5rem 1.5rem !important;
        margin: 5% auto;
    }
    
    .scheme-details-grid {
        grid-template-columns: 1fr !important;
    }
}

.suggestion-content p {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

.suggestion-content p:last-child {
    margin-bottom: 0;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.8rem;
    color: var(--secondary);
}

.rules-list {
    list-style: none;
    margin-bottom: 2.5rem;
}

.rules-list li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.5;
}

.rules-list li i {
    color: var(--accent);
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.modal-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-full {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-full-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-full-primary:hover {
    background-color: var(--primary-dark);
}

.copyright {
    border-top: 1px solid #1e293b;
    padding-top: 2rem;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .calc-grid {
        grid-template-columns: 1fr 1fr;
    }
    .hero-text h1 {
        font-size: 2.25rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 5rem 2.5rem;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 2500;
        display: flex; 
        gap: 2rem;
        align-items: flex-start;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.25rem;
        width: 100%;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border);
    }
    
    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        color: var(--secondary);
        cursor: pointer;
        padding: 8px;
        z-index: 2600;
        position: relative;
    }

    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.4);
        backdrop-filter: blur(8px);
        display: none;
        z-index: 2200;
    }
    
    .nav-overlay.active {
        display: block;
    }
    
    .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1.5rem;
        display: none; 
        animation: none;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }
    
    .dropdown:hover .dropdown-content {
        display: block;
    }

    .calc-grid {
        grid-template-columns: 1fr;
    }
    .hero-section {
        padding: 2rem 0;
    }
    .bank-grid {
        grid-template-columns: 1fr;
    }
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box input {
        width: 100%;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}
