:root {
            /* Light theme */
            --bg-primary: #f8fafc;
            --bg-secondary: #ffffff;
            --bg-tertiary: #f1f5f9;
            --text-primary: #0f172a;
            --text-secondary: #475569;
            --text-muted: #64748b;
            --accent-primary: #274c77;
            --accent-secondary: #6096ba;
            --accent-success: #10b981;
            --accent-warning: #f59e0b;
            --accent-danger: #ef4444;
            --border-light: #e2e8f0;
            --border-medium: #cbd5e1;
            --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-md: 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);
            --radius-sm: 0.375rem;
            --radius-md: 0.5rem;
            --radius-lg: 0.75rem;
            --radius-xl: 1rem;
        }

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

        html {
            scroll-behavior: smooth;
            overflow-x: hidden;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background-color: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;
            transition: background-color 0.3s ease, color 0.3s ease;
            overflow-x: hidden;
            width: 100%;padding-top: 70px;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 1rem;
            width: 100%;
            overflow-x: hidden;
        }

        /* Header */
        .headernew {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1.5rem 0;
            border-bottom: 1px solid var(--border-light);
            margin-bottom: 2rem;
            width: 100%;
        }

        .logo-text {
            min-width: 0;
        }

        .logo-text h1 {
            font-size: 1.5rem;
            font-weight: 700;
            line-height: 1.2;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .logo-text p {
            color: var(--text-muted);
            font-size: 0.875rem;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .theme-toggle {
            background: var(--bg-secondary);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-md);
            padding: 0.5rem 0.75rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            cursor: pointer;
            transition: all 0.2s ease;
            flex-shrink: 0;
        }

        .theme-toggle:hover {
            background: var(--bg-tertiary);
        }

        .theme-toggle svg {
            width: 1.25rem;
            height: 1.25rem;
        }

        /* Main Grid Layout */
        .main-grid {
            display: grid;
            grid-template-columns: 1fr 400px;
            gap: 2rem;
            margin-bottom: 3rem;
            width: 100%;
        }

        /* Cards */
        .card {
            background: var(--bg-secondary);
            border-radius: var(--radius-xl);
            box-shadow: var(--shadow-md);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            width: 100%;
            overflow: hidden;
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.25rem;
            width: 100%;
        }

        .card-title {
            font-size: 1.125rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        /* Form Elements */
        .form-group {
            margin-bottom: 1.25rem;
            width: 100%;
        }

        .form-label {
            display: block;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
            width: 100%;
        }

        .form-input {
            width: 100%;
            padding: 0.75rem 1rem;
            background: var(--bg-primary);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-md);
            font-size: 1rem;
            color: var(--text-primary);
            transition: all 0.2s ease;
            box-sizing: border-box;
        }

        .form-input:focus {
            outline: none;
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
        }

        .input-group {
            display: flex;
            gap: 0.75rem;
            width: 100%;
        }

        .input-group .form-input {
            flex: 1;
            min-width: 0;
        }

        .input-group .form-select {
            width: auto;
            min-width: 120px;
            flex-shrink: 0;
        }

        .form-select {
            padding: 0.75rem 1rem;
            background: var(--bg-primary);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-md);
            font-size: 1rem;
            color: var(--text-primary);
            cursor: pointer;
            box-sizing: border-box;
        }

        .form-select:focus {
            outline: none;
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
        }

        .form-hint {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
            width: 100%;
        }

        /* Buttons */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.75rem 1.5rem;
            border-radius: var(--radius-md);
            font-weight: 500;
            font-size: 0.875rem;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
            box-sizing: border-box;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
            color: white;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }

        .btn-secondary {
            background: var(--bg-tertiary);
            color: var(--text-secondary);
            border: 1px solid var(--border-light);
        }

        .btn-secondary:hover {
            background: var(--border-light);
        }

        .btn-group {
            display: flex;
            gap: 0.75rem;
            margin-top: 1.5rem;
            width: 100%;
        }

        /* Results */
        .results-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            margin-bottom: 1.5rem;
            width: 100%;
        }

        .result-card {
            background: var(--bg-primary);
            border-radius: var(--radius-lg);
            padding: 1.25rem;
            text-align: center;
            width: 100%;
            box-sizing: border-box;
        }

        .result-label {
            font-size: 0.875rem;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
        }

        .result-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--accent-primary);
        }

        .result-subvalue {
            font-size: 0.875rem;
            color: var(--text-muted);
        }

        /* Charts */
        .chart-container {
            position: relative;
            height: 300px;
            margin-bottom: 1.5rem;
            width: 100%;
        }

        /* Tabs */
        .tabs {
            display: flex;
            border-bottom: 1px solid var(--border-light);
            margin-bottom: 1.5rem;
        }

        .tab {
            padding: 0.75rem 1.5rem;
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-weight: 500;
            cursor: pointer;
            border-bottom: 2px solid transparent;
            transition: all 0.2s ease;
        }

        .tab.active {
            color: var(--accent-primary);
            border-bottom-color: var(--accent-primary);
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        /* Comparison Section */
        .comparison-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        .comparison-card {
            background: var(--bg-primary);
            border-radius: var(--radius-lg);
            padding: 1.25rem;
            text-align: center;
        }

        /* Sidebar */
        .sidebar-section {
            margin-bottom: 1.5rem;
            width: 100%;
        }

        .history-list {
            max-height: 400px;
            overflow-y: auto;
            width: 100%;
        }

        .history-item {
            padding: 1rem;
            border-radius: var(--radius-md);
            background: var(--bg-primary);
            margin-bottom: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
            width: 100%;
            box-sizing: border-box;
        }

        .history-item:hover {
            background: var(--bg-tertiary);
        }

        .history-title {
            font-weight: 600;
            margin-bottom: 0.25rem;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .history-details {
            font-size: 0.75rem;
            color: var(--text-muted);
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .ad-container {
            background: var(--bg-tertiary);
            border-radius: var(--radius-lg);
            padding: 2rem;
            text-align: center;
            color: var(--text-muted);
            margin-bottom: 1.5rem;
            width: 100%;
            box-sizing: border-box;
        }

        /* FAQ Section */
        .faq-item {
            margin-bottom: 1rem;
            border-bottom: 1px solid var(--border-light);
            padding-bottom: 1rem;
        }

        .faq-question {
            font-weight: 600;
            margin-bottom: 0.5rem;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .faq-answer {
            font-size: 0.875rem;
            color: var(--text-muted);
            line-height: 1.5;
        }

        /* Tooltips */
        .tooltip {
            position: relative;
            display: inline-block;
        }

        .tooltip .tooltip-text {
            visibility: hidden;
            width: 280px;
            background-color: var(--bg-secondary);
            color: var(--text-primary);
            text-align: left;
            border-radius: var(--radius-md);
            padding: 0.75rem;
            position: absolute;
            z-index: 1000;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%);
            opacity: 0;
            transition: opacity 0.3s;
            box-shadow: var(--shadow-lg);
            font-size: 0.875rem;
            line-height: 1.5;
        }

        .tooltip:hover .tooltip-text {
            visibility: visible;
            opacity: 1;
        }

        .info-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: var(--bg-tertiary);
            color: var(--text-muted);
            font-size: 0.75rem;
            margin-left: 0.25rem;
            cursor: help;
            flex-shrink: 0;
        }

        /* Debt-specific styles */
        .debt-item {
            background: var(--bg-primary);
            border-radius: var(--radius-md);
            padding: 1rem;
            margin-bottom: 1rem;
            border: 1px solid var(--border-light);
        }

        .debt-header {
            display: flex;
            justify-content: between;
            align-items: center;
            margin-bottom: 0.75rem;
        }

        .debt-name {
            font-weight: 600;
            color: var(--text-primary);
        }

        .debt-actions {
            display: flex;
            gap: 0.5rem;
        }

        .debt-fields {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 0.75rem;
        }

        @media (max-width: 768px) {
            .debt-fields {
                grid-template-columns: 1fr;
            }
        }

        .method-toggle {
            display: flex;
            background: var(--bg-tertiary);
            border-radius: var(--radius-md);
            padding: 0.25rem;
            margin-bottom: 1.5rem;
        }

        .method-btn {
            flex: 1;
            padding: 0.75rem 1rem;
            background: transparent;
            border: none;
            border-radius: var(--radius-sm);
            color: var(--text-muted);
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .method-btn.active {
            background: var(--bg-secondary);
            color: var(--accent-primary);
            box-shadow: var(--shadow-sm);
        }

        .progress-bar {
            height: 8px;
            background: var(--bg-tertiary);
            border-radius: var(--radius-sm);
            overflow: hidden;
            margin-bottom: 0.5rem;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
            border-radius: var(--radius-sm);
            transition: width 0.5s ease;
        }

        .progress-labels {
            display: flex;
            justify-content: space-between;
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        /* ===== RESPONSIVE DESIGN ===== */

        /* Tablets and smaller desktops */
        @media (max-width: 1024px) {
            .main-grid {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }
            
            .container {
                padding: 0 1.5rem;
            }
            
            .results-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .comparison-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Mobile devices */
        @media (max-width: 768px) {
            .container {
                padding: 0 1rem;
            }
            
            .headernew {
                flex-direction: column;
                align-items: flex-start;
                gap: 1rem;
                padding: 1rem 0;
            }
            
            .logo-section {
                width: 100%;
            }
            
            .logo-text h1 {
                font-size: 1.25rem;
            }
            
            .theme-toggle {
                align-self: flex-start;
            }
            
            .card {
                padding: 1.25rem;
                margin-bottom: 1rem;
            }
            
            .results-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.75rem;
            }
            
            .result-card {
                padding: 1rem;
            }
            
            .result-value {
                font-size: 1.25rem;
            }
            
            .chart-container {
                height: 250px;
            }
            
            .input-group {
                flex-direction: column;
                gap: 0.5rem;
            }
            
            .input-group .form-select {
                width: 100%;
                min-width: auto;
            }
            
            .btn-group {
                flex-direction: column;
            }
            
            .btn {
                width: 100%;
            }
            
            .tabs {
                flex-wrap: wrap;
            }
            
            .tab {
                flex: 1;
                min-width: 120px;
                text-align: center;
            }
            
            .tooltip .tooltip-text {
                width: 90vw;
                left: 5vw;
                transform: none;
            }
        }

        /* Small mobile devices */
        @media (max-width: 480px) {
            .container {
                padding: 0 0.75rem;
            }
            
            .card {
                padding: 1rem;
                border-radius: var(--radius-lg);
            }
            
            .card-header {
                margin-bottom: 1rem;
            }
            
            .card-title {
                font-size: 1rem;
            }
            
            .form-input, .form-select {
                padding: 0.625rem 0.75rem;
                font-size: 0.875rem;
            }
            
            .chart-container {
                height: 200px;
            }
            
            .history-item {
                padding: 0.75rem;
            }
            
            .ad-container {
                padding: 1.5rem;
            }
            

            
            .tabs {
                flex-direction: flex;
				font-size: 1rem;
            }
            
            .tab {
                text-align: left;
            }
        }

        /* Very small mobile devices */
        @media (max-width: 360px) {
            .container {
                padding: 0 0.5rem;
            }
            
            .card {
                padding: 0.75rem;
            }
            
            .logo-text h1 {
                font-size: 1.125rem;
            }
            
            .form-group {
                margin-bottom: 1rem;
            }
        }

        /* Safe area support for notched devices */
        @supports (padding: max(0px)) {
            .container {
                padding-left: max(1rem, env(safe-area-inset-left));
                padding-right: max(1rem, env(safe-area-inset-right));
            }
        }

        /* Print styles */
        @media print {
            .theme-toggle,
            .btn-group,
            .sidebar-column,
            .footer,
            .tabs,
            .chart-container {
                display: none !important;
            }
            
            .main-grid {
                grid-template-columns: 1fr;
            }
            
            .card {
                box-shadow: none;
                border: 1px solid #ddd;
            }
        }