:root {
    --primary-color: #2C63FF;
    --primary-dark: #1a4acc;
    --accent-color: #00B96E;
    --accent-dark: #008c54;
    --neutral-light: #F6F7FB;
    --text-dark: #1A1A1A;
    --text-muted: #666666;
    --white: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --gradient-primary: linear-gradient(135deg, #2C63FF 0%, #1a4acc 100%);
    --gradient-accent: linear-gradient(135deg, #00B96E 0%, #008c54 100%);

    /* Calculator Card Colors */
    --emi-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --growth-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --topup-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --transfer-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --compare-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --networth-gradient: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--neutral-light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.main-header .container,
.main-header .header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.header-right {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
}

.currency-selector {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.currency-container {
    display: flex;
    align-items: center;
}

.calculator-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.calc-box {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #f8f9fc 0%, #f0f2f8 100%);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.calc-box:hover {
    color: var(--primary-color);
    background: linear-gradient(135deg, #fff 0%, #f8f9fc 100%);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.calc-box.active {
    color: var(--white);
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0;
}

.logo .highlight {
    color: var(--primary-color);
}

.logo .tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: -5px;
    font-weight: 400;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 10px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
}

.main-nav a:hover {
    color: var(--primary-color);
    background-color: rgba(44, 99, 255, 0.05);
}

.main-nav a.active {
    color: var(--primary-color);
    background-color: rgba(44, 99, 255, 0.1);
}

.tabs-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
}

.tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.tab-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tab-btn.active {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.tab-btn svg {
    width: 24px;
    height: 24px;
}

/* Calculator Section */
.calculator-section {
    padding: 30px 0;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: var(--white);
    padding: 35px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}

/* Hamburger Menu Styles */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger-btn .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-btn.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-btn.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }

    .calculator-container {
        grid-template-columns: 1fr;
        padding: 25px;
    }

    /* ... rest of existing media query ... */

    .header-container {
        flex-direction: row;
        align-items: center;
        padding: 0 15px;
    }

    .header-right {
        width: auto;
        justify-content: flex-end;
        gap: 15px;
    }

    .calculator-nav {
        display: none;
        /* Hidden by default on mobile, toggled via JS */
        width: 100%;
        flex-direction: column;
        padding-top: 15px;
    }

    .calculator-nav.active {
        display: flex;
    }

    .main-header {
        padding: 1rem 0;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
        /* Scale down base font size */
    }

    .container {
        padding: 0 15px;
    }

    /* Reduce font sizes for headings */
    h1,
    .logo h1 {
        font-size: 1.5rem;
    }

    h2,
    .section-header h2 {
        font-size: 1.35rem;
    }

    h3 {
        font-size: 1.15rem;
    }

    /* Adjust spacing */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 20px;
    }

    .inputs-panel,
    .results-panel,
    .calculator-container {
        padding: 20px;
    }

    .calculator-section {
        padding: 20px 0;
    }

    /* Prevent overflow */
    img,
    video,
    iframe,
    canvas,
    svg {
        max-width: 100%;
        height: auto;
    }

    .table-container {
        padding: 15px;
        margin-top: 20px;
    }

    .formula-box {
        padding: 15px;
    }

    .chart-container {
        padding: 10px;
        height: 250px;
        /* Reduce height on mobile */
    }

    /* Inputs */
    input[type="text"],
    input[type="number"],
    input[type="month"],
    select {
        padding: 10px 12px;
        /* Slightly smaller padding */
    }

    /* Footer */
    .footer-content {
        gap: 30px;
    }
}

/* Panel Header */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.panel-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.icon-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Inputs */
.inputs-panel h2,
.inputs-panel h3 {
    margin-bottom: 25px;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

input[type="text"],
input[type="number"],
input[type="month"],
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--text-dark);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="month"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 99, 255, 0.1);
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 2;
}

.input-group select {
    flex: 1;
}

