/* Modern Financial Calculator Design */
:root {
    --primary-color: #1a4189;
    --secondary-color: #3a60c9;
    --accent-color: #0000ff;
    --background-color: #f5f0e6;
    --text-color: #333;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --input-height: 42px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background: linear-gradient(135deg, #4a5bb9 0%, #57a9f0 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-color);
}

body.light-mode {
    background: linear-gradient(135deg, #4a5bb9 0%, #57a9f0 100%);
}

body.dark-mode {
    background: linear-gradient(135deg, #1a2548 0%, #273870 100%);
}

.app-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.header-title {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 400;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
}

.header-title strong {
    font-weight: 700;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    background-color: var(--primary-color);
    padding: 1rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    color: white;
    overflow-y: auto;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.home-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.home-link i {
    margin-right: 0.5rem;
}

.close-menu {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.sidebar-menu {
    list-style-type: none;
    padding: 0;
}

.sidebar-menu-category {
    margin: 1rem 0 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu-item button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: white;
    padding: 0.8rem 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
    border-radius: var(--border-radius);
    padding-left: 0.5rem;
}

.sidebar-menu-item button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-menu-item.active button {
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: 500;
}

.sidebar-menu-item i {
    margin-right: 0.8rem;
    width: 20px;
    text-align: center;
}

/* Menu Toggle Button */
.menu-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Main Content */
.main-content {
    margin-left: 0;
    padding: 1rem;
    transition: margin-left 0.3s ease;
}

/* Calculator Sections */
.content-section {
    display: none;
}

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

.converter-card {
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    width: 100%;
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.converter-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.converter-header h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
}

/* Calculator Form Styles */
.calculator-form {
    padding: 20px;
}

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

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-color);
}

.input-field {
    position: relative;
}

.input-field input,
.input-group input,
.input-group select {
    width: 100%;
    height: var(--input-height);
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    padding: 0 15px;
    font-size: 16px;
    background-color: white;
}

.input-field .currency-symbol {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
}

.input-field .percentage-symbol {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
}

.input-field input.has-currency {
    padding-left: 30px;
}

.input-field input.has-percentage {
    padding-right: 30px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon .input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
}

.input-with-icon .input-icon:first-child {
    left: 10px;
}

.input-with-icon .input-icon:last-child {
    right: 10px;
}

.input-with-icon input {
    padding-left: 30px;
}

.input-with-icon input + .input-icon {
    padding-right: 30px;
}

.convert-btn,
.calculate-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 30px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

.convert-btn:hover,
.calculate-btn:hover {
    background-color: var(--secondary-color);
}

/* Results Container */
.result-container {
    padding: 15px 20px;
    margin-top: 10px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: none;
}

.result-container.active {
    display: block;
}

.summary-results {
    margin-bottom: 20px;
}

.summary-results p {
    margin: 8px 0;
}

.summary-results .highlight {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.payment-schedule {
    margin-top: 20px;
}

.payment-schedule h4 {
    margin-bottom: 10px;
}

.table-container {
    overflow-x: auto;
    margin-top: 10px;
}

.payment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.payment-table th,
.payment-table td {
    padding: 8px 12px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.payment-table th {
    background-color: #f9f9f9;
    font-weight: 500;
}

.note {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

/* Chart Container */
.chart-container {
    width: 100%;
    height: 300px;
    margin: 20px 0;
    position: relative;
}

/* Loan Comparison Section */
.comparison-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.loan-option {
    flex: 1;
    min-width: 250px;
}

.loan-option h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.comparison-results {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.loan-summary {
    flex: 1;
    min-width: 250px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
}

.loan-summary h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.better-option {
    border: 2px solid var(--primary-color);
    background-color: rgba(58, 96, 201, 0.05);
}

.comparison-highlight {
    padding: 15px;
    background-color: #f2f7ff;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.comparison-table th,
.comparison-table td {
    padding: 10px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.comparison-table th {
    background-color: #f9f9f9;
    font-weight: 500;
    text-align: left;
}

.comparison-table th:first-child {
    text-align: left;
}

/* Mortgage Calculator Specific Styles */
.mortgage-card {
    background-color: var(--background-color);
}

.mortgage-tabs {
    display: flex;
    margin: 20px;
    gap: 10px;
}

.mortgage-tabs .tab {
    background-color: var(--primary-color);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.mortgage-tabs .tab:hover {
    transform: translateY(-3px);
}

.mortgage-tabs .tab i {
    font-size: 24px;
    margin-bottom: 5px;
}

.mortgage-tabs .tab span {
    font-size: 12px;
}

.mortgage-tabs .tab.active {
    background-color: var(--secondary-color);
}

.mortgage-content {
    display: flex;
    flex-wrap: wrap;
    padding: 0 20px 20px;
}

.mortgage-inputs {
    flex: 1;
    min-width: 300px;
    padding-right: 20px;
}

.mortgage-results {
    flex: 1;
    min-width: 300px;
    display: none;
}

.mortgage-results.active {
    display: block;
}

.input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.mortgage-summary {
    margin-top: 20px;
}

.mortgage-summary h3 {
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 18px;
    color: var(--text-color);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.summary-item {
    margin-bottom: 10px;
}

.summary-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 3px;
}

.summary-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
}

.bank-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 30px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 20px;
    transition: background-color 0.2s;
}

.bank-btn:hover {
    background-color: var(--secondary-color);
}

.bank-btn i {
    margin-left: 10px;
}

.button-container {
    margin-top: 20px;
}

/* Error Message */
.error-message {
    background-color: #ffeeee;
    color: #d63031;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    border-left: 4px solid #d63031;
}

/* Info Box */
.info-box {
    background-color: #f2f7ff;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    border-left: 4px solid var(--primary-color);
}

.info-box h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.info-box ul {
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 5px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .mortgage-content,
    .calculator-content {
        flex-direction: column;
    }
    
    .mortgage-inputs,
    .calculator-form {
        padding-right: 0;
        margin-bottom: 30px;
    }
    
    .summary-grid,
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .input-row {
        flex-direction: column;
        gap: 0;
    }
    
    .comparison-container {
        flex-direction: column;
    }
} 