/* ============================================================
   HackTheJD — Design System
   Light theme · Glassmorphism · Premium feel
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
    /* Colors - The Data Katalyst palette */
    --bg-primary: rgba(255, 255, 255, 0.95);
    --bg-secondary: rgba(255, 255, 255, 0.95);
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-hover: #FFFFFF;
    --bg-input: rgba(255, 255, 255, 0.95);

    --border-subtle: rgba(11, 19, 43, 0.08);
    --border-hover: rgba(11, 19, 43, 0.16);
    --border-focus: rgba(0, 123, 255, 0.5);

    --text-primary: #0B132B;
    --text-secondary: #1C2541;
    --text-muted: #6C757D;
    --text-dim: #6C757D;

    --accent-purple: #6F42C1;
    --accent-blue: #007BFF;
    --accent-emerald: #20C997;
    --accent-amber: #FD7E14;
    --accent-rose: #FD7E14;
    --accent-cyan: #20C997;
    --accent-teal: #20C997;

    --gradient-primary: linear-gradient(135deg, #007BFF, #3A86FF);
    --gradient-text: linear-gradient(135deg, #0B132B, #007BFF);
    --gradient-glow: linear-gradient(135deg, rgba(0, 123, 255, 0.08), rgba(0, 123, 255, 0.12));

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --max-width: 1200px;
    --section-gap: 3rem;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #60a5fa;
}

/* --- Ambient Background --- */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.ambient-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
    top: -10%;
    left: -5%;
    animation: floatOrb1 25s ease-in-out infinite;
}

.ambient-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(219, 39, 119, 0.12) 0%, transparent 70%);
    top: 30%;
    right: -10%;
    animation: floatOrb2 30s ease-in-out infinite;
}

.ambient-orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
    bottom: 10%;
    left: 20%;
    animation: floatOrb3 20s ease-in-out infinite;
}

@keyframes floatOrb1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(60px, 40px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 80px) scale(0.95);
    }
}

@keyframes floatOrb2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-50px, 60px) scale(1.05);
    }

    66% {
        transform: translate(40px, -40px) scale(0.9);
    }
}

@keyframes floatOrb3 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(70px, -50px) scale(1.15);
    }
}

/* --- Layout --- */
.app {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
}

/* --- Header --- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(11, 19, 43, 0.06);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.04);
    /* Break out of .app's max-width to go full-viewport-width */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 0.9rem clamp(1.5rem, 4vw, 3.5rem);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-navy {
    color: var(--text-primary);
}

.logo-blue {
    color: var(--accent-blue);
}

.settings-toggle {
    background: var(--accent-blue);
    border: none;
    border-radius: 6px;
    color: #FFFFFF;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.settings-toggle:hover {
    background: #006ee6;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.3);
}

.settings-toggle.active {
    background: var(--text-primary);
    box-shadow: 0 4px 12px rgba(11, 19, 43, 0.2);
}

/* --- Settings Panel --- */
.settings-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s var(--ease-out), opacity 0.3s ease, margin 0.3s ease;
    margin-bottom: 0;
}

.settings-panel.visible {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 1rem;
}

.settings-content {
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    margin-top: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.settings-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.settings-input-group input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.settings-input-group input:focus {
    border-color: var(--border-focus);
}

.settings-input-group input::placeholder {
    color: var(--text-dim);
}

.btn-save-key {
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-family: var(--font-family);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.btn-save-key:hover {
    opacity: 0.9;
}

.settings-hint {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 3.5rem 0 4rem;
}

.badge-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.hero-badge {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-blue);
    background: rgba(0, 123, 255, 0.08);
    border: 1px solid rgba(0, 123, 255, 0.15);
    border-radius: 9999px;
    padding: 0.4rem 1.25rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.text-blue {
    color: var(--accent-blue);
}

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

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Input Section --- */
.input-section {
    margin-bottom: var(--section-gap);
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.input-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.5rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.input-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-glow);
    border-radius: 10px;
    color: var(--accent-purple);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-subtle);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--accent-purple);
    background: rgba(124, 58, 237, 0.03);
}

.upload-zone.drag-over {
    border-style: solid;
    transform: scale(1.01);
}

.upload-icon {
    color: var(--text-dim);
    margin-bottom: 0.75rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.upload-zone:hover .upload-icon {
    color: var(--accent-purple);
    transform: translateY(-4px);
}

.upload-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* File uploaded state */
.upload-success {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    color: var(--accent-emerald);
    flex-shrink: 0;
}

.file-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    text-align: left;
    word-break: break-all;
}