.range-slider-container {
    margin-top: 12px;
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
    height: 6px;
    background: var(--border-color);
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(44, 99, 255, 0.4);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Results */
.results-panel {
    background: linear-gradient(135deg, #f8f9fc 0%, #f0f2f8 100%);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(44, 99, 255, 0.1);
}

.summary-card {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.summary-card h3 {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    font-weight: 600;
}

.emi-amount {
    font-size: 2.8rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.breakdown-grid {
    margin-bottom: 30px;
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.95rem;
    padding: 8px 0;
}

.breakdown-item span:first-child {
    color: var(--text-muted);
    font-weight: 500;
}

.breakdown-item span:last-child {
    color: var(--text-dark);
    font-weight: 600;
}

.breakdown-item.total {
    border-top: 2px solid var(--border-color);
    padding-top: 15px;
    margin-top: 10px;
    font-weight: 700;
    font-size: 1.1rem;
}

.breakdown-item.total span:last-child {
    color: var(--primary-color);
}

.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.action-buttons-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.action-buttons-row .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
}

.section-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 5px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn.primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn.secondary {
    background: var(--white);
    border: 2px solid var(--border-color);
    color: var(--text-dark);
}

.btn.secondary:hover {
    background: var(--neutral-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Prepayment List */
.prepayment-list {
    min-height: 100px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-style: italic;
}

.prepayment-item {
    background: var(--white);
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.prepayment-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.prepayment-item-info {
    flex: 1;
}

.prepayment-item-info strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.prepayment-item-info small {
    display: block;
    color: var(--text-muted);
    margin-top: 5px;
}

.prepayment-item button {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.prepayment-item button:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Amortization Section */
.amortization-section {
    padding: 40px 0 60px;
}

.table-responsive {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: linear-gradient(135deg, #f8f9fc 0%, #f0f2f8 100%);
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    color: var(--text-dark);
    font-size: 0.95rem;
}

tr:hover {
    background-color: rgba(44, 99, 255, 0.02);
}

tr:last-child td {
    border-bottom: none;
}

/* Info Section */
.info-section {
    background: var(--white);
    padding: 50px 0;
    margin: 40px 0;
}

.info-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.info-container h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.info-container h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: var(--text-dark);
}

.info-container p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--text-muted);
}

.info-container ol,
.info-container ul {
    margin-left: 25px;
    margin-bottom: 20px;
}

.info-container li {
    margin-bottom: 10px;
    line-height: 1.8;
    color: var(--text-muted);
}

.formula-box {
    background: linear-gradient(135deg, #f8f9fc 0%, #f0f2f8 100%);
    padding: 25px;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
    margin: 20px 0;
}

.formula-box p {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.formula-box ul {
    list-style: none;
    margin-left: 0;
}

.formula-box li {
    padding: 5px 0;
    color: var(--text-dark);
}

/* Footer */
.main-footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--white);
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--white);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close-modal:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 30px;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Tooltips */
[title] {
    position: relative;
}

/* Print Styles */
@media print {

    .main-header,
    .main-footer,
    .action-buttons,
    .icon-btn,
    .btn {
        display: none !important;
    }

    .calculator-container {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}

/* Responsive Header Styles */
@media (max-width: 1024px) {
    .logo h1 {
        font-size: 1.5rem;
    }

    .logo .tagline {
        font-size: 0.7rem;
    }

    .main-nav a {
        font-size: 0.9rem;
        padding: 8px 14px;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 0.7rem 0;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .logo .tagline {
        display: none;
    }

    .main-nav ul {
        gap: 4px;
    }

    .main-nav a {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.2rem;
    }

    .main-nav a {
        font-size: 0.75rem;
        padding: 6px 8px;
    }
}

/* Hide range sliders - replaced with number input spinners */
.range-slider-container {
    display: none !important;
}

input[type='range'] {
    display: none !important;
}

/* ========================================
   HOME PAGE STYLES - Additional Enhancements
   ======================================== */

/* Hero Section Styles */
.hero-section {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, rgba(44, 99, 255, 0.05) 0%, rgba(0, 185, 110, 0.05) 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 50px;
}

.hero-section h2 {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 10px;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Calculator Cards Grid */
.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding-bottom: 60px;
}

.calculator-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 35px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-primary);
    transition: height 0.3s ease;
}

.calculator-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(44, 99, 255, 0.2);
}

.calculator-card:hover::before {
    height: 100%;
    opacity: 0.05;
}

/* Card Icon */
.card-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.calculator-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.card-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding: 8px 0;
    border-bottom: 2px solid var(--border-color);
}

.calculator-card p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.calculator-card .btn {
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    padding: 14px 24px;
}

/* Individual Card Gradients */
.emi-card::before {
    background: var(--emi-gradient);
}

.emi-card:hover {
    border-color: rgba(102, 126, 234, 0.3);
}

.emi-card .card-subtitle {
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.3);
}

.growth-card::before {
    background: var(--growth-gradient);
}

.growth-card:hover {
    border-color: rgba(240, 147, 251, 0.3);
}

.growth-card .card-subtitle {
    color: #f093fb;
    border-color: rgba(240, 147, 251, 0.3);
}

.topup-card::before {
    background: var(--topup-gradient);
}

.topup-card:hover {
    border-color: rgba(79, 172, 254, 0.3);
}

.topup-card .card-subtitle {
    color: #4facfe;
    border-color: rgba(79, 172, 254, 0.3);
}

.transfer-card::before {
    background: var(--transfer-gradient);
}

.transfer-card:hover {
    border-color: rgba(67, 233, 123, 0.3);
}

.transfer-card .card-subtitle {
    color: #43e97b;
    border-color: rgba(67, 233, 123, 0.3);
}

.compare-card::before {
    background: var(--compare-gradient);
}

.compare-card:hover {
    border-color: rgba(250, 112, 154, 0.3);
}

.compare-card .card-subtitle {
    color: #fa709a;
    border-color: rgba(250, 112, 154, 0.3);
}

.networth-card::before {
    background: var(--networth-gradient);
}

.networth-card:hover {
    border-color: rgba(48, 207, 208, 0.3);
}

.networth-card .card-subtitle {
    color: #30cfd0;
    border-color: rgba(48, 207, 208, 0.3);
}

/* Mobile Responsive Adjustments for Home Page */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 20px 30px;
    }

    .hero-section h2 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .calculators-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .calculator-card {
        padding: 25px;
    }

    .card-icon {
        font-size: 2.5rem;
    }

    .calculator-card h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .hero-section h2 {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .calculator-card {
        padding: 20px;
    }
}

/* Mobile Fixes & Enhancements */

/* Prevent word breaking in nav links */
.main-nav a {
    white-space: nowrap;
}

/* Mobile Navigation Styles */
@media (max-width: 968px) {
    .main-header .header-container {
        position: relative;
    }

    .header-right {
        gap: 15px;
    }

    /* Hamburger Button Styling */
    .hamburger-btn {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        z-index: 101;
        margin-left: 10px;
    }

    .hamburger-btn .bar {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--text-dark);
        margin: 5px 0;
        transition: all 0.3s ease;
        border-radius: 3px;
    }

    .hamburger-btn.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger-btn.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-btn.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* Collapsible Navigation */
    .calculator-nav,
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px;
        flex-direction: column;
        align-items: stretch;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border-color);
        z-index: 100;
    }

    .calculator-nav.active,
    .main-nav.active {
        display: flex;
        animation: slideDown 0.3s ease-out forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .calculator-nav .calc-box,
    .main-nav a {
        text-align: left;
        padding: 12px 15px;
        margin-bottom: 5px;
        width: 100%;
        background-color: var(--neutral-light);
    }

    /* Ensure currency selector remains visible */
    .currency-selector {
        display: flex !important;
    }

    .currency-container {
        margin-right: 0;
    }

    /* Adjust logo size */
    .logo h1 {
        font-size: 1.4rem;
    }
}

