/* =============================================
   ResumeRadar — Premium Design System v3
   3D Interactive + Glassmorphism + Premium Dark UI
   ============================================= */

/* ---------- Design Tokens ---------- */
:root {
    --bg-base: #050507;
    --bg-raised: #0a0a0e;
    --bg-surface: rgba(255, 255, 255, 0.025);
    --bg-surface-hover: rgba(255, 255, 255, 0.05);
    --bg-surface-active: rgba(255, 255, 255, 0.07);

    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-hover: rgba(255, 255, 255, 0.06);
    --glass-shine: rgba(255, 255, 255, 0.08);

    --text-100: #f5f5f7;
    --text-200: #b8b8c4;
    --text-300: #7a7a8a;
    --text-400: #4a4a56;

    --accent: #8b5cf6;
    --accent-dim: rgba(139, 92, 246, 0.10);
    --accent-glow: rgba(139, 92, 246, 0.30);
    --accent-2: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    --accent-gradient-text: linear-gradient(135deg, #a78bfa 0%, #22d3ee 100%);
    --accent-gradient-vivid: linear-gradient(135deg, #7c3aed 0%, #0891b2 50%, #8b5cf6 100%);

    --red: #f43f5e;
    --red-dim: rgba(244, 63, 94, 0.08);
    --green: #10b981;
    --green-dim: rgba(16, 185, 129, 0.08);
    --blue: #3b82f6;
    --blue-dim: rgba(59, 130, 246, 0.08);
    --purple: #8b5cf6;
    --purple-dim: rgba(139, 92, 246, 0.08);
    --cyan-dim: rgba(6, 182, 212, 0.10);
    --emerald-dim: rgba(16, 185, 129, 0.10);
    --amber-dim: rgba(245, 158, 11, 0.10);
    --rose-dim: rgba(244, 63, 94, 0.10);
    --indigo-dim: rgba(99, 102, 241, 0.10);

    --border: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(255, 255, 255, 0.10);
    --border-focus: rgba(139, 92, 246, 0.4);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1120px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
}

body {
    font-family: var(--font);
    background: var(--bg-base);
    color: var(--text-100);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
button { font-family: var(--font); }

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

/* ---------- 3D Canvas Background ---------- */
#bgCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
}

/* ---------- Ambient Background ---------- */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    pointer-events: none;
    z-index: 0;
    animation: ambientDrift 20s ease-in-out infinite alternate;
    will-change: transform, opacity;
}

.ambient-glow--1 {
    width: 700px;
    height: 700px;
    top: -250px;
    left: -150px;
    background: rgba(139, 92, 246, 0.07);
}

.ambient-glow--2 {
    width: 600px;
    height: 600px;
    bottom: -200px;
    right: -150px;
    background: rgba(6, 182, 212, 0.05);
    animation-delay: -7s;
}

.ambient-glow--3 {
    width: 400px;
    height: 400px;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(139, 92, 246, 0.03);
    animation-delay: -14s;
}

@keyframes ambientDrift {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    25% { transform: translate(40px, -30px) scale(1.08); opacity: 0.8; }
    50% { transform: translate(-30px, 25px) scale(0.95); opacity: 1; }
    75% { transform: translate(20px, -15px) scale(1.04); opacity: 0.85; }
    100% { transform: translate(0, 0) scale(1); opacity: 1; }
}

.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.018;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px;
}

/* ---------- Floating Orbs ---------- */
.floating-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    will-change: transform, opacity;
}

.orb--1 {
    width: 200px;
    height: 200px;
    background: #8b5cf6;
    top: 15%;
    left: 10%;
    animation: orbFloat1 25s ease-in-out infinite;
}

.orb--2 {
    width: 150px;
    height: 150px;
    background: #06b6d4;
    top: 60%;
    right: 15%;
    animation: orbFloat2 30s ease-in-out infinite;
}

.orb--3 {
    width: 120px;
    height: 120px;
    background: #a78bfa;
    bottom: 20%;
    left: 30%;
    animation: orbFloat3 20s ease-in-out infinite;
}

.orb--4 {
    width: 100px;
    height: 100px;
    background: #22d3ee;
    top: 30%;
    right: 25%;
    animation: orbFloat4 28s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.15; }
    25% { transform: translate(100px, -50px) scale(1.1); opacity: 0.25; }
    50% { transform: translate(-40px, 70px) scale(0.9); opacity: 0.15; }
    75% { transform: translate(60px, 30px) scale(1.05); opacity: 0.2; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.15; }
}

@keyframes orbFloat2 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.12; }
    25% { transform: translate(-70px, 40px) scale(1.15); opacity: 0.22; }
    50% { transform: translate(50px, -60px) scale(0.85); opacity: 0.12; }
    75% { transform: translate(-30px, -40px) scale(1.1); opacity: 0.18; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.12; }
}

@keyframes orbFloat3 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.1; }
    33% { transform: translate(50px, 60px) scale(1.2); opacity: 0.2; }
    66% { transform: translate(-70px, -30px) scale(0.8); opacity: 0.1; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.1; }
}

@keyframes orbFloat4 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.08; }
    33% { transform: translate(-60px, -70px) scale(1.25); opacity: 0.18; }
    66% { transform: translate(80px, 40px) scale(0.9); opacity: 0.12; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.08; }
}

/* ---------- Container ---------- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ---------- Glass Card System ---------- */
.glass-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-slow);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-shine), transparent);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

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

