/* ===================================
   Know Your Worth - Aspirational Hourly Rate Calculator
   Bold & Motivational Design
   =================================== */

:root {
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --container-max: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 5rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Accent colors (shared) */
    --accent-primary: #00b894;
    --accent-secondary: #009975;
    --accent-gradient: linear-gradient(135deg, #00b894 0%, #009975 50%, #0984e3 100%);
    --positive: #00b894;
    --negative: #e74c3c;
}

/* Dark Theme (default) */
[data-theme="dark"] {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;

    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;

    --highlight-gold: #ffd700;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f3f4;

    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5a;
    --text-muted: #7a7a8a;

    --highlight-gold: #f39c12;
    --border-subtle: rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Ad Containers */
.ad-container {
    display: flex;
    justify-content: center;
    padding: var(--spacing-sm);
}

.ad-placeholder {
    background: var(--bg-secondary);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ad-top .ad-placeholder,
.ad-footer .ad-placeholder {
    width: 728px;
    max-width: 100%;
    height: 90px;
}

.ad-mid .ad-placeholder {
    width: 336px;
    height: 280px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: var(--spacing-2xl) 0;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: var(--spacing-lg);
}

.hero-quote {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.hero-quote cite {
    display: block;
    margin-top: var(--spacing-xs);
    font-style: normal;
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

/* Calculator Section */
.calculator-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-xl) 0;
}

.calculator-card,
.results-card {
    width: 100%;
    max-width: 560px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

/* Form Styles */
.calculator-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group select {
    appearance: none;
    background: var(--bg-secondary);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 48px;
}

.form-group select:hover {
    border-color: var(--accent-primary);
}

.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.2);
}

.form-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group select optgroup {
    font-weight: 700;
    color: var(--accent-primary);
}

/* Calculate Button */
.calculate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    margin-top: var(--spacing-sm);
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 170, 0.3);
}

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

.calculate-btn svg {
    transition: transform 0.3s ease;
}

.calculate-btn:hover svg {
    transform: translateX(4px);
}

/* Results Card */
.results-card {
    animation: slideUp 0.5s ease;
}

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

.results-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.results-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.result-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-xs);
}

.result-value {
    font-size: clamp(2rem, 6vw, 2.5rem);
    font-weight: 900;
    line-height: 1.2;
}

.result-sublabel {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
}

.aspirational-rate {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.15) 0%, rgba(9, 132, 227, 0.15) 100%);
    border: 1px solid rgba(0, 212, 170, 0.3);
}

.aspirational-rate .result-value {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Results Breakdown */
.results-breakdown {
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.results-breakdown h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.breakdown-item {
    text-align: center;
}

.breakdown-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.breakdown-value {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Insight Box */
.insight-box {
    padding: var(--spacing-md);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.05) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.insight-box h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--highlight-gold);
}

.insight-box p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Recalculate Button */
.recalculate-btn {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.recalculate-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Philosophy Section */
.philosophy-section {
    padding: var(--spacing-2xl) 0;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.philosophy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.philosophy-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.philosophy-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.philosophy-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.philosophy-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Examples Section */
.examples-section {
    padding: var(--spacing-2xl) 0;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: calc(var(--spacing-sm) * -1);
    margin-bottom: var(--spacing-lg);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.example-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
}

.example-scenario {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.example-verdict {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-sm);
}

.example-verdict.positive {
    background: rgba(0, 212, 170, 0.15);
    color: var(--positive);
    border: 1px solid rgba(0, 212, 170, 0.3);
}

.example-verdict.negative {
    background: rgba(255, 107, 107, 0.15);
    color: var(--negative);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.example-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-xl) 0;
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.footer-text {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.footer-text a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-text a:hover {
    opacity: 0.8;
}

.footer-disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: var(--spacing-xl) 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .calculator-card,
    .results-card {
        padding: var(--spacing-lg);
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .breakdown-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .ad-top .ad-placeholder,
    .ad-footer .ad-placeholder {
        width: 320px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-quote {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.95rem;
    }

    .calculator-card,
    .results-card {
        padding: var(--spacing-md);
    }

    .result-value {
        font-size: 1.75rem;
    }

    .philosophy-grid,
    .examples-grid {
        grid-template-columns: 1fr;
    }
}

/* Focus States for Accessibility */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Picture-in-Picture Section */
.pip-section {
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.pip-section h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.pip-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
}

.pip-controls {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
}

.pip-rate-selector {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    justify-content: center;
}

.pip-radio {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.pip-radio:hover {
    color: var(--text-primary);
}

.pip-radio input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-subtle);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.pip-radio input[type="radio"]:checked {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
}

.pip-radio input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--bg-primary);
    border-radius: 50%;
}

.pip-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 184, 148, 0.3);
}

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

.pip-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pip-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--spacing-sm);
    min-height: 1.2em;
}

.pip-note.error {
    color: var(--negative);
}

.pip-note.success {
    color: var(--positive);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    transform: scale(1.05);
}

.theme-toggle-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.theme-toggle-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hide/show icons based on theme */
[data-theme="dark"] .icon-sun {
    display: block;
}

[data-theme="dark"] .icon-moon {
    display: none;
}

[data-theme="light"] .icon-sun {
    display: none;
}

[data-theme="light"] .icon-moon {
    display: block;
}

@media (max-width: 480px) {
    .theme-toggle {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        padding: var(--spacing-xs);
    }

    .theme-toggle-label {
        display: none;
    }
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-card);
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    padding: var(--spacing-md) var(--spacing-lg);
    animation: slideUpBanner 0.4s ease;
}

@keyframes slideUpBanner {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
}

.cookie-text h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.cookie-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 600px;
}

.cookie-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

.cookie-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.cookie-btn-decline {
    background: transparent;
    border: 2px solid var(--border-subtle);
    color: var(--text-secondary);
}

.cookie-btn-decline:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.cookie-btn-accept {
    background: var(--accent-gradient);
    color: var(--bg-primary);
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.cookie-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--spacing-xs);
    transition: color 0.2s ease;
}

.cookie-close:hover {
    color: var(--text-primary);
}

/* Privacy Settings Button */
.privacy-settings-btn {
    position: fixed;
    bottom: var(--spacing-md);
    left: var(--spacing-md);
    z-index: 1000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-lg);
}

.privacy-settings-btn:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.1);
}

/* Responsive Cookie Banner */
@media (max-width: 768px) {
    .cookie-banner {
        padding: var(--spacing-md);
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-text {
        margin-bottom: var(--spacing-sm);
    }

    .cookie-actions {
        width: 100%;
        justify-content: center;
    }

    .cookie-btn {
        flex: 1;
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .cookie-actions {
        flex-direction: column;
    }

    .cookie-btn {
        max-width: 100%;
    }

    .privacy-settings-btn {
        bottom: var(--spacing-sm);
        left: var(--spacing-sm);
        width: 36px;
        height: 36px;
    }
}