.file-remove {
    background: rgba(244, 63, 94, 0.1);
    border: none;
    border-radius: 8px;
    color: var(--accent-rose);
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.file-remove:hover {
    background: rgba(244, 63, 94, 0.2);
}

/* JD Textarea */
.jd-textarea {
    width: 100%;
    min-height: 200px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease;
}

.jd-textarea:focus {
    border-color: var(--border-focus);
}

.jd-textarea::placeholder {
    color: var(--text-dim);
}

.jd-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* --- Action Buttons --- */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-analyze {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.875rem 2rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-analyze:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 40px rgba(124, 58, 237, 0.35);
}

.btn-analyze:active:not(:disabled) {
    transform: translateY(0);
}

.btn-analyze:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- Loading Section (Premium AI Pipeline) --- */
.loading-section {
    padding: 4rem 0;
}

.loader-container {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

/* Subtle shimmer overlay */
.loader-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 123, 255, 0.02) 25%,
        rgba(0, 123, 255, 0.04) 50%,
        rgba(0, 123, 255, 0.02) 75%,
        transparent 100%
    );
    animation: shimmerSweep 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmerSweep {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}

/* --- AI Orb --- */
.ai-orb-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.ai-orb {
    position: relative;
    width: 100px;
    height: 100px;
}

.ai-orb-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
}

.ai-orb-ring-1 {
    border-top-color: var(--accent-blue);
    border-right-color: rgba(0, 123, 255, 0.3);
    animation: orbSpin1 2s linear infinite;
}

.ai-orb-ring-2 {
    inset: 10px;
    border-bottom-color: var(--accent-purple);
    border-left-color: rgba(111, 66, 193, 0.3);
    animation: orbSpin2 2.5s linear infinite;
}

.ai-orb-ring-3 {
    inset: 20px;
    border-top-color: var(--accent-emerald);
    border-right-color: rgba(32, 201, 151, 0.3);
    animation: orbSpin3 3s linear infinite;
}

.ai-orb-core {
    position: absolute;
    inset: 30px;
    border-radius: 50%;
    background: var(--gradient-primary);
    box-shadow:
        0 0 20px rgba(0, 123, 255, 0.3),
        0 0 40px rgba(0, 123, 255, 0.15),
        inset 0 0 15px rgba(255, 255, 255, 0.2);
    animation: orbPulse 2s ease-in-out infinite;
}

@keyframes orbSpin1 {
    to { transform: rotate(360deg); }
}

@keyframes orbSpin2 {
    to { transform: rotate(-360deg); }
}

@keyframes orbSpin3 {
    to { transform: rotate(360deg); }
}

@keyframes orbPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 20px rgba(0, 123, 255, 0.3),
            0 0 40px rgba(0, 123, 255, 0.15);
    }
    50% {
        transform: scale(1.08);
        box-shadow:
            0 0 30px rgba(0, 123, 255, 0.4),
            0 0 60px rgba(0, 123, 255, 0.2);
    }
}

/* --- Current Step Text --- */
.loader-current-step {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    min-height: 1.6em;
    animation: textFadeIn 0.5s ease forwards;
}

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

/* --- Progress Bar --- */
.loader-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(0, 123, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.loader-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 1.2s var(--ease-out);
    position: relative;
}

.loader-progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-blue);
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

/* --- Completed Steps Log --- */
.loader-log {
    text-align: left;
    max-width: 400px;
    margin: 0 auto 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 40px;
}

.loader-log-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--accent-emerald);
    animation: logSlideIn 0.4s var(--ease-out) forwards;
    opacity: 0;
}

