/* Global Variables */
:root {
    --primary: #9c27b0;
    --primary-light: #bb86fc;
    --primary-dark: #6a0080;
    --secondary: #03dac6;
    --background: #121212;
    --surface: #1e1e1e;
    --surface-light: #2d2d2d;
    --error: #cf6679;
    --on-primary: #ffffff;
    --on-secondary: #000000;
    --on-background: #ffffff;
    --on-surface: #ffffff;
    --on-error: #000000;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--on-background);
    line-height: 1.6;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-light);
    text-align: center;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 2rem;
    color: var(--primary-light);
    border-bottom: 2px solid var(--primary-dark);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--primary-light);
}

h4 {
    font-size: 1.2rem;
    color: var(--on-background);
}

p {
    margin-bottom: 1rem;
}

/* Header and Footer */
header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

header p {
    font-size: 1.2rem;
    color: var(--on-background);
    opacity: 0.8;
}

footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    color: var(--on-background);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Main Content */
main {
    background-color: var(--surface);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}

/* Tabs */
.tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--primary-dark);
}

.tab-btn {
    background: var(--surface-light);
    border: none;
    color: var(--on-surface);
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    margin-right: 0.5rem;
    margin-bottom: -1px;
}

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

.tab-btn.active {
    background-color: var(--primary);
    color: var(--on-primary);
    border-bottom: 3px solid var(--secondary);
}

/* Tab Content */
.tab-pane {
    display: none;
    padding: 1rem 0;
}

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

/* Form Elements */
.form-group {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--surface-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
}

.form-row label {
    flex: 1;
    min-width: 200px;
    margin-right: 1rem;
}

.form-row input,
.form-row select {
    flex: 2;
    padding: 0.75rem;
    border: 1px solid var(--primary-dark);
    border-radius: var(--border-radius);
    background-color: var(--surface);
    color: var(--on-surface);
    font-size: 1rem;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(187, 134, 252, 0.3);
}

.form-row .note {
    flex: 1;
    font-size: 0.9rem;
    color: var(--on-background);
    opacity: 0.7;
    margin-left: 1rem;
}

/* Person Sections */
.person-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--surface);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary);
}

.person-investments {
    margin-bottom: 2rem;
}

.investment-type {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background-color: var(--surface);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-dark);
}

/* Buttons */
.btn, .next-btn, .prev-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

.next-btn {
    background-color: var(--primary);
    color: var(--on-primary);
}

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

.prev-btn {
    background-color: var(--surface-light);
    color: var(--on-surface);
}

.prev-btn:hover {
    background-color: var(--surface);
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Results Section */
.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-card {
    background-color: var(--surface-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-label {
    font-weight: 500;
}

.result-value {
    font-weight: 600;
    color: var(--primary-light);
}

/* Annual Breakdown Table */
.annual-breakdown {
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    background-color: var(--primary-dark);
    color: var(--on-primary);
}

tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.2);
}

/* Other Expenses List */
.other-expenses-list {
    margin-top: 1.5rem;
}

.other-expenses-list ul {
    list-style: none;
    padding: 0;
}

.other-expenses-list li {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: var(--surface);
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
}

.other-expenses-list li button {
    background-color: var(--error);
    color: var(--on-error);
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-row label {
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
    
    .form-row input,
    .form-row select {
        width: 100%;
    }
    
    .form-row .note {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.5rem;
        border-radius: var(--border-radius);
    }
    
    .nav-buttons {
        flex-direction: column;
    }
    
    .nav-buttons button {
        margin-bottom: 0.5rem;
        width: 100%;
    }
}