.glass-card:hover {
    border-color: var(--border-hover);
    background: var(--glass-hover);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 0 40px rgba(139, 92, 246, 0.05);
    transform: translateY(-2px);
}

/* ---------- Navbar ---------- */
.navbar {
    position: relative;
    z-index: 100;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    background: rgba(5, 5, 7, 0.6);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-slow);
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2), transparent);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.navbar:hover::after {
    opacity: 1;
}

.nav-container {
    max-width: var(--container);
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform var(--transition);
}

.nav-logo:hover {
    transform: scale(1.02);
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--accent-dim);
    color: var(--accent);
    position: relative;
    overflow: hidden;
}

.logo-mark::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 10px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition);
    z-index: -1;
}

.nav-logo:hover .logo-mark::after {
    opacity: 0.2;
}

.logo-text {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-300);
    transition: color var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 1px;
    transition: width var(--transition);
}

.nav-link:hover { color: var(--text-100); }
.nav-link:hover::after { width: 100%; }

/* ---------- 3D Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-3d {
    transform-style: preserve-3d;
    perspective: 800px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-3d:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn-3d:active {
    transform: translateY(1px) scale(0.98);
    transition-duration: 0.1s;
}

.btn-nav {
    padding: 8px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-200);
    font-size: 0.82rem;
    border-radius: 8px;
}

.btn-nav:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-hover);
    color: var(--text-100);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    padding: 12px 28px;
    background: var(--accent);
    color: white;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    background: #7c4fe0;
    box-shadow:
        0 8px 30px rgba(139, 92, 246, 0.4),
        0 0 0 1px rgba(139, 92, 246, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

/* Glow Button Animation */
.btn-glow {
    animation: btnGlow 3s ease-in-out infinite;
}

@keyframes btnGlow {
    0%, 100% { box-shadow: 0 2px 4px rgba(0,0,0,0.3), 0 0 0 1px rgba(139,92,246,0.3), 0 0 20px rgba(139,92,246,0.1); }
    50% { box-shadow: 0 2px 4px rgba(0,0,0,0.3), 0 0 0 1px rgba(139,92,246,0.4), 0 0 40px rgba(139,92,246,0.2), 0 0 80px rgba(139,92,246,0.05); }
}

.btn-glow:hover {
    animation: none;
}

/* Shimmer Effect on Buttons */
.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 40%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.05) 60%,
        transparent 100%
    );
    transform: rotate(30deg) translateX(-100%);
    transition: transform 0.6s;
    pointer-events: none;
}

.btn-primary:hover::after {
    transform: rotate(30deg) translateX(100%);
}

.btn-secondary {
    padding: 12px 28px;
    background: var(--bg-surface);
    color: var(--text-200);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-hover);
    color: var(--text-100);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 0.9rem;
    border-radius: var(--radius-lg);
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-400);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-icon:hover {
    background: var(--bg-surface-hover);
    color: var(--text-200);
    transform: scale(1.1);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-300);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all var(--transition);
    font-family: var(--font);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-text:hover {
    color: var(--accent);
    background: var(--accent-dim);
    transform: translateY(-1px);
}

/* ---------- Hero Section ---------- */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px 100px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 760px;
    position: relative;
    z-index: 1;
}

/* Hero Rings */
.hero-rings {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.hero-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(139, 92, 246, 0.06);
    will-change: transform, opacity;
}

.hero-ring--1 {
    width: 400px;
    height: 400px;
    animation: ringPulse 8s ease-in-out infinite;
}

.hero-ring--2 {
    width: 600px;
    height: 600px;
    animation: ringPulse 8s ease-in-out infinite 2s;
}

.hero-ring--3 {
    width: 800px;
    height: 800px;
    animation: ringPulse 8s ease-in-out infinite 4s;
}

@keyframes ringPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); border-color: rgba(139, 92, 246, 0.12); }
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-300);
    margin-bottom: 28px;
}

.eyebrow-icon {
    color: var(--accent);
}

.eyebrow-line {
    width: 24px;
    height: 1px;
    background: var(--border-hover);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin-bottom: 20px;
}

.calligraphy-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.02em;
}

.hero-gradient {
    display: block;
    background: var(--accent-gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-200);
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.7;
    font-weight: 400;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 56px;
}

.hero-metrics {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.metric {
    display: flex;
    align-items: center;
    gap: 12px;
}

.metric-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--accent-dim);
    color: var(--accent);
    flex-shrink: 0;
}

.metric-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-100);
}

.metric-label {
    font-size: 0.72rem;
    color: var(--text-400);
    font-weight: 500;
    margin-top: 1px;
}

.metric-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

.hero-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black, transparent);
    pointer-events: none;
}

/* ---------- Scroll Reveal Animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }

/* ---------- Sections ---------- */
.section {
    padding: 120px 0;
    position: relative;
}

.section--scanner {
    background: var(--bg-raised);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 14px;
    padding: 6px 14px;
    background: var(--accent-dim);
    border-radius: 100px;
    border: 1px solid rgba(139, 92, 246, 0.12);
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-300);
    margin-top: 12px;
}

/* ---------- Steps ---------- */
.steps-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    perspective: 1200px;
}

.step {
    flex: 1;
    max-width: 300px;
    padding: 40px 28px 36px;
    border-radius: var(--radius-xl);
    text-align: center;
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step.reveal {
    opacity: 0;
    transform: translateY(40px) rotateX(12deg) scale(0.92);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step.reveal.revealed {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
}

.step::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), transparent 60%);
    pointer-events: none;
    transform: translateZ(5px);
}