.loader-log-item .log-check {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(32, 201, 151, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-log-item .log-check svg {
    width: 10px;
    height: 10px;
}

@keyframes logSlideIn {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- ETA Text --- */
.loader-eta {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: center;
    margin-top: 0.5rem;
}


/* --- Results Section --- */
.results-section {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.results-section>* {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideUp 0.6s var(--ease-out) forwards;
}

.results-section>*:nth-child(1) {
    animation-delay: 0.1s;
}

.results-section>*:nth-child(2) {
    animation-delay: 0.2s;
}

.results-section>*:nth-child(3) {
    animation-delay: 0.35s;
}

.results-section>*:nth-child(4) {
    animation-delay: 0.5s;
}

.results-section>*:nth-child(5) {
    animation-delay: 0.65s;
}

.results-section>*:nth-child(6) {
    animation-delay: 0.8s;
}

.results-section>*:nth-child(7) {
    animation-delay: 0.95s;
}

.results-section>*:nth-child(8) {
    animation-delay: 1.1s;
}

@keyframes fadeSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Result Cards */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.result-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.result-title svg {
    color: var(--accent-teal);
}

.result-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

/* --- Score Card --- */
.score-card {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.score-visual {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.score-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-ring-bg {
    stroke: rgba(255, 255, 255, 0.05);
}

.score-ring-fill {
    stroke: url(#scoreGradient);
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s var(--ease-out);
}

.score-number {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.score-info {
    flex: 1;
}

.score-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.score-summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.level-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.level-badges svg {
    color: var(--text-dim);
}

.level-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    text-transform: capitalize;
}

.level-badge.target {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-purple);
}

/* --- Sub-Scores Breakdown --- */
.sub-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 1.5rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

.sub-score-bar {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sub-score-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.sub-score-value {
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

.sub-score-track {
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.sub-score-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 1.2s var(--ease-out);
}

.sub-score-fill.high {
    background: var(--accent-emerald);
}

.sub-score-fill.mid {
    background: var(--accent-amber);
}

.sub-score-fill.low {
    background: var(--accent-rose);
}

/* --- Skills Card --- */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.skills-column-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-green {
    background: var(--accent-emerald);
}

.dot-red {
    background: var(--accent-rose);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.skill-pill {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.3rem 0.7rem;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: transform 0.2s ease;
}

.skill-pill:hover {
    transform: translateY(-1px);
}

.skill-pill.present {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.skill-pill.missing {
    background: rgba(251, 113, 133, 0.1);
    color: var(--accent-rose);
    border: 1px solid rgba(251, 113, 133, 0.15);
}

.skill-pill.missing.critical {
    background: rgba(251, 113, 133, 0.15);
    border-color: rgba(251, 113, 133, 0.25);
}

.skill-pill.missing.important {
    background: rgba(251, 191, 36, 0.1);
    color: var(--accent-amber);
    border-color: rgba(251, 191, 36, 0.15);
}

.skill-pill.missing.nice-to-have {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-secondary);
    border-color: rgba(100, 116, 139, 0.15);
}

.importance-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.importance-dot.critical {
    background: var(--accent-rose);
}

.importance-dot.important {
    background: var(--accent-amber);
}

.importance-dot.nice-to-have {
    background: var(--text-dim);
}

/* --- Missing Skill Wrapper & Bridge Bullet Cards --- */
.bridge-bullets-card {
    border-top: 2px solid var(--accent-amber);
}

.bridge-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--accent-amber);
}

.bridge-card:last-child {
    margin-bottom: 0;
}

/* Bridge Empty State */
.bridge-empty-state {
    text-align: center;
    padding: 2rem 1.5rem;
}

.bridge-empty-icon {
    color: var(--accent-amber);
    margin-bottom: 1rem;
    opacity: 0.7;
}

.bridge-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.bridge-empty-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto;
}

.bridge-empty-desc strong {
    color: var(--accent-blue);
    font-weight: 600;
}

.bridge-card-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.75rem;
    gap: 0.75rem;
}

.bridge-insert-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.bridge-insert-label svg {
    color: var(--accent-amber);
}

.bridge-insert-label strong {
    color: var(--accent-amber);
}

.bridge-skills-covered {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.bridge-skill-tag {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-purple);
    border: 1px solid rgba(37, 99, 235, 0.15);
    text-transform: capitalize;
}

.bridge-bullet-body {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.bridge-bullet-text {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.6;
    font-style: italic;
}

.bridge-rationale {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.5;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
}

/* --- Bullet Revisions (Before & After) --- */
.revisions-card {
    border-top: 2px solid var(--accent-emerald);
}

.revisions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.revision-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.revision-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.revision-original {
    padding: 1rem 1.25rem;
    border-left: 3px solid var(--accent-rose);
    position: relative;
}

.revision-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.revision-label.before {
    color: var(--accent-rose);
}

.revision-label.after {
    color: var(--accent-emerald);
}

.revision-original-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    text-decoration: line-through;
    text-decoration-color: rgba(244, 63, 94, 0.3);
}

.revision-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0;
    color: var(--text-dim);
    background: rgba(0, 0, 0, 0.01);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.revision-optimized {
    padding: 1rem 1.25rem;
    border-left: 3px solid var(--accent-emerald);
    position: relative;
}

.revision-optimized-body {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.revision-optimized-text {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 500;
}

.revision-reason {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
    font-style: italic;
}

/* --- Project Cards --- */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 1.5rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.project-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 14px 14px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover::before {
    opacity: 1;
}

.project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.project-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--gradient-primary);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.project-title-group {
    flex: 1;
}

.project-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.project-skill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-purple);
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.project-meta {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.project-meta-item {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.project-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 0.875rem;
}

.project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.tech-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(34, 211, 238, 0.08);
    color: var(--accent-cyan);
    border: 1px solid rgba(34, 211, 238, 0.12);
}

/* Resume Bullet - the key feature */
.resume-bullet-section {
    background: rgba(16, 185, 129, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    padding: 1rem;
}

.resume-bullet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.resume-bullet-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-emerald);
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.btn-copy:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-copy.copied {
    color: var(--accent-emerald);
    border-color: rgba(16, 185, 129, 0.3);
}

.resume-bullet-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.6;
    font-style: italic;
}

/* --- Ready-Made Resources --- */
.resources-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resource-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 1.25rem;
    transition: border-color 0.3s ease;
}

.resource-card:hover {
    border-color: var(--border-hover);
}

.resource-skill-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-teal);
    margin-bottom: 0.875rem;
}

