* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
    background: white;
    color: #667eea;
    border-color: white;
}

/* Tab Content */
.tab-content {
    display: none;
    flex: 1;
    padding: 40px 20px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.hidden {
    display: none;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: slideDown 0.6s ease-out;
}

.header h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.form-section {
    background: white;
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s ease-out;
}

.form-group {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.95em;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

.btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn:active {
    transform: translateY(0);
}

.result-section {
    margin-top: 30px;
    animation: fadeIn 0.4s ease-out;
}

.result-section.hidden {
    display: none;
}

.result-card {
    background: white;
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.result-header h2 {
    color: #333;
    font-size: 1.5em;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.result-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item .label {
    font-size: 0.85em;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-item .value {
    font-size: 1.1em;
    color: #333;
    font-weight: 500;
}

.salary-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.salary-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.salary-label {
    font-size: 0.85em;
    opacity: 0.9;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.salary-amount {
    font-size: 1.8em;
    font-weight: 700;
}

.compensation-box {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 25px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    color: white;
    box-shadow: 0 8px 20px rgba(245, 87, 108, 0.3);
    margin-bottom: 20px;
    text-align: center;
}

.comp-label {
    font-size: 0.9em;
    opacity: 0.95;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.comp-amount {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 8px;
}

.monthly-text {
    font-size: 0.95em;
    opacity: 0.9;
}

.salary-range {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.salary-range p {
    color: #666;
    margin: 8px 0;
    font-size: 0.95em;
}

.salary-range strong {
    color: #333;
}

.note {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.note p {
    color: #856404;
    font-size: 0.9em;
    line-height: 1.5;
}

.error-message {
    color: #666;
    font-size: 1em;
    line-height: 1.6;
    text-align: center;
    padding: 20px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Checkbox Group and Privacy */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-group label {
    font-size: 0.9em;
    color: #333;
    cursor: pointer;
    margin: 0;
}

.checkbox-group a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

/* Success Message */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    margin-top: 20px;
    animation: slideUp 0.4s ease-out;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h2 {
    color: #333;
    margin: 0;
}

.modal-body {
    padding: 25px;
}

.modal-body h3 {
    color: #333;
    margin-bottom: 15px;
}

.modal-body p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.modal-body ul {
    margin-left: 20px;
    color: #666;
    line-height: 1.8;
}

.modal-body li {
    margin-bottom: 8px;
}

/* Analytics Section */
.analytics-section {
    min-height: 500px;
}

.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    color: #999;
    font-size: 1.1em;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.analytics-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.analytics-filters select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95em;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.chart-container h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-label {
    font-size: 0.85em;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #667eea;
}

/* Form note styling */
.form-note {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #424242;
}

.form-note strong {
    color: #1976d2;
}

/* Optional field styling */
.optional {
    color: #666;
    font-style: italic;
    font-size: 0.85em;
    font-weight: normal;
}

.comparison-section h3 {
    color: #333;
    margin-bottom: 15px;
}

.comparison-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.comparison-form select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95em;
}

.comparison-result {
    margin-top: 20px;
}

.comparison-result.hidden {
    display: none;
}

.comparison-chart-container {
    margin-bottom: 20px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}

.comparison-insights {
    padding: 15px;
    background: #f0f8ff;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.comparison-insights p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 10px;
}

.comparison-insights .insight-title {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
}

@media (max-width: 600px) {
    .header h1 {
        font-size: 2em;
    }

    .form-section,
    .result-card {
        padding: 25px;
    }

    .result-details {
        grid-template-columns: 1fr;
    }

    .salary-amount {
        font-size: 1.5em;
    }
    
    .tab-navigation {
        gap: 5px;
        padding: 15px 10px;
    }
    
    .tab-btn {
        padding: 10px 16px;
        font-size: 0.85em;
    }
}

/* Salary Comparison Styles */
.comparison-results {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.comparison-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
}

.summary-item {
    text-align: center;
}

.summary-item .label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-item .value {
    display: block;
    font-size: 1.8em;
    font-weight: 700;
    color: #333;
}

.comparison-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.salary-range {
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.salary-range h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.range-bar {
    position: relative;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
}

.range-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60 0%, #f39c12 50%, #e74c3c 100%);
    width: 0%;
    transition: width 0.5s ease;
}

.range-marker {
    position: absolute;
    top: -5px;
    width: 4px;
    height: 30px;
    background: #333;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: left 0.5s ease;
}

.range-marker::after {
    content: '▼';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    color: #333;
    font-size: 14px;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: #666;
    margin-top: 10px;
}

.comparison-insight {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.comparison-insight h3 {
    color: white;
    margin-bottom: 15px;
}

.comparison-insight p {
    line-height: 1.6;
    opacity: 0.95;
}

.recommendations {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

/* Quick Preset Buttons */
.quick-presets {
    margin-bottom: 30px;
}

.preset-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.preset-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.preset-btn:active {
    transform: translateY(0);
}

/* Enhanced Insights Panel */
.insights-panel {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

.insights-panel h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.insights-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.insight-box {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.insight-box h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1em;
}

.insight-box p {
    color: #555;
    font-size: 0.95em;
    line-height: 1.5;
}

.insight-box ul {
    list-style: none;
    padding-left: 0;
}

.insight-box li {
    color: #555;
    font-size: 0.9em;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.insight-box li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* Growth Calculator */
.growth-calculator {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 15px;
    border-top: 5px solid #f39c12;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.growth-calculator h3 {
    color: #333;
    margin-bottom: 15px;
}

.calculator-inputs {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.calculator-inputs label {
    font-weight: 600;
    color: #555;
}

.calculator-inputs input[type="range"] {
    cursor: pointer;
}

#yearsDisplay {
    font-weight: 700;
    color: #667eea;
    min-width: 80px;
}

.calculator-result {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #f39c12;
}

.calculator-result p {
    font-size: 1em;
    margin: 8px 0;
    color: #333;
}

.calculator-result strong {
    color: #667eea;
    font-size: 1.2em;
}

/* Recent Searches Section */
.recent-searches-section {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.recent-searches-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.recent-searches-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.recent-search-tag {
    padding: 8px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.recent-search-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.recent-search-tag .remove {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* Top Paying Section */
.top-paying-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.top-paying-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.top-paying-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out;
}

.top-paying-card h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.top-paying-card ul {
    list-style: none;
    padding: 0;
}

.top-paying-card li {
    padding: 10px 0;
    color: #555;
    font-size: 0.95em;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.6;
}

.top-paying-card li:last-child {
    border-bottom: none;
}

/* Suggestions Section */
#suggestionsSection {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.suggestion-item {
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    background: #e8eaf6;
    transform: translateX(5px);
}

/* Animation Improvements */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.recommendations h3 {
    color: #333;
    margin-bottom: 15px;
}

.recommendations ul {
    list-style: none;
    padding: 0;
}

.recommendations li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    color: #555;
    line-height: 1.5;
}

.recommendations li:last-child {
    border-bottom: none;
}

.recommendations li::before {
    content: '💡';
    margin-right: 10px;
    font-size: 1.1em;
}

/* Responsive adjustments for comparison */
@media (max-width: 768px) {
    .comparison-summary {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .comparison-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .comparison-results {
        padding: 20px;
    }
    
    .range-marker::after {
        display: none;
    }
}

/* Salary Chart Section */
.chart-section {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.chart-section h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3em;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 20px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    font-weight: 500;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

/* Enhanced salary range styling */
.range-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.range-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.range-item:nth-child(2) {
    border-left-color: #e74c3c;
}

.range-item:nth-child(3) {
    border-left-color: #27ae60;
}

.range-label {
    font-weight: 600;
    color: #555;
}

.range-value {
    font-weight: 700;
    color: #333;
    font-size: 1.1em;
}