/* 3D Hover Effect */
.step:hover {
    transform: translateY(-10px) rotateX(2deg) scale(1.03);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(139, 92, 246, 0.12),
        0 0 40px rgba(139, 92, 246, 0.06);
    border-color: rgba(139, 92, 246, 0.1);
}

/* Step Number Badge via data-step attribute */
.step::before {
    content: attr(data-step);
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%) translateZ(8px);
    font-size: 0.7rem;
    font-weight: 800;
    color: white;
    background: var(--accent-gradient);
    padding: 4px 18px;
    border-radius: 100px;
    letter-spacing: 0.08em;
    box-shadow:
        0 4px 15px rgba(139, 92, 246, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.step:hover::before {
    transform: translateX(-50%) translateY(-4px) translateZ(12px);
    box-shadow:
        0 8px 25px rgba(139, 92, 246, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Icon Wrap — 3D Tilt */
.step-icon-wrap {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.12), rgba(139, 92, 246, 0.04));
    color: var(--accent);
    margin: 0 auto 20px;
    position: relative;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    border: 1px solid rgba(139, 92, 246, 0.08);
}

.step-icon-wrap::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.step:hover .step-icon-wrap {
    transform: translateZ(10px) rotateY(-8deg) rotateX(4deg) scale(1.1);
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.18), rgba(139, 92, 246, 0.06));
    box-shadow:
        0 10px 30px rgba(139, 92, 246, 0.2),
        0 0 0 1px rgba(139, 92, 246, 0.12);
}

.step:hover .step-icon-wrap::before {
    opacity: 0.2;
}

/* Inner icon SVG */
.step-icon-wrap svg {
    transition: transform 0.4s ease;
}

.step:hover .step-icon-wrap svg {
    transform: scale(1.1);
}

/* Step Text */
.step h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
    color: var(--text-100);
    transition: color var(--transition);
}

.step:hover h3 {
    color: white;
}

.step p {
    font-size: 0.85rem;
    color: var(--text-300);
    line-height: 1.7;
    transition: color var(--transition);
}

.step:hover p {
    color: var(--text-200);
}

/* Connecting Arrows — Animated Flow */
.step-arrow {
    padding-top: 70px;
    color: var(--text-400);
    flex-shrink: 0;
    position: relative;
    animation: arrowPulse 2.5s ease-in-out infinite;
}

.step-arrow:nth-child(4) { animation-delay: 0.5s; }

@keyframes arrowPulse {
    0%, 100% { opacity: 0.2; transform: translateX(0); }
    50% { opacity: 0.5; transform: translateX(4px); }
}



/* ---------- Scanner ---------- */
.section--scanner {
    position: relative;
}

.section--scanner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 30% at 50% 0%, rgba(139, 92, 246, 0.04), transparent),
                radial-gradient(ellipse 50% 40% at 50% 100%, rgba(6, 182, 212, 0.03), transparent);
    pointer-events: none;
}

.scanner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
    align-items: stretch;
    position: relative;
}

.scanner-card {
    background: rgba(10, 10, 14, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all var(--transition-slow);
    position: relative;
}

.scanner-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), transparent 40%, rgba(6, 182, 212, 0.08));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.scanner-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-xl);
    opacity: 0;
    background: linear-gradient(135deg, var(--accent), transparent 40%, var(--accent-2));
    transition: opacity var(--transition-slow);
    z-index: -1;
}

.scanner-card:focus-within {
    border-color: transparent;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.08), 0 8px 40px rgba(0, 0, 0, 0.3);
}

.scanner-card:focus-within::after {
    opacity: 1;
}

.scanner-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.015);
}

.scanner-card-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-100);
}

.card-label-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--accent-dim);
    color: var(--accent);
    transition: all var(--transition);
}

.scanner-card:focus-within .card-label-icon {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.scanner-card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Drop Zone */
.drop-zone {
    margin: 16px 20px 0;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.drop-zone::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, transparent, rgba(139, 92, 246, 0.03), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.drop-zone:hover::before,
.drop-zone.drag-over::before {
    opacity: 1;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-dim);
    transform: translateY(-1px);
}

.drop-zone-icon {
    color: var(--text-400);
    opacity: 0.4;
    transition: all var(--transition);
}

.drop-zone:hover .drop-zone-icon {
    color: var(--accent);
    opacity: 0.9;
    transform: translateY(-3px) scale(1.1);
}

.drop-zone-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-200);
}

.drop-zone-sub {
    font-size: 0.75rem;
    color: var(--text-400);
}

.drop-zone.hidden { display: none; }

/* Textarea */
.scanner-textarea {
    width: 100%;
    min-height: 220px;
    padding: 18px 22px;
    background: transparent;
    border: none;
    color: var(--text-100);
    font-family: var(--font);
    font-size: 0.9rem;
    line-height: 1.8;
    resize: vertical;
    outline: none;
    flex: 1;
    transition: background var(--transition);
}

.scanner-textarea:focus {
    background: rgba(139, 92, 246, 0.02);
}

.scanner-textarea::placeholder { color: var(--text-400); }

.scanner-card-footer {
    padding: 10px 22px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.char-indicator {
    font-size: 0.7rem;
    color: var(--text-400);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* ---------- Analyze Row ---------- */
.analyze-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
    position: relative;
}

.analyze-row::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.2), transparent);
}