.resource-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.resource-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.625rem 0.875rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.resource-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.resource-btn svg {
    flex-shrink: 0;
}

/* GitHub */
.resource-btn-github {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
    border-color: rgba(0, 0, 0, 0.08);
}

.resource-btn-github:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #000000;
}

/* YouTube */
.resource-btn-youtube {
    background: rgba(255, 0, 0, 0.08);
    color: #ff6b6b;
    border-color: rgba(255, 0, 0, 0.12);
}

.resource-btn-youtube:hover {
    background: rgba(255, 0, 0, 0.15);
    color: #ff4444;
}

/* Kaggle */
.resource-btn-kaggle {
    background: rgba(32, 190, 255, 0.08);
    color: #20beff;
    border-color: rgba(32, 190, 255, 0.12);
}

.resource-btn-kaggle:hover {
    background: rgba(32, 190, 255, 0.15);
    color: #4dcbff;
}

/* Blog / Dev.to */
.resource-btn-blog {
    background: rgba(37, 99, 235, 0.08);
    color: #60a5fa;
    border-color: rgba(37, 99, 235, 0.12);
}

.resource-btn-blog:hover {
    background: rgba(37, 99, 235, 0.15);
    color: #93bbfd;
}

/* --- Tips Card --- */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.tip-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
}

.tip-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(251, 191, 36, 0.1);
    color: var(--accent-amber);
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.tip-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* --- Start Over --- */
.start-over {
    text-align: center;
    margin-top: 1.5rem;
}

.btn-start-over {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-start-over:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: var(--bg-card);
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 2.5rem 0 3rem;
    color: var(--text-dim);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 2rem;
}

.footer-links {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.footer-dot {
    color: var(--text-dim);
    font-size: 0.6rem;
}

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

/* --- Responsive --- */
@media (max-width: 700px) {
    .input-grid {
        grid-template-columns: 1fr;
    }

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

    .score-card {
        flex-direction: column;
        text-align: center;
    }

    .score-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .level-badges {
        justify-content: center;
    }

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

    .project-header {
        flex-direction: column;
    }

    .project-meta {
        margin-top: 0.25rem;
    }

    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-analyze {
        justify-content: center;
    }

    .resource-links {
        grid-template-columns: 1fr;
    }

    .sub-scores {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   AUTH SCREEN — Side-by-Side Split Layout
   ============================================================ */

.auth-screen {
    width: 100%;
    padding: 0 0 4rem;
    box-sizing: border-box;
}

.auth-split {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
    padding-top: 3rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.auth-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
    width: 100%;
}

.auth-panel-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-hero {
    padding: 0 0 2rem;
}

/* --- X-Factors Grid --- */
.xfactors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.xfactor-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s var(--ease-out);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.xfactor-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
    transform: translateY(-3px);
}

.xfactor-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.xfactor-icon-score {
    background: rgba(0, 123, 255, 0.08);
    color: var(--accent-blue);
}

.xfactor-icon-bridge {
    background: rgba(111, 66, 193, 0.08);
    color: var(--accent-purple);
}

.xfactor-icon-optimize {
    background: rgba(32, 201, 151, 0.08);
    color: var(--accent-emerald);
}

.xfactor-icon-roadmap {
    background: rgba(253, 126, 20, 0.08);
    color: var(--accent-amber);
}

.xfactor-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.xfactor-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 0;
}

/* --- Auth Buttons Section --- */
.auth-actions {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.auth-trial-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.auth-trial-text strong {
    color: var(--accent-emerald);
}

.btn-google-signin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.btn-google-signin:hover {
    border-color: var(--border-hover);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.btn-google-signin:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-subtle);
}

.auth-divider span {
    position: relative;
    background: var(--bg-primary);
    padding: 0 1rem;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.email-auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.auth-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.auth-input::placeholder {
    color: var(--text-dim);
}

.btn-email-action {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: var(--gradient-primary);
    color: white;
    margin-top: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.btn-email-action:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.btn-email-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-switch-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
}

.auth-switch-text a {
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
}

.auth-switch-text a:hover {
    text-decoration: underline;
}

/* ============================================================
   HEADER AUTH CONTROLS
   ============================================================ */

.header-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.credit-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-emerald);
    background: rgba(32, 201, 151, 0.08);
    border: 1px solid rgba(32, 201, 151, 0.15);
    border-radius: 9999px;
    padding: 0.35rem 0.85rem;
}