/* =========================================
   Input & Layout Overflow Fixes
   ========================================= */

/* Prevent horizontal scroll globally */
html,
body {
    overflow-x: hidden;
    width: 100%;
}

/* Ensure all inputs respect container width */
input,
select,
textarea {
    max-width: 100%;
    min-width: 0;
    /* Allow shrinking */
    box-sizing: border-box !important;
}

/* Fix table overflow */
.table-responsive,
.comparison-table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: block;
}

/* =========================================
   Number Input Enhancements
   ========================================= */

/* Hide range sliders completely */
.range-slider-container,
input[type="range"] {
    display: none !important;
}

/* Show spinner controls for number inputs */
/* Specific fixes for small mobile screens (360px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
        /* Reduced padding */
    }

    .calculator-container {
        padding: 20px 12px !important;
        /* Reduced padding */
        width: 100%;
        box-sizing: border-box;
    }

    /* Stack input groups (like tenure + select) */
    .input-group {
        flex-direction: column;
        gap: 8px;
    }

    .input-group input,
    .input-group select {
        width: 100%;
        flex: none;
    }

    /* Adjust form spacing */
    .form-group {
        margin-bottom: 15px;
    }

    /* Ensure buttons don't overflow */
    .button-group {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Fix range slider width (hidden anyway) */
    input[type="range"] {
        width: 100%;
        max-width: 100%;
    }

    /* Fix radio groups wrapping */
    .radio-group {
        flex-wrap: wrap;
    }

    /* Fix Home Page Grid Overflow */
    .calculators-grid {
        grid-template-columns: 1fr !important;
    }

    .calculator-card {
        min-width: 0 !important;
        padding: 20px !important;
    }

    /* Fix Input Padding for very small screens */
    input[type="number"],
    input[type="month"],
    select {
        padding: 10px 8px;
    }
}


/* =========================================
   Global Safety Rules
   ========================================= */

/* Prevent content overflow */
*,
*::before,
*::after {
    overflow-wrap: break-word;
}

/* Responsive Media */
img,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
}

/* Ensure canvas within chart-container respects height */
.chart-container canvas {
    max-height: 100%;
    max-width: 100%;
}

@media (max-width: 480px) {

    /* Adjust Chart Container for Mobile */
    .chart-container {
        height: 250px !important;
        padding: 10px;
    }

    /* Ensure modals fit on screen */
    .modal-content {
        width: 95%;
        margin: 10px;
        padding: 0;
    }

    .modal-body {
        padding: 15px;
    }
}

/* Stepper Styles for Mobile */
.stepper-btn {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary-color);
    transition: all 0.2s;
    user-select: none;
    touch-action: manipulation;
    flex-shrink: 0;
}

.stepper-btn:hover {
    background: var(--neutral-light);
    border-color: var(--primary-color);
}

.stepper-btn:active {
    background: #eef2ff;
    transform: scale(0.95);
    border-color: var(--primary-color);
}

.stepper-wrapper {
    display: flex;
    align-items: stretch;
    width: 100%;
    position: relative;
}

/* Handle input group integration */
.input-group .stepper-wrapper {
    flex: 2;
}

@media (max-width: 768px) {
    .stepper-btn {
        display: flex;
    }

    .stepper-wrapper {
        gap: 8px;
    }

    /* Adjust input within stepper for mobile */
    .stepper-wrapper input {
        text-align: center;
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
}