.btn-analyze {
    min-width: 240px;
    padding: 16px 40px;
    font-size: 1rem;
    border-radius: var(--radius-lg);
    letter-spacing: 0.01em;
}

.btn-analyze:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    animation: none !important;
}

.btn-analyze-default,
.btn-analyze-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.5s linear infinite;
}

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

.analyze-status {
    font-size: 0.78rem;
    color: var(--text-400);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition);
}

/* ---------- Results ---------- */
.results {
    animation: resultsFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.results::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.15), transparent);
}

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

/* Score Card */
.result-score-card {
    display: flex;
    align-items: center;
    gap: 48px;
    padding: 40px 48px;
    border-radius: var(--radius-xl);
    margin-bottom: 24px;
    position: relative;
    transition: all var(--transition-slow);
}

.result-score-card:hover {
    border-color: var(--border-hover);
    box-shadow:
        0 12px 45px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(139, 92, 246, 0.06);
    transform: translateY(-2px);
}

.result-score-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), transparent 50%, rgba(6, 182, 212, 0.15));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    pointer-events: none;
}

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

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

.score-ring-track { stroke: rgba(255, 255, 255, 0.04); }

.score-ring-glow {
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.score-ring-bar {
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    filter: drop-shadow(0 0 6px currentColor);
}

/* Color by score level */
.result-score-card[data-level="high"] .score-ring-bar { stroke: url(#scoreGradientHigh); }
.result-score-card[data-level="mid"] .score-ring-bar { stroke: url(#scoreGradientMid); }
.result-score-card[data-level="low"] .score-ring-bar { stroke: url(#scoreGradientLow); }
.result-score-card[data-level="high"] .score-ring-glow { stroke: var(--green); }
.result-score-card[data-level="mid"] .score-ring-glow { stroke: #eab308; }
.result-score-card[data-level="low"] .score-ring-glow { stroke: var(--red); }

.result-score-card[data-level="high"] .score-num { color: var(--green); }
.result-score-card[data-level="mid"] .score-num { color: #eab308; }
.result-score-card[data-level="low"] .score-num { color: var(--red); }

.score-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-num {
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 30px currentColor;
}

.score-pct {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-400);
    margin-top: 6px;
}

.score-info { flex: 1; }

.score-verdict {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.score-summary {
    font-size: 0.9rem;
    color: var(--text-300);
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Sub-score bars */
.score-bars { display: flex; flex-direction: column; gap: 10px; }

.score-bar-row {
    display: grid;
    grid-template-columns: 110px 1fr 40px;
    align-items: center;
    gap: 12px;
}

.score-bar-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-300);
    display: flex;
    align-items: center;
    gap: 6px;
}

.score-bar-track {
    height: 6px;
    background: var(--border);
    border-radius: 100px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 100px;
    background: var(--accent-gradient);
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
    width: 0%;
    position: relative;
}

.score-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    border-radius: 0 100px 100px 0;
    animation: barShimmer 2s ease-in-out infinite;
}

@keyframes barShimmer {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.score-bar-value {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-200);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Result Grid */
.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.result-card {
    border-radius: var(--radius-xl);
    padding: 28px;
    animation: cardReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-slow);
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    opacity: 0.6;
    transition: opacity var(--transition);
}

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

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

.result-card--missing::before { background: linear-gradient(90deg, #f43f5e, #fb7185); }
.result-card--found::before { background: linear-gradient(90deg, #10b981, #34d399); }
.result-card--suggestions::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.result-card--rewrites::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

.result-card:nth-child(1) { animation-delay: 0s; }
.result-card:nth-child(2) { animation-delay: 0.08s; }
.result-card:nth-child(3) { animation-delay: 0.16s; }
.result-card:nth-child(4) { animation-delay: 0.24s; }

@keyframes cardReveal {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.result-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.result-dot {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition);
}

.result-card:hover .result-dot {
    transform: scale(1.1);
}

.result-dot--red { background: var(--red-dim); color: var(--red); }
.result-dot--green { background: var(--green-dim); color: var(--green); }
.result-dot--blue { background: var(--blue-dim); color: var(--blue); }
.result-dot--purple { background: var(--purple-dim); color: var(--purple); }

.result-card-head h4 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-100);
}

.result-card-hint {
    font-size: 0.68rem;
    color: var(--text-400);
    font-weight: 400;
    margin-left: auto;
    display: none;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg-surface);
}

.result-card--missing:hover .result-card-hint {
    display: inline;
}

.result-card-desc {
    font-size: 0.8rem;
    color: var(--text-400);
    margin-bottom: 18px;
    line-height: 1.6;
}

/* Tags */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    overflow-wrap: break-word;
    max-width: 100%;
    animation: tagPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: default;
}

.tag:hover {
    transform: translateY(-2px) scale(1.05);
}

.tag--missing {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(244, 63, 94, 0.12);
}

.tag--missing:hover {
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.15);
}

.tag--found {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.12);
}

.tag--found:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.tag--overflow {
    background: var(--bg-surface);
    color: var(--text-400);
    border: 1px dashed var(--border);
    font-size: 0.7rem;
    cursor: default;
}
.tag--overflow:hover { transform: none; box-shadow: none; }

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

/* Suggestions list is fully styled in the overhaul section below */
    color: var(--blue);
    font-size: 0.72rem;
    font-weight: 700;
}

/* Rewrites */
.rewrite-blocks {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rewrite-block {
    padding: 16px 18px;
    background: var(--purple-dim);
    border: 1px solid rgba(139, 92, 246, 0.10);
    border-radius: var(--radius);
    position: relative;
    animation: fadeSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    transition: all var(--transition);
}

.rewrite-block:hover {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.18);
}

.rewrite-block:nth-child(2) { animation-delay: 0.1s; }
.rewrite-block:nth-child(3) { animation-delay: 0.2s; }

.rewrite-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 6px;
}

.rewrite-content {
    font-size: 0.85rem;
    color: var(--text-200);
    line-height: 1.7;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.15);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
}

.copy-btn:hover {
    background: rgba(139, 92, 246, 0.22);
    transform: scale(1.05);
}

/* Result Actions */
.result-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 12px;
    position: relative;
}

.result-actions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30%;
    right: 30%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.result-actions .btn {
    padding: 12px 28px;
    font-size: 0.85rem;
}

/* ---------- Features ---------- */
.section--features {
    background: var(--bg-base);
    position: relative;
}

.section--features::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 25% at 50% 0%, rgba(139, 92, 246, 0.03), transparent);
    pointer-events: none;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    max-width: 820px;
    margin: 0 auto;
}

