:root {
    --bg-dark: #0f111a;
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #ec4899;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);

    --wage-bad: #ef4444;
    --wage-warn: #f59e0b;
    --wage-good: #10b981;
    --wage-great: #8b5cf6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
    position: relative;
    overflow-x: hidden;
}

h1,
h2,
.wage-value,
.stat-value {
    font-family: 'Outfit', sans-serif;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.3);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(236, 72, 153, 0.2);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: rgba(139, 92, 246, 0.2);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}

/* Back Link */
.back-link {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    z-index: 10;
}

.back-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-2px);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

/* Container */
.container {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 1;
}

/* Glass Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Header */
.app-header {
    text-align: center;
    padding: 2rem;
}

.title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, #a855f7, #ec4899, #f43f5e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    filter: drop-shadow(0 2px 10px rgba(236, 72, 153, 0.4));
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 90%;
    margin: 0 auto;
}

/* Form */
.main-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    margin: 0.5rem 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: 0.02em;
}

.info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 800;
    cursor: help;
    transition: all 0.2s;
}

.info-tooltip:hover {
    background: var(--primary);
    color: #fff;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="number"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem 3rem 0.8rem 1rem;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 3px var(--primary-glow);
}

.unit {
    position: absolute;
    right: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    pointer-events: none;
}

/* Toggle */
.toggle-group {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.25rem;
    position: relative;
}

.toggle-group input[type="radio"] {
    display: none;
}

.toggle-btn {
    flex: 1;
    text-align: center;
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    z-index: 1;
}

.toggle-group input[type="radio"]:checked+.toggle-btn {
    color: #fff;
    background: var(--glass-highlight);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Button */
.btn-glow {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 1.25rem;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px -5px var(--primary-glow);
    overflow: hidden;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Inter', sans-serif;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    transition: all 0.5s ease;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.6);
}

.btn-glow:hover::before {
    left: 150%;
}

.btn-glow:active {
    transform: translateY(1px);
}

.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Results */
.result-area {
    text-align: center;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top center;
}

.result-area.hidden {
    display: none;
    opacity: 0;
    transform: scaleY(0.9) translateY(-20px);
}

.result-title {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.result-display {
    margin: 1.5rem 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.wage-value {
    font-size: clamp(3.5rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
    transition: color 0.5s ease, text-shadow 0.5s ease;
    background-clip: text;
    -webkit-background-clip: text;
}

.wage-unit {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
}

.result-message {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    min-height: 3em;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border-left: 4px solid var(--text-muted);
    text-align: left;
}

/* Stats */
.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-box.warning {
    border-top: 2px solid var(--wage-warn);
}

.stat-box.danger {
    border-top: 2px solid var(--wage-bad);
}

/* Share */
.action-area {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem 2.5rem;
    border-radius: 99px;
    font-weight: 800;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    max-width: 400px;
    background: linear-gradient(135deg, #1d9bf0 0%, #00ba7c 100%);
    color: #fff;
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(29, 155, 240, 0.5);
    animation: sharePulse 3s infinite;
}

@keyframes sharePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(29, 155, 240, 0.5);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(29, 155, 240, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(29, 155, 240, 0);
    }
}

.btn-share::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-share:hover {
    background: #111;
    transform: scale(1.03) translateY(-3px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.9);
}

.btn-share:hover::before {
    opacity: 1;
}

.btn-share:active {
    transform: scale(0.98);
}

.twitter-icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

/* Anim / Responsiveness */
.slide-in {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pop {
    animation: popScale 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popScale {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Color States for Wage */
.theme-bad .wage-value {
    color: var(--wage-bad);
    text-shadow: 0 0 30px rgba(239, 68, 68, 0.3);
}

.theme-bad #result-message {
    border-left-color: var(--wage-bad);
}

.theme-warn .wage-value {
    color: var(--wage-warn);
    text-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
}

.theme-warn #result-message {
    border-left-color: var(--wage-warn);
}

.theme-good .wage-value {
    color: var(--wage-good);
    text-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

.theme-good #result-message {
    border-left-color: var(--wage-good);
}

.theme-great .wage-value {
    color: var(--wage-great);
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.theme-great #result-message {
    border-left-color: var(--wage-great);
}

@media (max-width: 600px) {
    .row-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .glass-panel {
        padding: 1.5rem;
    }

    .result-stats {
        grid-template-columns: 1fr;
    }

    body {
        padding: 5rem 1rem 2rem;
    }

    .back-link {
        top: 1rem;
        left: 1rem;
    }
}

/* Privacy notice */
.privacy-notice {
    font-size: 0.8rem;
    color: var(--wage-good);
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Stat desc */
.stat-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.4;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
    padding-top: 0.5rem;
}

/* Explanation Area */
.explanation-area {
    margin-top: 1rem;
    padding: 2rem;
}

.explanation-area h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    text-align: center;
}

.explanation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.explanation-item h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.explanation-item h3::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    margin-right: 0.5rem;
}

.explanation-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.explanation-item strong {
    color: var(--secondary);
    font-weight: 600;
}

@media (min-width: 600px) {
    .explanation-grid {
        grid-template-columns: 1fr 1fr;
    }
}