@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #004B00;
    --primary-light: #006400;
    --primary-dark: #003300;
    --accent: #FFD700; /* Subtle gold accent */
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::-selection {
    background-color: var(--primary);
    color: #ffffff;
}

::-moz-selection {
    background-color: var(--primary);
    color: #ffffff;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}
html {
    overflow-x: hidden;
    width: 100%;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    color: var(--primary);
}

/* Layout */
.container {
    max-width: 100%; /* Fill the page width */
    margin: 0 auto;
    padding: 0 1rem;
}

header {
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-tag {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--bg-light);
    border: 1px solid #e5e7eb;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--primary-light);
}

/* Hero Section */
.hero {
    padding: 2rem 0 8rem; /* Dramatically increased bottom gap */
    text-align: center;
    background: transparent;
}

.hero-badge {
    display: inline-block;
    background: rgba(0, 75, 0, 0.07);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 75, 0, 0.15);
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

/* Calculator Card */
.calculator-card {
    background: var(--white);
    border-radius: 24px;
    padding: 3.5rem;
    box-shadow: var(--card-shadow);
    margin-top: -5rem;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(0, 75, 0, 0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1.5rem;
    align-items: flex-end;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

select, input {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1.25rem 1.5rem !important;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    font-size: 1.2rem;
    font-family: inherit;
    color: var(--text-dark);
    transition: var(--transition);
    box-sizing: border-box !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 75, 0, 0.1);
}

.btn {
    padding: 1.25rem 3rem;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 75, 0, 0.2);
}

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

/* Results Section */
.results-area {
    margin-top: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    display: none;
}

.results-area.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.salary-display {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
}

.range-card {
    background: linear-gradient(135deg, #004B00 0%, #003300 100%);
    color: var(--white);
    padding: 3rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.range-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
}

.range-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.salary-range {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.salary-meta {
    display: flex;
    justify-content: center;
    gap: 3rem;
    font-size: 1.125rem;
}

.meta-item span {
    display: block;
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Lead Gen Gate */
.gate-section {
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.gate-card {
    background: #fff;
    border: 2px solid var(--primary);
    padding: 3rem;
    border-radius: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.gate-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.gate-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto 0;
}

.gate-form button {
    grid-column: span 2;
    justify-self: center;
}

.gate-form input {
    flex: 2;
    min-width: 0;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
}

/* ── Demand Badge ─────────────────────────────────────────── */
.demand-badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.demand-badge.hot     { background: #FEF3C7; color: #B45309; }
.demand-badge.high    { background: #DCFCE7; color: #15803D; }
.demand-badge.normal  { background: #DBEAFE; color: #1D4ED8; }
.demand-badge.cooling { background: #F3F4F6; color: #6B7280; }

/* ── Data Freshness Footer ────────────────────────────────── */
.data-freshness {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 1.5rem 0 0;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.freshness-icon {
    margin-right: 0.3rem;
}

/* ── Loading Bar ─────────────────────────────────────────── */
.data-loading-bar {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: right;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}
.loading-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.75); }
}

/* ── Success State ───────────────────────────────────────── */
.success-state {
    text-align: center;
    padding: 1.5rem 1rem;
}
.success-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: #DCFCE7;
    color: #15803D;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    border: 2px solid #86efac;
}
.success-state h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.success-state p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

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

.animate {
    animation: fadeInUp 0.6s ease forwards;
}

/* ── Scanning Animation ───────────────────────────────────── */
.results-area {
    position: relative;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(247, 242, 255, 0.76);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 2px dashed rgba(124, 58, 237, 0.45);
}

.scanner-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

.squirrel-loader {
    width: 100%;
    max-width: 460px;
    padding: 0 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.squirrel-loader-track {
    position: relative;
    width: 100%;
    height: 120px;
    border-radius: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(196, 181, 253, 0.6), transparent 32%),
        linear-gradient(135deg, #ede9fe 0%, #ddd6fe 50%, #f5f3ff 100%);
    border: 1px solid rgba(124, 58, 237, 0.2);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.squirrel-loader-track::after {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: 24px;
    height: 4px;
    border-radius: 999px;
    background: repeating-linear-gradient(
        90deg,
        rgba(124, 58, 237, 0.65) 0 18px,
        rgba(124, 58, 237, 0.18) 18px 34px
    );
}

.squirrel-loader-stars {
    position: absolute;
    inset: 0;
    opacity: 0.55;
    background:
        radial-gradient(circle at 14% 22%, rgba(255,255,255,0.95) 0 2px, transparent 3px),
        radial-gradient(circle at 30% 38%, rgba(255,255,255,0.7) 0 1.5px, transparent 3px),
        radial-gradient(circle at 48% 18%, rgba(255,255,255,0.92) 0 2px, transparent 3px),
        radial-gradient(circle at 64% 30%, rgba(255,255,255,0.8) 0 1.5px, transparent 3px),
        radial-gradient(circle at 82% 20%, rgba(255,255,255,0.9) 0 2px, transparent 3px);
}

.squirrel-runner {
    position: absolute;
    left: -78px;
    bottom: 26px;
    width: 88px;
    height: 56px;
    animation: squirrel-run 2.7s linear infinite;
}

.squirrel-tail {
    position: absolute;
    left: 2px;
    top: 0;
    width: 38px;
    height: 40px;
    border-radius: 76% 24% 60% 40%;
    border: 10px solid #8b5cf6;
    border-color: #8b5cf6 transparent transparent #8b5cf6;
    transform: rotate(-28deg);
    transform-origin: bottom right;
    animation: squirrel-tail-flick 0.45s ease-in-out infinite alternate;
}

.squirrel-body {
    position: absolute;
    left: 22px;
    top: 18px;
    width: 30px;
    height: 18px;
    background: #7c3aed;
    border-radius: 18px 16px 14px 14px;
    box-shadow: inset -4px -2px 0 rgba(76, 29, 149, 0.22);
}

.squirrel-head {
    position: absolute;
    left: 48px;
    top: 10px;
    width: 20px;
    height: 20px;
    background: #8b5cf6;
    border-radius: 50%;
}

.squirrel-head::before,
.squirrel-head::after {
    content: '';
    position: absolute;
    top: -6px;
    width: 7px;
    height: 10px;
    background: #a78bfa;
    clip-path: polygon(50% 0, 0 100%, 100% 100%);
}

.squirrel-head::before { left: 1px; }
.squirrel-head::after { right: 1px; }

.squirrel-eye {
    position: absolute;
    right: 4px;
    top: 7px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #1f1147;
}

.squirrel-leg {
    position: absolute;
    top: 33px;
    width: 4px;
    height: 16px;
    border-radius: 999px;
    background: #4c1d95;
    transform-origin: top center;
}

.squirrel-leg.front { left: 48px; animation: squirrel-leg-front 0.35s ease-in-out infinite alternate; }
.squirrel-leg.back { left: 28px; animation: squirrel-leg-back 0.35s ease-in-out infinite alternate; }

.squirrel-loader-copy {
    text-align: center;
}

.squirrel-loader-title {
    font-size: 1rem;
    font-weight: 700;
    color: #5b21b6;
    margin-bottom: 0.35rem;
}

.scanner-status {
    font-weight: 600;
    color: #6d28d9;
    font-size: 1rem;
}

@keyframes squirrel-run {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(100% + 128px)); }
}

@keyframes squirrel-tail-flick {
    from { transform: rotate(-30deg) scale(1); }
    to { transform: rotate(-14deg) scale(1.05); }
}

@keyframes squirrel-leg-front {
    from { transform: rotate(22deg); }
    to { transform: rotate(-18deg); }
}

@keyframes squirrel-leg-back {
    from { transform: rotate(-16deg); }
    to { transform: rotate(22deg); }
}

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

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    .hero { padding: 3rem 2rem 4rem; }
    .hero h1 { font-size: 2rem; word-wrap: break-word; word-break: break-word; }
    .hero p { font-size: 1rem; }
    .calculator-card { padding: 1.25rem; margin-top: -2rem; }
    .form-grid { grid-template-columns: 1fr; }
    .range-card { padding: 1.25rem; }
    .salary-range { font-size: 1.8rem; word-wrap: break-word; }
    .gate-card { padding: 1.25rem; }
    .gate-form { flex-direction: column; width: 100%; }
    .gate-form input { width: 100%; box-sizing: border-box; }
    .btn { width: 100%; box-sizing: border-box; }
    .salary-meta { flex-direction: column; gap: 1.5rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 0.5rem; }
    .hero { padding: 2rem 2.5rem; }
    .calculator-card { padding: 1rem; border-radius: 12px; }
    .range-card, .gate-card { padding: 1rem; }
    .hero h1 { font-size: 1.6rem; }
    .salary-range { font-size: 1.6rem; }
}