.feature {
    padding: 32px 30px;
    border-radius: var(--radius-xl);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Hero feature — first one spans full width */
.feature:first-child {
    grid-column: 1 / -1;
    padding: 36px 34px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: center;
    background: rgba(139, 92, 246, 0.03);
    border-color: rgba(139, 92, 246, 0.08);
}

.feature:first-child .feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    margin-bottom: 0;
}

.feature:first-child::before {
    opacity: 0.5;
}

.feature:first-child h3 {
    font-size: 1.15rem;
}

.feature:first-child p {
    font-size: 0.9rem;
}

/* Top accent line */
.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature:hover::before,
.feature:first-child::before {
    opacity: 1;
}

/* Radial glow overlay */
.feature::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    background: radial-gradient(ellipse 120% 80% at 30% 20%, rgba(139, 92, 246, 0.03), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.feature:hover::after {
    opacity: 1;
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(139, 92, 246, 0.06);
    border-color: rgba(139, 92, 246, 0.08);
}

.feature-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--accent-dim);
    color: var(--accent);
    margin-bottom: 18px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    flex-shrink: 0;
}

.feature-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 17px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.feature:hover .feature-icon {
    transform: scale(1.12) rotate(-5deg);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.25);
    border-radius: 16px;
}

.feature:hover .feature-icon::after {
    opacity: 0.3;
}

.feature-icon--cyan { background: var(--cyan-dim); color: #06b6d4; }
.feature-icon--emerald { background: var(--emerald-dim); color: #10b981; }
.feature-icon--amber { background: var(--amber-dim); color: #f59e0b; }
.feature-icon--rose { background: var(--rose-dim); color: #f43f5e; }

.feature:hover .feature-icon--cyan { box-shadow: 0 8px 25px rgba(6, 182, 212, 0.25); }
.feature:hover .feature-icon--emerald { box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25); }
.feature:hover .feature-icon--amber { box-shadow: 0 8px 25px rgba(245, 158, 11, 0.25); }
.feature:hover .feature-icon--rose { box-shadow: 0 8px 25px rgba(244, 63, 94, 0.25); }

.feature h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
    position: relative;
}

.feature p {
    font-size: 0.85rem;
    color: var(--text-300);
    line-height: 1.7;
    position: relative;
}



/* ---------- Editor Section ---------- */
.section--editor {
    background: var(--bg-raised);
    border-top: 1px solid var(--border);
}

.container--wide {
    max-width: 1300px;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    margin-bottom: 20px;
    gap: 12px;
}

.editor-toolbar-left,
.editor-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.editor-toolbar-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-200);
    display: flex;
    align-items: center;
    gap: 6px;
}

.editor-split {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}

.editor-pane {
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.editor-pane-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.editor-pane-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-200);
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-instructions {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.72rem;
    color: var(--text-300);
}

.instruction-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.65rem;
}

.instruction-step strong {
    color: var(--text-100);
}

.editor-highlight-match-demo {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-radius: 2px;
    padding: 0 2px;
}

.editor-score-pane {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.compact-score {
    padding: 24px;
    border-radius: var(--radius-xl);
}

.compact-score-top {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.compact-score-visual {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto;
}

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

.compact-score-meta {
    text-align: center;
}

.compact-verdict {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.compact-score-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.compact-bar-row {
    display: grid;
    grid-template-columns: 70px 1fr 32px;
    align-items: center;
    gap: 8px;
}

.compact-bar-row span:first-child {
    font-size: 0.68rem;
    color: var(--text-400);
    font-weight: 500;
}

.compact-bar-row .score-bar-track {
    height: 5px;
}

.compact-bar-row span:last-child {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-300);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.compact-keywords {
    padding: 16px 18px;
    border-radius: var(--radius-lg);
}

.compact-keywords-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--red);
    margin-bottom: 10px;
}

.compact-keywords-head--green {
    color: var(--green);
}

.compact-count {
    margin-left: auto;
    font-size: 0.72rem;
    padding: 2px 10px;
    border-radius: 100px;
    background: var(--red-dim);
    color: var(--red);
    font-weight: 700;
}

.compact-count--green {
    background: var(--green-dim);
    color: var(--green);
}

/* ---------- Keyword Modal ---------- */
.keyword-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.keyword-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.keyword-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.keyword-modal-card {
    position: relative;
    max-width: 500px;
    width: 100%;
    padding: 32px;
    border-radius: var(--radius-xl);
    background: var(--bg-raised);
    border: 1px solid var(--border);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.keyword-modal.active .keyword-modal-card {
    transform: scale(1) translateY(0);
}

.keyword-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.keyword-modal-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.keyword-modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-100);
    margin-top: 4px;
}