.btn-add-credits {
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-family: var(--font-family);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-add-credits:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* --- User Menu --- */
.user-menu {
    position: relative;
}

.user-avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-subtle);
    background: var(--bg-card);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease;
    padding: 0;
}

.user-avatar-btn:hover {
    border-color: var(--accent-blue);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-initial {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    z-index: 200;
    overflow: hidden;
}

.dropdown-user-info {
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dropdown-user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dropdown-user-email {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.65rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(0, 123, 255, 0.04);
}

.dropdown-logout {
    color: #f43f5e;
}

.dropdown-logout:hover {
    background: rgba(244, 63, 94, 0.05);
}

/* ============================================================
   CREDITS MODAL
   ============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2rem 2rem 1.5rem;
    max-width: 440px;
    width: 100%;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.03) inset;
    animation: fadeSlideUp 0.3s var(--ease-out);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

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

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.credits-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.credit-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-input);
    border: 1.5px solid var(--border-subtle);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
    position: relative;
}

.credit-option:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.04);
    transform: translateY(-1px);
}

.credit-option.selected {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), 0 4px 16px rgba(99, 102, 241, 0.1);
}

.credit-option.selected::before {
    content: '✓';
    position: absolute;
    left: -0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: #6366f1;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
}

.credit-option.popular {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.04);
}

.credit-option.popular::after {
    content: 'Most Purchased';
    position: absolute;
    top: -9px;
    right: 12px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.credit-option.best-value {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.04);
}

.credit-option.best-value::after {
    content: 'Best Value';
    position: absolute;
    top: -9px;
    right: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.credit-option-count {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.credit-option-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: #818cf8;
}

/* --- Continue to Pay Button --- */
.btn-checkout {
    width: 100%;
    margin-top: 1.25rem;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-checkout:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(99, 102, 241, 0.45);
}

.btn-checkout:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.modal-note {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 1rem;
    letter-spacing: 0.01em;
}

.payment-processing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 0 1.5rem;
    text-align: center;
}

/* ============================================================
   HISTORY SECTION
   ============================================================ */

.history-section {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.history-empty {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
    padding: 2rem;
}

.history-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.history-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.history-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.history-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.history-card-date {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.history-card-score {
    display: flex;
    align-items: baseline;
    gap: 0.15rem;
}

.history-score-number {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-blue);
}

.history-score-label {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* --- History Pagination --- */
.history-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.history-count {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-weight: 500;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 0.55rem 1.2rem;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-load-more:hover:not(:disabled) {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(0, 123, 255, 0.04);
    transform: translateY(-1px);
}

.btn-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   UTILITY
   ============================================================ */

.hidden {
    display: none !important;
}

/* ============================================================
   RESPONSIVE — Auth & New Components
   ============================================================ */

@media (max-width: 1000px) {
    .auth-screen {
        padding: 0 0 4rem;
    }

    .auth-split {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding-top: 2rem;
    }

    .auth-panel {
        max-width: 480px;
        margin: 0 auto;
    }

    .auth-left .auth-hero {
        text-align: center;
    }

    .auth-left .auth-hero .badge-container {
        justify-content: center !important;
    }

    .auth-left .auth-hero .hero-title {
        text-align: center !important;
    }

    .auth-left .auth-hero .hero-subtitle {
        text-align: center !important;
        margin: 0 auto !important;
    }
}

@media (max-height: 860px) and (min-width: 1001px) {
    .auth-screen {
        padding-bottom: 2.5rem;
    }

    .auth-split {
        gap: 3vw;
        padding-top: 2rem;
    }

    .auth-hero {
        padding-bottom: 1.25rem;
    }

    .hero-title {
        font-size: clamp(2rem, 4vw, 3rem);
        line-height: 1.08;
        margin-bottom: 0.9rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.1rem;
    }

    .xfactors-grid {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .xfactor-card {
        padding: 1rem;
    }

    .xfactor-title {
        font-size: 0.9rem;
    }

    .xfactor-desc {
        font-size: 0.78rem;
        line-height: 1.45;
    }

    .auth-panel {
        padding: 1.9rem 1.6rem;
    }
}

@media (max-width: 768px) {
    .xfactors-grid {
        grid-template-columns: 1fr;
    }

    .header-auth {
        gap: 0.5rem;
    }

    .credit-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .btn-add-credits {
        font-size: 0.7rem;
        padding: 0.4rem 0.7rem;
    }

    .email-auth-buttons {
        flex-direction: column;
    }

    .auth-hero {
        padding: 2rem 0 1.5rem;
    }
}

/* ============================================================
   APP LOADING SCREEN — Premium Minimal Loader
   ============================================================ */

.app-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    gap: 1.5rem;
    animation: loaderFadeIn 0.6s ease forwards;
}

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

.app-loading-logo {
    animation: logoPulse 2.5s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

.app-loading-ring {
    width: 48px;
    height: 48px;
}

.app-loading-ring svg {
    width: 100%;
    height: 100%;
    animation: ringRotate 1.4s linear infinite;
}

@keyframes ringRotate {
    to { transform: rotate(360deg); }
}

.app-loading-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.app-loading-quote {
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.app-loading-dots {
    display: flex;
    gap: 6px;
}

.app-loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-blue);
    animation: dotBounce 1.4s ease-in-out infinite;
}

.app-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.app-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotBounce {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.2); }
}

/* ============================================================
   BACK TO DASHBOARD BUTTON (on results page)
   ============================================================ */

.results-header-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
}

.btn-back-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back-dashboard:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(0, 123, 255, 0.04);
    transform: translateX(-2px);
}

