/* Additional inline styles can be added here if necessary */
/* Reset and Base Styles */
/* Your existing CSS with improvements for responsiveness */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3a7bd5;
    --secondary-color: #00d2ff;
    --accent-color: #ff6b6b;
    --success-color: #4CAF50;
    --warning-color: #ff9f43;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --text-color: #2d3436;
    --text-light: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --gradient-primary: linear-gradient(135deg, #4b6d91, #3c5774);
    --gradient-secondary: linear-gradient(135deg, #82bcfa, #426589);
    --glass-bg: rgba(255, 255, 255, 0.518);
    --highlight: #4361ee;
    --highlight-gradient: linear-gradient(135deg, #4361ee, #3a0ca3);
}

body {
      font-family: 'Montserrat';
    background: linear-gradient(to bottom right, #F8F9FA, #E1F5C4);
    min-height: 100vh;
    margin: 0;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: 500;
}

h2 {
    color: #444;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    padding-left: 15px;
}

/* Overview Section */
.overview-section {
    margin-bottom: 40px;
}

.balance-card {
    background: linear-gradient(135deg, #8cb7e5, #34495e);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.balance-card h3 {
    font-size: 1.2em;
    font-weight: 500;
    margin-bottom: 10px;
    opacity: 0.9;
}

.balance-amount {
    font-size: 3em;
    font-weight: bold;
    margin: 10px 0;
}

.balance-card small {
    opacity: 0.8;
    font-size: 0.9em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.stat-card {
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.stat-card h4 {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

.stat-card p {
    font-size: 1.8em;
    font-weight: bold;
}

.income-card {
    background-color: #d4edda;
}

.income-card p {
    color: #155724;
}

.expense-card {
    background-color: #f8d7da;
}

.expense-card p {
    color: #721c24;
}

.investment-card {
    background-color: #d1ecf1;
}

.investment-card p {
    color: #0c5460;
}

.loan-card {
    background-color: #fff3cd;
}

.loan-card p {
    color: #856404;
}

/* Section Styling */
.section {
    margin-bottom: 40px;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 10px;
}

/* Form Styling */
.input-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.loan-form {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.input-form select,
.input-form input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.input-form select:focus,
.input-form input:focus {
    outline: none;
    border-color: #667eea;
}

.input-form button {
    padding: 12px 25px;
    background: linear-gradient(135deg, #8cb7e5, #34495e);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.input-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Transaction List */
.transaction-list {
    display: grid;
    gap: 10px;
}

.transaction-item {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.transaction-item:hover {
    transform: translateX(5px);
}

.transaction-info {
    flex: 1;
}

.transaction-category {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.transaction-description {
    color: #666;
    font-size: 0.9em;
}

.transaction-provider {
    color: #888;
    font-size: 0.85em;
    font-style: italic;
}

.transaction-interest {
    color: #ff6b6b;
    font-size: 0.85em;
    margin-top: 3px;
}

.transaction-amount {
    font-size: 1.3em;
    font-weight: bold;
    margin-right: 15px;
}

.income-amount {
    color: #28a745;
}

.expense-amount {
    color: #dc3545;
}

.investment-amount {
    color: #17a2b8;
}

.loan-amount {
    color: #ffc107;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.delete-btn:hover {
    background-color: #c82333;
}

/* Chart Section */
.chart-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.chart-header h2 {
    font-weight: 400;
    margin: 0;
    border: none;
    padding: 0;
}

.back-btn {
    padding: 10px 20px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background-color: #5a6268;
    transform: translateX(-3px);
}

.back-btn:active {
    transform: scale(0.98);
}

.chart-container {
    position: relative;
    height: 350px;
    margin-bottom: 20px;
}

.chart-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-label {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.legend-value {
    font-weight: 700;
    color: #667eea;
}

.chart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.1rem;
}

.chart-empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Section Header with Clear Button */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h2 {
    margin: 0;
    font-weight: 500;
}

.clear-btn {
    padding: 8px 16px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.clear-btn:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
}

.clear-btn:active {
    transform: scale(0.98);
}

/* Danger Zone */
.danger-zone {
    margin-top: 40px;
    padding: 25px;
    background-color: #fff5f5;
    border: 2px dashed #ff6b6b;
    border-radius: 12px;
    text-align: center;
}

.danger-zone h3 {
    color: #e03131;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.danger-zone p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.clear-all-btn {
    padding: 12px 30px;
    background-color: #e03131;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clear-all-btn:hover {
    background-color: #c92a2a;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(224, 49, 49, 0.4);
}

.clear-all-btn:active {
    transform: scale(0.98);
}

/* Confirmation Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3em;
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    margin: 0 0 20px 0;
    color: #555;
    font-size: 1.05em;
    line-height: 1.6;
}

.modal-warning {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 6px;
}

.warning-icon {
    font-size: 1.5em;
}

.modal-warning span:last-child {
    color: #856404;
    font-weight: 600;
    font-size: 0.95em;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-cancel-btn,
.modal-confirm-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-cancel-btn {
    background-color: #f1f3f5;
    color: #495057;
}

.modal-cancel-btn:hover {
    background-color: #e9ecef;
}

.modal-confirm-btn {
    background-color: #dc3545;
    color: white;
}

.modal-confirm-btn:hover {
    background-color: #c82333;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.modal-cancel-btn:active,
.modal-confirm-btn:active {
    transform: scale(0.98);
}

/* Success Notification */
.success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 600;
}

.success-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.success-icon {
    width: 24px;
    height: 24px;
    background-color: white;
    color: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
}

/* Loan-specific styling for months pending */
.transaction-months-pending {
    color: #667eea;
    font-size: 0.85em;
    margin-top: 4px;
    font-weight: 600;
}

.transaction-months-pending span {
    background-color: #e7f5ff;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Optional field styling */
input[type="number"]::placeholder {
    font-style: italic;
    opacity: 0.6;
}

/* Enhance loan form grid for better spacing */
.loan-form {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

/* Edit Button */
.edit-btn {
    background-color: #667eea;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-right: 8px;
}

.edit-btn:hover {
    background-color: #5568d3;
}

.edit-btn:active {
    transform: scale(0.98);
}

/* Edit Form */
.edit-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-field input,
.form-field select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: #667eea;
}

/* Transaction item with edit button */
.transaction-item {
    position: relative;
}

.transaction-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Information Section Styles */
.info-section {
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

.info-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.info-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.info-card h3 {
    color: #000000;
    font-weight: 400;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.info-card p {
    color: #555;
    line-height: 1.7;
    font-size: 1.05em;
}

.info-benefits h3,
.key-features h3 {
    color: #333;
    font-weight: 400;
    margin-bottom: 20px;
    font-size: 1.4em;
    text-align: center;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.benefit-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.benefit-icon {
    font-size: 2.5em;
    display: block;
    margin-bottom: 10px;
}

.benefit-item h4 {
    color: #000000;
    font-weight: 400;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.benefit-item p {
    color: #666;
    font-size: 0.95em;
    line-height: 1.6;
}

.key-features {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    font-size: 1em;
    line-height: 1.6;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list strong {
    color: #667eea;
    font-weight: 400;
}
/* ===== IMPROVED NAVIGATION SYSTEM ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    width: 90%;
    height: 9vh;
    max-width: 1100px;
    margin: 0.5rem auto;
    position: sticky;
    top: 10px;
    z-index: 1000;
    background: #7aacde93;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Slight hover lift */
.navbar:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 2100;
    padding: 8px;
    border-radius: 5px;
    transition: background 0.3s;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger span {
    width: 35px;
    height: 3px;
    background: rgb(0, 0, 0);
    border-radius: 2px;
    transition: all 0.3s ease;
}


/* Hamburger animation when active */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Side Menu */
.calculator-nav {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100%;
    background: linear-gradient(135deg, #3c4a59, #34495e);
    padding: 80px 20px 20px 20px;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1500;
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.2);
}

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

/* Close button */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Category styles */
.nav-category {
    margin-bottom: 10px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.05);
}

.category-btn {
    width: 100%;
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.category-btn i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.category-btn .arrow {
    transition: transform 0.3s ease;
}

.category-btn.active .arrow {
    transform: rotate(180deg);
}

/* Submenu */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgba(0, 0, 0, 0.2);
}

.submenu.active {
    max-height: 500px;
}

.submenu .nav-btn {
    background: none;
    border: none;
    text-align: left;
    color: #ddd;
    padding: 12px 20px 12px 50px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    width: 100%;
}

.submenu .nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding-left: 55px;
}

.nav-btn.active {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

.nav-icon {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Keep "always-open" category expanded */
.nav-category.always-open .submenu {
    max-height: none !important;
    /* no collapse */
    background: rgba(0, 0, 0, 0.2);
}

.nav-category.always-open .category-btn {
    cursor: default;
    justify-content: flex-start;
}

.nav-category.always-open .arrow {
    display: none;
    /* hide arrow since no toggle */
}


/* Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1200;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* FULLY RESPONSIVE BREAKPOINTS - 200px intervals down to 100px */

/* 1200px and above */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
        padding: 30px;
    }
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .input-form {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 1000px - 1199px */
@media (max-width: 1199px) and (min-width: 1000px) {
    .container {
        max-width: 1000px;
        padding: 25px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .input-form {
        grid-template-columns: repeat(2, 1fr);
    }
    .balance-amount {
        font-size: 2.5em;
    }
}

/* 800px - 999px */
@media (max-width: 999px) and (min-width: 800px) {
    .container {
        max-width: 800px;
        padding: 20px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .input-form {
        grid-template-columns: repeat(2, 1fr);
    }
    .balance-amount {
        font-size: 2.2em;
    }
    h1 {
        font-size: 2.2em;
    }
    .chart-container {
        height: 300px;
    }
}

/* 600px - 799px */
@media (max-width: 799px) and (min-width: 600px) {
    .container {
        max-width: 600px;
        padding: 18px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .input-form {
        grid-template-columns: 1fr;
    }
    .balance-amount {
        font-size: 2em;
    }
    h1 {
        font-size: 2em;
    }
    .chart-container {
        height: 250px;
    }
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .transaction-amount {
        margin: 10px 0;
    }
    .delete-btn {
        margin-top: 10px;
        width: 100%;
    }
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .back-btn {
        width: 100%;
        justify-content: center;
    }
    .chart-legend {
        grid-template-columns: 1fr;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .clear-btn {
        width: 100%;
        justify-content: center;
    }
    .clear-all-btn {
        width: 100%;
        justify-content: center;
    }
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    .modal-footer {
        flex-direction: column;
    }
    .modal-cancel-btn,
    .modal-confirm-btn {
        width: 100%;
    }
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    .transaction-actions {
        width: 100%;
        margin-top: 10px;
    }
    .edit-btn,
    .delete-btn {
        flex: 1;
    }
    .navbar {
                padding: 1rem;
            }

            .calculator-nav {
                width: 300px;
                right: -300px;
            }

            .submenu .nav-btn {
                padding: 10px 15px 10px 45px;
            }

            .submenu .nav-btn:hover {
                padding-left: 50px;
            }
            
}

/* 400px - 599px */
@media (max-width: 599px) and (min-width: 400px) {
    .container {
        max-width: 400px;
        padding: 15px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .input-form {
        grid-template-columns: 1fr;
    }
    .balance-amount {
        font-size: 1.8em;
    }
    h1 {
        font-size: 1.8em;
    }
    .chart-container {
        height: 200px;
    }
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .transaction-amount {
        margin: 10px 0;
    }
    .delete-btn {
        margin-top: 10px;
        width: 100%;
    }
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .back-btn {
        width: 100%;
        justify-content: center;
    }
    .chart-legend {
        grid-template-columns: 1fr;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .clear-btn {
        width: 100%;
        justify-content: center;
    }
    .clear-all-btn {
        width: 100%;
        justify-content: center;
    }
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    .modal-footer {
        flex-direction: column;
    }
    .modal-cancel-btn,
    .modal-confirm-btn {
        width: 100%;
    }
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    .transaction-actions {
        width: 100%;
        margin-top: 10px;
    }
    .edit-btn,
    .delete-btn {
        flex: 1;
    }
    .info-section {
        padding: 20px;
    }
    .benefit-icon {
        font-size: 2em;
    }
    .success-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }
    .success-notification.show {
        transform: translateY(0);
    }
    
}

/* 200px - 399px */
@media (max-width: 399px) and (min-width: 200px) {
    .container {
        max-width: 100%;
        padding: 10px;
        margin: 5px;
        border-radius: 10px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .input-form {
        grid-template-columns: 1fr;
    }
    .balance-amount {
        font-size: 1.5em;
    }
    h1 {
        font-size: 1.5em;
    }
    .chart-container {
        height: 180px;
    }
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }
    .transaction-amount {
        margin: 8px 0;
        font-size: 1.1em;
    }
    .delete-btn {
        margin-top: 8px;
        width: 100%;
        padding: 6px 12px;
    }
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .back-btn {
        width: 100%;
        justify-content: center;
        padding: 8px 16px;
    }
    .chart-legend {
        grid-template-columns: 1fr;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .clear-btn {
        width: 100%;
        justify-content: center;
        padding: 6px 12px;
    }
    .clear-all-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
    }
    .modal-content {
        width: 98%;
        margin: 10px;
    }
    .modal-footer {
        flex-direction: column;
    }
    .modal-cancel-btn,
    .modal-confirm-btn {
        width: 100%;
        padding: 8px 16px;
    }
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    .transaction-actions {
        width: 100%;
        margin-top: 8px;
    }
    .edit-btn,
    .delete-btn {
        flex: 1;
        padding: 6px 12px;
    }
    .info-section {
        padding: 15px;
    }
    .benefit-icon {
        font-size: 1.8em;
    }
    .success-notification {
        top: 5px;
        right: 5px;
        left: 5px;
        transform: translateY(-100px);
        padding: 12px 18px;
    }
    .success-notification.show {
        transform: translateY(0);
    }
    .section {
        padding: 15px;
        margin-bottom: 30px;
    }
    .balance-card {
        padding: 20px;
    }
    .stat-card {
        padding: 15px;
    }
    .stat-card p {
        font-size: 1.5em;
    }
    .calculator-nav {
                width: 280px;
                right: -280px;
                padding: 70px 15px 15px 15px;
            }
}

/* 100px - 199px */
@media (max-width: 199px) and (min-width: 100px) {
    .container {
        max-width: 100%;
        padding: 5px;
        margin: 2px;
        border-radius: 8px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .input-form {
        grid-template-columns: 1fr;
    }
    .balance-amount {
        font-size: 1.2em;
    }
    h1 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }
    h2 {
        font-size: 1.1em;
        padding-left: 8px;
    }
    .chart-container {
        height: 150px;
    }
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px;
    }
    .transaction-amount {
        margin: 6px 0;
        font-size: 1em;
    }
    .delete-btn {
        margin-top: 6px;
        width: 100%;
        padding: 4px 8px;
        font-size: 0.8em;
    }
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .back-btn {
        width: 100%;
        justify-content: center;
        padding: 6px 12px;
        font-size: 0.8em;
    }
    .chart-legend {
        grid-template-columns: 1fr;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .clear-btn {
        width: 100%;
        justify-content: center;
        padding: 4px 8px;
        font-size: 0.8em;
    }
    .clear-all-btn {
        width: 100%;
        justify-content: center;
        padding: 8px 16px;
        font-size: 0.9em;
    }
    .modal-content {
        width: 99%;
        margin: 5px;
    }
    .modal-header {
        padding: 15px;
    }
    .modal-body {
        padding: 15px;
    }
    .modal-footer {
        flex-direction: column;
        padding: 15px;
    }
    .modal-cancel-btn,
    .modal-confirm-btn {
        width: 100%;
        padding: 6px 12px;
        font-size: 0.9em;
    }
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    .transaction-actions {
        width: 100%;
        margin-top: 6px;
    }
    .edit-btn,
    .delete-btn {
        flex: 1;
        padding: 4px 8px;
        font-size: 0.8em;
    }
    .info-section {
        padding: 10px;
    }
    .benefit-icon {
        font-size: 1.5em;
    }
    .success-notification {
        top: 2px;
        right: 2px;
        left: 2px;
        transform: translateY(-100px);
        padding: 8px 12px;
        font-size: 0.9em;
    }
    .success-notification.show {
        transform: translateY(0);
    }
    .section {
        padding: 10px;
        margin-bottom: 20px;
    }
    .balance-card {
        padding: 15px;
    }
    .stat-card {
        padding: 10px;
    }
    .stat-card p {
        font-size: 1.2em;
    }
    .input-form select,
    .input-form input {
        padding: 8px;
        font-size: 0.9em;
    }
    .input-form button {
        padding: 8px 16px;
        font-size: 0.9em;
    }
    .chart-section {
        padding: 10px;
    }
    .info-card {
        padding: 15px;
    }
    .benefit-item {
        padding: 15px;
    }
    .key-features {
        padding: 15px;
    }
}

footer {
    background: linear-gradient(135deg, #4b6d91, #3c5774);
    color: #fff;
    text-align: center;
    padding: 40px 20px 20px;
    font-family: Arial, sans-serif;
}

#ppp {
    color: white;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Social Icons */
.footer-social {
    margin-bottom: 20px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    text-decoration: none;
    height: 45px;
    margin: 0 8px;
    background: #fff;
    color: #000;
    border-radius: 50%;
    font-size: 20px;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    transform: translateY(-4px);
    background: #7777778f;
    color: #000;
}

/* Footer Links */
.footer-links {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s ease;
    position: relative;
}

.footer-links a:hover {
    color: #c4c1c1f0;
}

/* Tooltip from data-desc */
.footer-links a::after {
    content: attr(data-desc);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.footer-links a:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    bottom: -35px;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    margin-top: 20px;
    padding-top: 15px;
}

.footer-bottom p {
    font-size: 14px;
    opacity: 0.9;
    color: white;
}

.footer-bottom span {
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    footer {
        padding: 2rem 1rem;
    }

    .footer-links {
        gap: 15px;
    }

    .footer-links a {
        font-size: 14px;
    }

    .footer-links a::after {
        display: none;
        /* hide tooltips on small screens */
    }

    .footer-social a {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .footer-bottom p {
        font-size: 12px;
    }

    .popular-links a {
        color: #fff;
        font-size: 12px;
        text-decoration: none;
        transition: color 0.3s ease;
    }
}

/* Popular Links */
.popular-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-links a:hover {
    color: #c4c1c1f0;
    text-decoration: underline;
}