.keyword-modal-desc {
    font-size: 0.85rem;
    color: var(--text-300);
    margin-bottom: 20px;
}

.keyword-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.keyword-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.keyword-option:hover {
    background: var(--bg-surface-hover);
    border-color: var(--accent);
    transform: translateX(4px);
}

.keyword-option.selected {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.keyword-option-text {
    flex: 1;
    font-size: 0.82rem;
    color: var(--text-200);
    line-height: 1.6;
}

.keyword-insert-btn {
    flex-shrink: 0;
    padding: 6px 14px !important;
    font-size: 0.72rem !important;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.78rem;
    border-radius: 8px;
}

.keyword-modal-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.keyword-modal-hint {
    font-size: 0.72rem;
    color: var(--text-400);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ---------- Editor Content inside split view ---------- */
.editor-content {
    padding: 20px;
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    font-size: 0.875rem;
    line-height: 1.8;
    color: var(--text-100);
    outline: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: var(--font);
}

.editor-content:focus {
    box-shadow: inset 0 0 0 1px var(--border-focus);
}

.editor-content div {
    min-height: 1.4em;
}

/* ---------- Result Editor CTA ---------- */
.result-editor-cta {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

/* ---- Responsive tweaks for editor ---- */
@media (max-width: 1024px) {
    .editor-split {
        grid-template-columns: 1fr;
    }
    .editor-score-pane {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .editor-score-pane {
        grid-template-columns: 1fr;
    }
    .editor-toolbar {
        flex-direction: column;
    }
}

/* ---------- Footer ---------- */
.footer {
    padding: 48px 0 32px;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.footer-tagline {
    font-size: 0.82rem;
    color: var(--text-400);
    margin-top: 8px;
}

.footer-nav {
    display: flex;
    gap: 28px;
}

.footer-nav a {
    font-size: 0.85rem;
    color: var(--text-300);
    font-weight: 500;
    transition: color var(--transition);
}

.footer-nav a:hover { color: var(--text-100); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.78rem;
    color: var(--text-400);
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    z-index: 99999;
    animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast--success { background: rgba(16, 185, 129, 0.9); border: 1px solid rgba(16, 185, 129, 0.5); }
.toast--error { background: rgba(244, 63, 94, 0.9); border: 1px solid rgba(244, 63, 94, 0.5); }
.toast--info { background: rgba(139, 92, 246, 0.9); border: 1px solid rgba(139, 92, 246, 0.5); }

.toast.out { animation: toastSlideOut 0.3s ease-in forwards; }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(40px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
    to { opacity: 0; transform: translateX(40px) scale(0.95); }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 4px;
}

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

/* ---------- Selection ---------- */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: white;
}

/* ---------- Editor Highlights ---------- */
.editor-highlight-match {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-radius: 3px;
    padding: 1px 0;
    transition: all 0.3s ease;
}

.editor-highlight-potential {
    background: rgba(250, 204, 21, 0.15);
    color: #fbbf24;
    border-radius: 3px;
    padding: 1px 0;
    transition: all var(--transition);
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { background: rgba(250, 204, 21, 0.1); }
    50% { background: rgba(250, 204, 21, 0.2); }
}

/* ---------- Timeline Tags ---------- */
.tag--promotion {
    background: var(--purple-dim);
    color: var(--purple);
    border: 1px solid rgba(139, 92, 246, 0.12);
}

.tag--promotion:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.tag--gap {
    background: var(--amber-dim);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.12);
}

.tag--gap:hover {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

/* ---------- Section Breakdown ---------- */
.section-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.section-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    transition: all var(--transition);
}

.section-badge:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.section-badge-name {
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

.section-badge-preview {
    color: var(--text-400);
    font-weight: 400;
    font-size: 0.75rem;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- Responsive (extended) ---------- */
@media (max-width: 768px) {
    .section-breakdown {
        flex-direction: column;
    }
    .section-badge-preview {
        max-width: 100%;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .scanner-grid, .result-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; max-width: 100%; }
    .feature:first-child {
        grid-column: 1;
        grid-template-columns: 1fr;
        text-align: center;
        gap: 16px;
    }
    .feature:first-child .feature-icon { margin: 0 auto; }
}



/* ==========================================================================
   RESUMERADAR v6 OVERHAUL — ADDITIONAL STYLES
   ========================================================================== */

/* ---------- Inline Input Validation Messages ---------- */
.validation-msg {
    margin: 12px 20px 0;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
    animation: fadeInSlide 0.3s ease forwards;
    font-weight: 500;
}

.validation-msg--error {
    background: rgba(244, 63, 94, 0.08);
    border: 1px solid rgba(244, 63, 94, 0.2);
    color: #fb7185;
}

.validation-msg--ok {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Radar Card (Full-Width) ---------- */
.radar-card {
    margin-top: 24px;
    padding: 32px;
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.radar-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), transparent 40%, transparent 60%, rgba(6, 182, 212, 0.12));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    pointer-events: none;
}

.radar-card-inner {
    display: flex;
    align-items: center;
    gap: 40px;
}

.radar-card-info {
    flex: 0 0 220px;
}

.radar-card-label {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-100);
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.radar-card-desc {
    font-size: 0.82rem;
    color: var(--text-400);
    line-height: 1.7;
}

.radar-chart {
    flex: 1;
    max-width: 400px;
    aspect-ratio: 1;
    margin: 0 auto;
}

.radar-svg {
    width: 100%;
    height: 100%;
}

.radar-svg text {
    font-weight: 500;
    pointer-events: none;
}

/* Radar polygon animation */
.radar-polygon {
    animation: radarDraw 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    transform-origin: center;
}

@keyframes radarDraw {
    from { opacity: 0; transform: scale(0.3); }
    to { opacity: 1; transform: scale(1); }
}

/* Radar interactive dots */
.radar-dot {
    transition: r 0.25s ease, filter 0.25s ease;
    cursor: pointer;
}

.radar-dot-hover {
    cursor: pointer;
}

.radar-dot-hover:hover + .radar-dot,
.radar-dot:hover {
    r: 7;
}

/* ---------- Intelligence Summary ---------- */
.intelligence-summary {
    margin-top: 24px;
    padding: 24px 28px;
    border-radius: var(--radius-lg);
}

.intel-summary-text p {
    margin-bottom: 12px;
    color: var(--text-200);
    font-size: 0.92rem;
    line-height: 1.7;
}

.intel-summary-text p:last-child { margin-bottom: 0; }

.intel-summary-text strong {
    color: var(--text-100);
}

.intel-callout {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-top: 12px;
    border: 1px solid transparent;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.intel-callout--warning {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.15);
    color: #fde68a;
}

.intel-callout--success {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.15);
    color: #a7f3d0;
}

.intel-callout strong {
    color: inherit;
}

/* ---------- Analysis Grid (Dim Breakdown + Health) ---------- */
.analysis-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

/* ---------- 7-Dimension Breakdown ---------- */
.dim-breakdown {
    padding: 28px;
    border-radius: var(--radius-lg);
    margin-top: 0;
}

.dim-breakdown-header {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-100);
    letter-spacing: -0.01em;
}

.dim-breakdown-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dim-row {
    display: grid;
    grid-template-columns: 28px 140px 1fr 44px 64px;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    transition: background 0.2s ease;
    padding: 4px 6px;
    border-radius: 6px;
}

.dim-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.dim-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.08);
    color: var(--accent);
    flex-shrink: 0;
}

.dim-icon svg {
    width: 14px;
    height: 14px;
}

.dim-label {
    color: var(--text-200);
    font-weight: 500;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dim-bar-inline {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 3px;
}

.dim-bar-wrap {
    width: 100%;
}

.dim-bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.dim-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.dim-bar-fill--high { background: linear-gradient(90deg, #10b981, #34d399); }
.dim-bar-fill--mid { background: linear-gradient(90deg, #ca8a04, #eab308); }
.dim-bar-fill--low { background: linear-gradient(90deg, #e11d48, #f43f5e); }

.dim-score {
    font-weight: 700;
    color: var(--text-100);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.dim-badge {
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.02em;
}

.dim-badge--high { background: rgba(16, 185, 129, 0.12); color: #34d399; }
.dim-badge--mid { background: rgba(234, 179, 8, 0.12); color: #facc15; }
.dim-badge--low { background: rgba(244, 63, 94, 0.12); color: #fb7185; }

/* ---------- Resume Health Panel ---------- */
.resume-health {
    padding: 28px;
    border-radius: var(--radius-lg);
    margin-top: 0;
}

.resume-health-header {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-100);
    letter-spacing: -0.01em;
}

.resume-health-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.health-score-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 14px;
    margin-bottom: 8px;
}

.health-score {
    font-size: 1.3rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.health-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.015);
    transition: background var(--transition);
}

.health-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.health-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-top: 1px;
    flex-shrink: 0;
}

.health-item--pass .health-icon {
    color: var(--green);
    background: rgba(16, 185, 129, 0.12);
}

.health-item--fail .health-icon {
    color: var(--red);
    background: rgba(244, 63, 94, 0.12);
}

.health-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.health-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-100);
}

.health-tip {
    font-size: 0.78rem;
    color: var(--text-400);
    line-height: 1.5;
}

/* ---------- Suggestion Items (Styled Ordered List) ---------- */
.suggestion-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    counter-reset: suggestion;
}

.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.015);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.25s ease;
    animation: cardReveal 0.4s ease both;
}

.suggestion-item:hover {
    background: rgba(59, 130, 246, 0.04);
    border-color: rgba(59, 130, 246, 0.12);
    transform: translateX(4px);
}

.suggestion-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.suggestion-text {
    color: var(--text-200);
    font-size: 0.88rem;
    line-height: 1.65;
}

.suggestion-text strong {
    color: var(--text-100);
}

/* ---------- Rewrite Cards (Redesigned) ---------- */
.rewrite-blocks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rewrite-empty {
    color: var(--text-400);
    font-size: 0.85rem;
    padding: 16px 0;
}

.rewrite-card {
    padding: 16px;
    background: rgba(139, 92, 246, 0.03);
    border: 1px solid rgba(139, 92, 246, 0.08);
    border-radius: var(--radius);
    transition: all 0.25s ease;
    animation: cardReveal 0.4s ease both;
}

.rewrite-card:hover {
    background: rgba(139, 92, 246, 0.06);
    border-color: rgba(139, 92, 246, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.rewrite-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.rewrite-keyword-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 99px;
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    text-transform: capitalize;
}

.rewrite-cat-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 99px;
    background: rgba(6, 182, 212, 0.1);
    color: #67e8f9;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rewrite-copy-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-300);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font);
}

.rewrite-copy-btn:hover {
    color: var(--text-100);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.rewrite-copy-btn--done {
    color: var(--green) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
    background: rgba(16, 185, 129, 0.08) !important;
}

.rewrite-text {
    font-size: 0.88rem;
    color: var(--text-200);
    line-height: 1.7;
    margin: 0;
    padding-left: 2px;
}

/* ---------- Tag Priority & Category Badges ---------- */
.tag-priority {
    margin-left: 6px;
    font-size: 0.62rem;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.tag-priority--high {
    background: rgba(244, 63, 94, 0.2);
    color: #fb7185;
}

.tag-priority--med {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
}

.tag--tech { border-color: rgba(139, 92, 246, 0.15); }
.tag--soft { border-color: rgba(6, 182, 212, 0.15); }
.tag--domain { border-color: rgba(245, 158, 11, 0.15); }

/* ---------- Re-Analyze Button ---------- */
.btn--pulse {
    animation: buttonPulse 2s infinite !important;
}

@keyframes buttonPulse {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

/* ---------- Result Editor CTA ---------- */
.result-editor-cta {
    text-align: center;
    margin: 28px 0;
}

/* ---------- Result Actions ---------- */
.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

/* ---------- Timeline Badges ---------- */
.timeline-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.tag--promotion {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.tag--gap {
    background: rgba(245, 158, 11, 0.1);
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

/* ---------- Section Badges ---------- */
.section-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.section-badge {
    padding: 12px 16px;
    border-radius: var(--radius);
    flex: 1;
    min-width: 180px;
}

.section-badge-name {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-100);
    text-transform: capitalize;
    margin-bottom: 4px;
}

.section-badge-preview {
    display: block;
    font-size: 0.72rem;
    color: var(--text-400);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Responsive Overhaul ---------- */
@media (max-width: 1024px) {
    .radar-card-inner {
        flex-direction: column;
        text-align: center;
    }
    .radar-card-info { flex: none; }
    .analysis-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .result-score-card { flex-wrap: wrap; }
    .dim-row {
        grid-template-columns: 28px 1fr 48px 60px;
        gap: 8px 10px;
    }
    .dim-bar-wrap {
        grid-column: 2 / -1;
        order: 10;
    }
}

@media (max-width: 768px) {
    .section { padding: 80px 0; }
    .nav-links, .btn-nav { display: none; }
    .hero-title { font-size: 2.2rem; }
    .hero-cta { flex-direction: column; width: 100%; }
    .hero-cta .btn { width: 100%; }
    .hero-metrics { flex-direction: column; gap: 16px; }
    .metric-divider { width: 32px; height: 1px; }
    .steps-row { flex-direction: column; align-items: center; perspective: none; }
    .step { max-width: 380px; width: 100%; }
    .step-arrow { transform: rotate(90deg); padding-top: 0; }
    .step-arrow svg { width: 24px; height: 12px; }
    .result-score-card { flex-direction: column; text-align: center; padding: 32px 24px; gap: 28px; }
    .score-bar-row { grid-template-columns: 90px 1fr 36px; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
    .result-actions { flex-direction: column; }
    .hero-rings { display: none; }
    .editor-split { grid-template-columns: 1fr; }
    .editor-score-pane { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .compact-keywords .tag-cloud { max-height: 100px; overflow-y: auto; }
    .result-grid { grid-template-columns: 1fr; }
    .dim-row {
        grid-template-columns: 28px 1fr 48px;
    }
    .dim-badge { display: none; }
    .analysis-grid { grid-template-columns: 1fr; }
    .radar-card { padding: 20px; }
}

@media (max-width: 480px) {
    .editor-score-pane { grid-template-columns: 1fr; }
    .compact-score-top { flex-direction: column; align-items: center; text-align: center; }
    .editor-toolbar { flex-direction: column; align-items: flex-start; }
    .editor-toolbar-right { width: 100%; }
    .editor-toolbar-right .btn { width: 100%; }
    .keyword-modal-card { margin: 16px; max-height: 80vh; }
    .keyword-options { max-height: 300px; overflow-y: auto; }
    .suggestion-item { flex-direction: column; gap: 8px; }
    .rewrite-card-top { flex-wrap: wrap; }
}

/* ---------- Print ---------- */
@media print {
    #bgCanvas, .floating-orbs, .ambient-glow, .grain-overlay, .hero-rings,
    .orb, .btn-3d, .btn-glow, .navbar, .footer, #live-editor,
    .keyword-modal, .result-editor-cta, .result-actions {
        display: none !important;
    }
    body { background: white; color: black; }
    .glass-card { background: #f8f8f8; border: 1px solid #ddd; backdrop-filter: none; }
    .result-score-card, .result-card { break-inside: avoid; }
    .score-num { color: #333 !important; text-shadow: none; }
    .tag { background: #eee; color: #333; }
}