/* ============================================================
   SUPPORT & REVIEW MODALS
   ============================================================ */

.star-rating {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 2.5rem;
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.star-rating .star {
    color: var(--border-subtle);
    transition: color 0.2s ease, transform 0.2s ease;
}

.star-rating .star:hover,
.star-rating .star.hovered,
.star-rating .star.selected {
    color: #fbbf24; /* Amber yellow */
}

.star-rating .star:active {
    transform: scale(0.9);
}

.review-input {
    width: 100%;
    min-height: 120px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.2s ease;
}

.review-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ============================================================
   TRANSACTION / BILLING HISTORY
   ============================================================ */

.transaction-section {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}

.transaction-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.transaction-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.transaction-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.transaction-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.transaction-date {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.transaction-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: right;
}

.transaction-amount {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.transaction-credits {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-emerald);
    background: rgba(32, 201, 151, 0.08);
    border: 1px solid rgba(32, 201, 151, 0.15);
    border-radius: 100px;
    padding: 0.2rem 0.6rem;
}

.transaction-status {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}

.transaction-status.success {
    color: var(--accent-emerald);
    background: rgba(32, 201, 151, 0.08);
}

.transaction-status.pending {
    color: var(--accent-amber);
    background: rgba(253, 126, 20, 0.08);
}

/* ============================================================
   CONTACT PAGE STYLES
   ============================================================ */

.contact-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 700px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.contact-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.contact-card-title svg {
    color: var(--accent-blue);
}

.contact-card-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contact-email-box {
    background: rgba(0, 123, 255, 0.04);
    border: 1px solid rgba(0, 123, 255, 0.12);
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
}

.contact-email-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.3rem;
}

.contact-email-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
}

.contact-email-link:hover {
    text-decoration: underline;
}

.contact-response-note {
    font-size: 0.78rem;
    color: var(--text-dim);
    text-align: center;
    margin-top: 0.75rem;
}