/* FIRE Calculator Styles */
.fire-calculator-wrapper {
    margin: 0 auto;
    margin-bottom: 2rem;
}

.lifestyle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.currency-selector-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.currency-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.currency-select {
    min-width: 180px;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.currency-select:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.lifestyle-selector-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
}

.lifestyle-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.lifestyle-btn {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.lifestyle-btn:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.lifestyle-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.lifestyle-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.lifestyle-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.lifestyle-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.lifestyle-desc {
    font-size: 0.75rem;
    opacity: 0.8;
    line-height: 1.2;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.input-section {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
}

.section-title:first-child {
    margin-top: 0;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.tooltip-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    cursor: help;
    opacity: 0.6;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tooltip-icon:hover {
    opacity: 1;
    background: #3b82f6;
    color: #ffffff;
}

.tooltip-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #1f2937;
    color: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    margin-bottom: 4px;
    max-width: 250px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.tooltip-icon::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    border: 5px solid transparent;
    border-top-color: #1f2937;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1001;
}

.tooltip-icon:hover::after,
.tooltip-icon:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.input-field {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.input-field:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.slider-input-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.slider-input {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.slider-input::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.slider-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.slider-input::-moz-range-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.slider-number-input {
    width: 100px;
    min-width: 100px;
    text-align: center;
}

.input-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.tax-options {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.calculate-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.calculate-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 8px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.calculate-btn:active {
    transform: translateY(0);
}

.results-section {
    display: flex;
    flex-direction: column;
}

.results-card-single {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
}

.results-card-single:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.results-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-card-header .section-title {
    margin: 0;
}

.export-btn-top {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
    white-space: nowrap;
}

.export-btn-top:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
}

.result-block {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.result-block:last-child {
    border-bottom: none;
}

.result-block-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    text-align: center;
    padding: 2rem 1.75rem;
}

.result-block-hero .result-label {
    color: rgba(255, 255, 255, 0.9);
}

.result-block-hero .result-value {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.result-block-hero .result-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.result-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 4rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.result-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-top: 0.5rem;
}

.result-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.result-row:last-child {
    border-bottom: none;
}

.result-label-small {
    font-size: 0.875rem;
    color: #6b7280;
}

.result-value-small {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.result-value-medium {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.result-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.75rem;
    font-style: italic;
}

.chart-card[data-empty="true"] {
    display: none;
}

.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.chart-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

.chart-card canvas {
    max-height: 300px;
}

.table-section {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 3rem;
}

.table-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.table-section-header .section-title {
    margin: 0;
}

.export-excel-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0d9488;
    background: #ccfbf1;
    border: 2px solid #99f6e4;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-excel-btn:hover {
    background: #99f6e4;
    border-color: #5eead4;
    color: #0f766e;
    transform: translateY(-1px);
}

.export-excel-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
}

.yearly-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.yearly-table thead {
    background: #f9fafb;
}

.yearly-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.yearly-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
}

.yearly-table tbody tr:hover {
    background: #f9fafb;
}

.no-data {
    text-align: center;
    color: #9ca3af;
    padding: 2rem;
    font-style: italic;
}

.monte-carlo-section {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 3rem;
}

.monte-carlo-desc {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.monte-carlo-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.monte-carlo-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 8px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.monte-carlo-results {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
    animation: fadeInUp 0.6s ease-out;
}

.monte-carlo-chart-wrapper {
    margin-bottom: 2rem;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.monte-carlo-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.stat-item {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    animation: slideInUp 0.5s ease-out both;
}

.stat-item:nth-child(1) { animation-delay: 0.5s; }
.stat-item:nth-child(2) { animation-delay: 0.6s; }
.stat-item:nth-child(3) { animation-delay: 0.7s; }
.stat-item:nth-child(4) { animation-delay: 0.8s; }

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

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


/* Mobile Responsive */
@media (max-width: 1024px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .lifestyle-options {
        grid-template-columns: 1fr;
    }
    
    .lifestyle-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .currency-selector-inline {
        width: 100%;
        justify-content: space-between;
    }
    
    .currency-select {
        flex: 1;
        min-width: 0;
    }
    
    .input-section,
    .results-card,
    .chart-card,
    .table-section,
    .monte-carlo-section {
        padding: 1.5rem;
    }
    
    .results-card-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .export-btn-top {
        width: 100%;
    }
    
    .result-value {
        font-size: 2rem;
    }
    
    .yearly-table {
        font-size: 0.75rem;
    }
    
    .yearly-table th,
    .yearly-table td {
        padding: 0.5rem;
    }
    
    .monte-carlo-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.25rem;
    }
    
    .result-value {
        font-size: 1.75rem;
    }
    
    .result-value-medium {
        font-size: 1.25rem;
    }
    
    .tax-options {
        flex-direction: column;
        gap: 0.75rem;
    }
}
