/* static/css/style.css */
/* Tech Precision Dark Theme */

/* Core Variables */
:root {
    --font-primary: 'Roboto Mono', monospace;
    --font-secondary: 'Inter', sans-serif;

    /* Tech-inspired dark palette */
    --color-bg-primary: #0a0e17;       /* Very Dark Blue/Black */
    --color-bg-secondary: #121826;    /* Slightly Lighter Dark Blue */
    --color-bg-tertiary: #1a212e;     /* Even Lighter Dark Blue */

    --color-text-primary: #e2e8f0;     /* Light Gray (Near White) */
    --color-text-secondary: #94a3b8;   /* Medium Gray */
    --color-text-muted: #64748b;       /* Darker Gray */

    --color-accent-primary: #3b82f6;   /* Bright Blue */
    --color-accent-secondary: #10b981; /* Emerald Green */
    --color-accent-tertiary: #f59e0b;  /* Amber/Gold */
    --color-accent-danger: #ef4444;    /* Red */

    --color-border: rgba(148, 163, 184, 0.2); /* Semi-transparent gray border */
    --color-grid: rgba(148, 163, 184, 0.05); /* Very subtle grid lines */

    --gradient-accent: linear-gradient(135deg, #3b82f6, #10b981); /* Blue to Green */
    --shadow-glow: 0 0 15px rgba(59, 130, 246, 0.4); /* Blue glow */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text-secondary);
    background-color: var(--color-bg-primary);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.08) 0%, transparent 25%);
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tech Background Grid Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(to right, var(--color-grid) 1px, transparent 1px),
        linear-gradient(to bottom, var(--color-grid) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
    opacity: 0; /* Set to 0 as we'll use canvas instead */
}

/* Interactive Background Canvas */
#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* Behind all content, but ahead of the body background */
    pointer-events: none; /* Allow clicking through the canvas */
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary); /* Monospace for headings */
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-primary);
    margin-bottom: 0.5em;
}

h1.hero-headline {
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
    text-transform: uppercase;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: 5px; /* Add padding for better background visibility */
}

h2.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    position: relative;
    display: inline-block; /* Needed for pseudo-element positioning */
    margin-bottom: 1em; /* More space below title */
}

h2.section-title::after { /* Accent underline */
    content: '';
    position: absolute;
    bottom: -8px; /* Position below text */
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 3px;
}

.text-center h2.section-title::after { /* Center underline when text is centered */
    left: 50%;
    transform: translateX(-50%);
}

p {
    margin-bottom: 1.25em;
}

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

a:hover {
    color: #60a5fa; /* Lighter blue */
}

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

.text-glow {
    text-shadow: var(--shadow-glow);
}

.mono { /* Helper class for monospace */
    font-family: var(--font-primary);
}

.code-snippet { /* Styling for inline code examples */
    display: inline-block;
    background: var(--color-bg-secondary);
    border-radius: 4px;
    padding: 3px 6px;
    font-family: var(--font-primary);
    font-size: 0.9em;
    color: var(--color-accent-secondary); /* Green text */
    border: 1px solid var(--color-border);
}

/* Buttons */
.button {
    --x-position: 0%;
    display: inline-flex; /* Restore to inline-flex */
    align-items: center;
    justify-content: center; /* Restore center alignment */
    gap: 8px; /* Restore original gap */
    padding: 12px 28px; /* Restore original padding */
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px; /* Restore original radius */
    color: white; /* Explicitly set to white for better contrast */
    text-decoration: none;
    position: relative;
    border: none;
    cursor: pointer;
    outline: none;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
}

.button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.button:hover::before {
    opacity: 0.9;
}

.button span, .button svg { /* Ensure content is above pseudo-element */
    position: relative;
    z-index: 2;
    color: white; /* Ensure text is white */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); /* Add subtle shadow for better readability */
}

.button:hover {
    transform: translateY(-2px);
}

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

.btn-primary {
    background-color: var(--color-accent-primary); /* Solid background for text readability */
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25); /* Restore shadow */
}

.btn-primary::before {
    background: linear-gradient(90deg, 
        var(--color-accent-primary) 0%, 
        var(--color-accent-secondary) 50%, 
        var(--color-accent-primary) 100%);
    background-size: 200% 100%;
    background-position: calc(100% - var(--x-position)) 0%; /* Reverse direction to follow mouse */
    transition: none; /* Remove default transition to make movement feel direct */
    opacity: 0.8; /* Slightly reduce opacity to improve text contrast */
}

.btn-primary:hover::before {
    opacity: 1; /* Make sure gradient is fully visible on hover */
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
}

.btn-secondary::before {
    background: none;
}

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

.btn-secondary span, .btn-secondary svg {
    color: var(--color-text-primary); /* Override the white color for secondary buttons */
    text-shadow: none; /* Remove text shadow for secondary buttons */
}

.btn-secondary:hover span, .btn-secondary:hover svg {
    color: var(--color-accent-primary); /* Change text color on hover */
}

/* Interactive button effect class - to be added by JS */
.btn-interactive {
    background-size: 200% 100%;
    background-position: 0% 0%;
}

/* This transition will be turned on/off by JS */
.btn-transition {
    transition: background-position 0.5s ease;
}

/* Header */
.site-header {
    background-color: rgba(10, 14, 23, 0.8); /* Dark transparent background */
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px); /* Frosted glass */
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text-primary);
    text-decoration: none;
}

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

/* Blinking cursor effect for logo */
.logo span {
    position: relative;
}
.logo span::after {
    content: '_';
    animation: blink 1s infinite;
    margin-left: 1px; /* Space it slightly */
    color: var(--color-accent-primary); /* Make cursor blue */
}

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

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 35px;
}

.main-nav a {
    color: var(--color-text-secondary);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 4px;
}

/* Bracket hover effect */
.main-nav a::before {
    content: '[ ';
    opacity: 0;
    transition: opacity 0.2s ease;
    color: var(--color-accent-primary); /* Color the brackets */
}
.main-nav a::after {
    content: ' ]';
    opacity: 0;
    transition: opacity 0.2s ease;
    color: var(--color-accent-primary);
}
.main-nav a:hover {
    color: var(--color-accent-primary);
}
.main-nav a:hover::before,
.main-nav a:hover::after {
    opacity: 1;
}

.header-cta {
    margin-left: 30px;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    position: relative; /* For potential animation */
    margin-left: 15px;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text-primary);
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}
/* Styles for active state (add 'active' class via JS) */
.mobile-nav-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.mobile-nav-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hero Section */
.hero {
    padding: 140px 0 120px;
    position: relative;
    overflow: hidden;
}

/* Blurred Background Shapes */
.hero::before {
    content: '';
    position: absolute;
    top: -150px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%); /* Increased opacity */
    filter: blur(80px); /* Increased blur */
    z-index: -1;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%); /* Subtle green blur */
    filter: blur(80px);
    z-index: -1;
}

.hero-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: center;
    gap: 60px;
}

.hero-subheadline {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    max-width: 550px;
    margin-bottom: 2.5em;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 30px;
    margin: 40px 0;
}
.stat-item {
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--color-border);
    padding-left: 15px;
}
.stat-value {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 5px;
    line-height: 1;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-visual {
    position: relative; /* For potential pseudo-elements */
}

/* Terminal Window Visual */
.terminal-window {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
    font-family: var(--font-primary);
    line-height: 1.5;
    color: var(--color-text-primary);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4); /* Stronger shadow */
    position: relative;
    overflow: hidden;
}
.terminal-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}
.terminal-buttons { display: flex; gap: 8px; margin-right: 15px; }
.terminal-button { width: 12px; height: 12px; border-radius: 50%; }
.button-red { background-color: #ef4444; }
.button-yellow { background-color: #f59e0b; }
.button-green { background-color: #10b981; }
.terminal-title { font-size: 0.8rem; color: var(--color-text-muted); }
.terminal-content { height: 300px; overflow: hidden; position: relative; }
.terminal-line { display: flex; margin-bottom: 8px; font-size: 0.9rem; }
.terminal-prompt { color: var(--color-accent-secondary); margin-right: 10px; flex-shrink: 0; }

/* Typewriter effect */
.typewriter {
    overflow: hidden;
    border-right: 0.15em solid var(--color-accent-primary);
    white-space: nowrap;
    animation:
        typing 3.5s steps(40, end) forwards, /* Added forwards */
        blink-caret 0.75s step-end infinite;
    margin: 0;
    display: inline-block; /* Ensure it respects width */
    max-width: 100%;
}
@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: var(--color-accent-primary) } }

/* Section Base Styles */
section {
    padding: 100px 0; /* Consistent padding */
    border-bottom: 1px solid var(--color-border);
    position: relative; /* For potential pseudo-elements */
}
section:last-of-type { border-bottom: none; }
section:nth-child(even) { background-color: var(--color-bg-secondary); } /* Alternating BG */
.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3.5em;
}

/* How It Works Section */
.section-how {
    background-color: var(--color-bg-secondary);
    overflow: hidden; /* Contain hover effects */
}
.how-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 3em;
}
.how-step-card {
    background-color: var(--color-bg-tertiary);
    padding: 35px 30px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    z-index: 1;
    overflow: hidden; /* Contain pseudo-element */
    text-align: center;
}
/* Gradient top border on hover */
.how-step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px; /* Thinner border */
    background: var(--gradient-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease-out; /* Smoother transition */
    z-index: 1;
}
.how-step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25); /* Slightly stronger shadow */
    border-color: var(--color-accent-primary); /* Match accent */
}
.how-step-card:hover::before {
    transform: scaleX(1);
}
.step-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 8px; /* Match card radius */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5em;
    background: var(--color-bg-primary);
    color: inherit; /* Takes color from step-N class */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border);
}
.step-icon-wrapper svg { width: 28px; height: 28px; }
/* Step colors */
.step-1 { color: var(--color-accent-primary); }
.step-2 { color: var(--color-accent-tertiary); }
.step-3 { color: var(--color-accent-secondary); }
.how-step-card h3 {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5em;
    color: var(--color-text-primary);
}
.how-step-card p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 1em; /* Space before code snippet */
}
.how-step-card p:last-child { margin-bottom: 0; } /* Remove margin from last p */
.step-number { /* Subtle background number */
    position: absolute;
    top: 10px;
    right: 15px;
    font-family: var(--font-primary);
    font-size: 3.5rem; /* Larger */
    font-weight: 800;
    color: rgba(255, 255, 255, 0.02); /* Very subtle */
    line-height: 1;
    z-index: -1; /* Behind content */
}

/* Why Section */
.section-why {
     background-color: var(--color-bg-primary);
}
.why-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: center;
    gap: 60px;
}
.why-text h2 {
    margin-bottom: 0.75em;
}
.why-list {
    list-style: none;
    margin-top: 1.5em;
}
.why-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1em;
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: 12px 15px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.why-list li:hover {
    transform: translateX(5px);
    border-color: var(--color-accent-danger);
    background-color: rgba(239, 68, 68, 0.05); /* Subtle red background on hover */
}
.why-list span { /* 'X' icon */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    color: var(--color-accent-danger);
    font-weight: bold;
    flex-shrink: 0;
    font-size: 0.9em; /* Slightly smaller X */
}
.why-visual img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
}

/* Features Section */
.section-features {
    background-color: var(--color-bg-secondary);
}
.features-grid {
    display: grid;
    /* Change minmax to encourage 3 columns more often */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px; /* Keep or adjust gap as needed */
    margin-top: 3em;
}
.feature-card {
    padding: 25px;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.feature-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1); /* Transparent Blue */
    color: var(--color-accent-primary);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.4em;
    color: var(--color-text-primary);
}
.feature-text p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Final CTA Section */
.section-cta {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
    background-color: var(--color-bg-primary); /* Fallback if image fails */
}
/* Background Image/Gradient Overlay */
.section-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Example using a gradient overlay */
    background: linear-gradient(rgba(10, 14, 23, 0.85), rgba(10, 14, 23, 0.95));
    /* Optionally add a background image */
    /* background-image: url('path/to/your/tech-bg.jpg'); */
    /* background-size: cover; */
    /* background-position: center; */
    z-index: -1;
}
.cta-subtitle {
    color: var(--color-text-secondary);
    margin-bottom: 2.5em;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.cta-visual { /* Container for the stat card */
    max-width: 350px; /* Smaller max width */
    margin: 0 auto 40px;
    position: relative;
}
.stat-card { /* Stat card styling */
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px; /* Increased padding */
    display: flex;
    align-items: center; /* Center items vertically */
    gap: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.stat-chart { /* Doughnut chart simulation */
    width: 60px; /* Larger chart */
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(
        var(--color-accent-primary) 0% 75%, /* Blue part */
        var(--color-bg-tertiary) 75% 100%  /* Background part */
    );
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-chart::after { /* Inner circle to make it a doughnut */
    content: '';
    position: absolute;
    width: 65%; /* Adjust inner hole size */
    height: 65%;
    border-radius: 50%;
    background: var(--color-bg-secondary); /* Match card background */
}
.stat-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}
.stat-title {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}
.stat-value {
    font-family: var(--font-primary);
    font-size: 1.4rem; /* Slightly larger value */
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.2;
}

/* Footer */
.site-footer {
    background-color: var(--color-bg-secondary);
    color: var(--color-text-muted);
    padding: 60px 0 30px;
    border-top: 1px solid var(--color-border);
}
.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* About | Links | Legal */
    gap: 50px;
    margin-bottom: 40px;
}
.footer-about { max-width: 400px; }
.footer-logo { color: var(--color-text-primary); margin-bottom: 1em; }
.footer-logo svg { color: var(--color-accent-primary); }
.footer-about p { font-size: 0.9rem; margin-bottom: 20px; color: var(--color-text-secondary); }
.social-links { display: flex; gap: 15px; }
.social-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 6px;
    background: var(--color-bg-tertiary); color: var(--color-text-secondary);
    border: 1px solid var(--color-border); transition: all 0.2s ease;
}
.social-icon:hover {
    background: var(--color-bg-primary); color: var(--color-accent-primary);
    border-color: var(--color-accent-primary); transform: translateY(-3px);
}
.social-icon svg { width: 18px; height: 18px; }
.footer-links h4, .footer-legal h4 {
    font-family: var(--font-primary); font-size: 1rem; font-weight: 600;
    color: var(--color-text-primary); margin-bottom: 1.5em;
    text-transform: uppercase; letter-spacing: 1px;
}
.footer-links ul, .footer-legal ul { list-style: none; }
.footer-links li, .footer-legal li { margin-bottom: 0.7em; }
.footer-links a, .footer-legal a {
    color: var(--color-text-muted); transition: color 0.2s ease;
    position: relative; padding-left: 15px;
}
/* Footer link hover effect */
.footer-links a::before, .footer-legal a::before {
    content: '>'; position: absolute; left: 0;
    color: var(--color-accent-primary); opacity: 0;
    transform: translateX(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.footer-links a:hover, .footer-legal a:hover {
    color: var(--color-text-primary); padding-left: 20px; /* Push text right */
}
.footer-links a:hover::before, .footer-legal a:hover::before {
    opacity: 1; transform: translateX(0);
}
.copyright {
    text-align: center; padding-top: 30px;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem; color: var(--color-text-muted);
}
.copyright p { margin-bottom: 0; }

/* --- Animation Classes --- */
/* Define fade-in and slide-up animations */
.fade-in { animation: fadeIn 0.8s ease-out forwards; }
.slide-up { animation: slideUp 0.8s ease-out forwards; }

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

/* Apply initial state for elements to be animated */
/* (Can be done here or in JS before observing) */
.section-title, .hero-text > *, .how-step-card, .feature-card, .why-list li, .why-visual img, .hero-stats .stat-item, .terminal-window, .section-cta > .container > *:not(.cta-visual) {
   /* opacity: 0; */ /* Let JS handle this if preferred */
}


/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .features-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .footer-container {
        grid-template-columns: 1fr 1fr; gap: 40px;
    }
    .footer-about { grid-column: 1 / -1; text-align: center; margin: 0 auto 20px; }
    .footer-about .logo { justify-content: center; }
    .social-links { justify-content: center; }
}

@media (max-width: 768px) {
    body { font-size: 15px; }
    .container { width: 92%; }

    .main-nav { display: none; } /* Hide desktop nav */
    .header-cta { display: none; } /* Hide desktop CTA */
    .mobile-nav-toggle { display: block; } /* Show hamburger */

     /* Basic Active Mobile Nav Style (Needs JS to toggle 'active' class on main-nav) */
    .main-nav.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        width: 100%;
        background-color: var(--color-bg-secondary); /* Dark background */
        padding: 15px 0;
        border-top: 1px solid var(--color-border);
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }
    .main-nav.active ul {
        flex-direction: column;
        gap: 0;
        align-items: center;
    }
     .main-nav.active li { width: 100%; }
    .main-nav.active a {
        display: block;
        padding: 12px 20px;
        text-align: center;
        border-bottom: 1px solid var(--color-border);
    }
    .main-nav.active li:last-child a { border-bottom: none; }
    .main-nav.active a:hover::before, .main-nav.active a:hover::after { opacity: 0; } /* Hide brackets on mobile */


    .hero {
        padding-top: 60px; /* Reduced padding at top from 100px */
        padding-bottom: 80px; /* Slightly reduced padding at bottom if needed */
    }

    .hero-container, .why-container {
        grid-template-columns: 1fr; 
        text-align: center; 
        gap: 30px; /* Reduced gap between elements */
        margin: 0 auto;
    }
    
    .hero-text { 
        order: 2; 
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 20px; /* Add margin between terminal and text */
    }
    
    .hero-visual { 
        order: 1;
        display: flex;
        justify-content: center;
        max-width: 100%;
        overflow-x: hidden;
        margin-top: -15px; /* Move terminal window up slightly */
    }
    
    .hero-visual .terminal-window {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        height: auto; /* Allow height to adjust based on content */
    }
    
    .hero-visual .terminal-content {
        height: 380px; /* Further increased height on mobile */
        padding-bottom: 10px; /* Add padding at bottom to prevent text from touching edge */
    }
    
    .terminal-line {
        margin-bottom: 10px; /* Slightly increase line spacing on mobile */
        font-size: 0.85rem; /* Slightly smaller font for better fit */
    }

    .hero-subheadline { 
        margin-left: auto; 
        margin-right: auto; 
        max-width: 90%;
    }
    .hero-stats { 
        justify-content: center; 
        gap: 20px; 
    }
    .stat-value { font-size: 2rem; }

    .why-text { order: 2; }
    .why-visual { order: 1; }
    .why-list { display: inline-block; text-align: left; max-width: 100%; }
    .why-list li { justify-content: flex-start; text-align: left;} /* Align left in center block */

    h2.section-title::after { left: 50%; transform: translateX(-50%); } /* Center underline */

    .how-steps-grid, .features-grid { grid-template-columns: 1fr; }

    .feature-card {
        flex-direction: column; align-items: center; text-align: center;
    }
    .feature-icon { margin-bottom: 15px; }

    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .footer-links ul, .footer-legal ul { text-align: center; }
    .footer-links a::before, .footer-legal a::before { display: none; } /* Hide > on mobile */
    .footer-links a:hover, .footer-legal a:hover { padding-left: 0; }

    .terminal-line {
        margin-bottom: 10px; /* Slightly increase line spacing on mobile */
        font-size: 0.85rem; /* Slightly smaller font for better fit */
    }
}

/* --- Styles for Optimizer Tool Page --- */

.tool-header {
    /* Slightly different header for tool page if desired */
    background-color: rgba(17, 24, 39, 0.95); /* More opaque */
}

.tool-main {
    padding: 60px 0; /* Less padding than landing page sections */
}

.tool-title {
    color: var(--color-text-primary);
    margin-bottom: 0.5em;
}

/* Ensure subtitle centering */
.tool-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    margin-bottom: 2.5em;
    max-width: 600px;
    margin-left: auto;  /* Ensure centering */
    margin-right: auto; /* Ensure centering */
}

/* Flashes for Tool Page */
.flashes-container {
    max-width: 800px;
    margin: 0 auto 2em auto;
}
.flashes {
    list-style: none;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid;
}
.flashes li {
    font-weight: 500;
}
.flashes .error { /* Error message style */
    background-color: rgba(239, 68, 68, 0.1); /* Red transparent bg */
    border-color: rgba(239, 68, 68, 0.3);
    color: #FCA5A5; /* Light Red */
}
/* Add .success styles if using success messages */
.flashes .success {
     background-color: rgba(16, 185, 129, 0.1); /* Green transparent bg */
     border-color: rgba(16, 185, 129, 0.3);
     color: #6EE7B7; /* Light Green */
}

.optimizer-form {
    max-width: 1000px; /* Max width for the form */
    margin: 0 auto; /* Center the form container itself */
    /* REMOVE display: grid; from base style if it exists */
    /* REMOVE grid-template-columns/rows from base style if it exists */
    /* REMOVE gap from base style if it exists */
}

/* Form Grid Layout - Base (Mobile) */
.form-grid {
    display: grid;
    grid-template-columns: 1fr; /* Stack columns by default */
    gap: 30px; /* Gap between stacked columns */
    margin-bottom: 30px; /* Space before submit button on mobile */
     /* REMOVE grid-column/row assignments from base style if they exist */
}

.form-column {
    /* Styles for each column */
}

.column-title {
    font-size: 1.5rem;
    font-family: var(--font-secondary); /* Use Inter for these titles */
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 1.5em;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5em;
}

/* Upload Area Styling */
.upload-area, .upload-area-small {
    border: 2px dashed var(--color-border);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background-color: var(--color-bg-secondary);
    position: relative;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}
.upload-area { /* Larger resume area */
    min-height: 200px; /* Ensure minimum height */
    display: flex;
    align-items: center;
    justify-content: center;
}
.upload-area-small {
     padding: 20px; /* Smaller padding */
}

.upload-area:hover, .upload-area-small:hover {
    border-color: var(--color-accent-primary);
}
.upload-area.dragover, .upload-area-small.dragover {
    border-color: var(--color-accent-primary);
    background-color: var(--color-bg-tertiary);
    border-style: solid;
}

.file-input { /* Hide default file input */
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 10; /* Ensure it's clickable */
}

.upload-label, .upload-label-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.upload-label svg {
    width: 48px; height: 48px;
    margin-bottom: 15px;
    color: var(--color-accent-secondary); /* Greenish icon */
}
.upload-label-small svg {
     width: 24px; height: 24px;
     margin-bottom: 10px;
     color: var(--color-text-muted);
}

.upload-label span, .upload-label-small span {
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 5px;
}
.upload-label small, .upload-label-small small {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}
.filename-display {
    font-size: 0.85rem;
    color: var(--color-accent-primary); /* Blue filename */
    margin-top: 10px;
    font-weight: 500;
    word-break: break-all; /* Prevent long filenames breaking layout */
}

/* Job Description Textarea */
.jd-textarea {
    width: 100%;
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 15px;
    color: var(--color-text-primary);
    font-family: var(--font-secondary);
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical; /* Allow vertical resize */
    min-height: 150px; /* Minimum height */
    margin-bottom: 15px; /* Space before OR */
}
.jd-textarea:focus {
    outline: none;
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3); /* Focus ring */
}

.jd-separator {
    text-align: center;
    margin: 15px 0;
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 15px;
}
.jd-separator::before, .jd-separator::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background-color: var(--color-border);
}

/* Submit Area */
/* Submit Area - Base (Mobile) */
.submit-area {
    text-align: center; /* Center button by default */
    margin-top: 30px; /* Default margin */
    /* REMOVE grid-column/row assignments from base style if they exist */
}
.submit-button {
    padding: 14px 40px; /* Larger submit button */
    font-size: 1.1rem;
}
.submit-button svg {
    width: 20px;
    height: 20px;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(148, 163, 184, 0.3); /* Light border */
    border-top-color: var(--color-accent-primary); /* Blue spinner top */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tool Page Footer */
.tool-footer {
    margin-top: 60px; /* Space above footer on tool page */
    background-color: var(--color-bg-primary); /* Darker footer */
    padding: 20px 0;
}
.tool-footer .copyright {
     border-top: none; /* No border needed if simple */
     padding-top: 0;
}


/* Responsive Adjustments for Tool Page */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr; /* Stack columns on mobile */
        gap: 30px;
    }
    .column-title {
        text-align: center;
    }
}

/* --- Styles for Result Page --- */
.result-container { /* Wrap result content */
    max-width: 1000px; /* Increased from 800px to 1000px */
    margin: 40px auto;
    padding: 30px;
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}
.result-container h1 {
    font-size: 1.8rem;
    margin-bottom: 0.75em;
    color: var(--color-text-primary);
}
.result-container p {
     color: var(--color-text-secondary);
     margin-bottom: 1.5em;
}
.result-container .button {
    margin-top: 2em;
}
.markdown-body { /* Container for rendered markdown */
    background-color: var(--color-bg-primary); /* Slightly darker BG for code feel */
    border: 1px solid var(--color-border);
    padding: 30px; /* Increased padding from 20px to 30px */
    border-radius: 6px;
    font-family: var(--font-secondary); /* Use standard font */
    color: var(--color-text-secondary); /* Default text */
    line-height: 1.7;
    margin-top: 20px;
    width: 100%; /* Ensure it uses the full width of its container */
    box-sizing: border-box; /* Include padding in width calculation */
}
/* Basic Markdown element styling for dark theme */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    font-family: var(--font-primary); /* Monospace headings */
    color: var(--color-text-primary);
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--color-border);
}
.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child,
.markdown-body h4:first-child {
    margin-top: 0; /* Remove top margin from first heading */
}
.markdown-body h1 { font-size: 1.8em; }
.markdown-body h2 { font-size: 1.5em; }
.markdown-body h3 { font-size: 1.25em; }
.markdown-body h4 { font-size: 1.1em; }

.markdown-body p {
    margin-bottom: 1em;
    color: var(--color-text-secondary);
}
.markdown-body strong {
    font-weight: 600; /* Slightly less bold */
    color: var(--color-text-primary); /* Brighter bold text */
}
.markdown-body em {
    font-style: italic;
    color: var(--color-text-secondary); /* Keep italics subtle */
}
.markdown-body ul,
.markdown-body ol {
    margin-left: 1.5em; /* Indent lists */
    margin-bottom: 1em;
    padding-left: 1em;
}
.markdown-body li {
    margin-bottom: 0.5em;
}
.markdown-body code { /* Inline code */
    background-color: var(--color-bg-tertiary);
    border-radius: 4px;
    padding: 0.2em 0.5em;
    font-family: var(--font-primary);
    font-size: 0.9em;
    color: var(--color-accent-secondary); /* Green code */
    border: 1px solid var(--color-border);
}
.markdown-body pre { /* Code blocks */
    background-color: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 15px;
    overflow-x: auto; /* Allow horizontal scrolling */
    margin-bottom: 1em;
}
.markdown-body pre code {
   background-color: transparent;
   padding: 0;
   border: none;
   color: var(--color-text-secondary); /* Default code block text */
   font-size: 0.9em;
}
.markdown-body hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 2em 0;
}
.markdown-body blockquote {
    border-left: 3px solid var(--color-accent-primary);
    margin: 1.5em 0;
    padding-left: 1.5em;
    color: var(--color-text-muted);
}
.markdown-body blockquote p {
     margin-bottom: 0.5em;
}
.markdown-body a { /* Links within markdown */
    color: var(--color-accent-primary);
    font-weight: 500;
}
.markdown-body a:hover {
    text-decoration: underline;
}
/* --- Grid Layout for Desktop --- */
@media (min-width: 769px) { /* Apply only on screens wider than mobile */

    .optimizer-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        column-gap: 40px;
        row-gap: 0;
        align-items: start;
        position: relative; /* Added for absolute positioning context */
    }

    .form-grid {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
        margin-bottom: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        align-items: start;
    }

    /* Use absolute positioning to place the button exactly where needed */
    .submit-area {
        position: absolute;
        left: 0; /* Align with left column */
        top: 475px; /* Adjust this value to match the height where "Upload Job Description File" appears */
        width: calc(50% - 40px); /* Match column width minus gap */
    }

     /* Optional: Explicitly reset column stacking if needed, though default block is fine */
    .form-column {
       /* No specific desktop overrides needed here based on previous CSS */
    }

    /* --- Adjustments for other sections if needed --- */
    /* Example: Ensure features are 3-col if window is wide enough */
     .features-grid {
         /* This ensures 3 columns when space allows */
         grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
     }

} /* End of @media (min-width: 769px) */

/* --- Loading Modal Styles --- */
.loading-modal {
    display: none; /* <<< CRITICAL: Start hidden */
    opacity: 0;    /* <<< CRITICAL: Start fully transparent */
    pointer-events: none; /* <<< CRITICAL: Ignore mouse events when hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 14, 23, 0.85); /* Dark semi-transparent overlay */
    z-index: 2000; /* Ensure it's on top */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease; /* Only transition opacity */
}

/* Add .active class via JS to show */
.loading-modal.active {
    display: flex; /* <<< Show using flex */
    opacity: 1;    /* <<< Make visible */
    pointer-events: auto; /* <<< Allow interaction with modal if needed (though usually not) */
}

/* Keep the existing .loading-modal .loading-modal-content styles as they were */
.loading-modal .loading-modal-content {
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    /* Add animation for content appearance if desired */
    transform: scale(0.95);
    transition: transform 0.3s ease; /* Add transition for scale */
}
/* Ensure content scales up when modal is active */
.loading-modal.active .loading-modal-content {
    transform: scale(1);
}

.modal-title {
    font-size: 1.25rem;
    color: var(--color-text-primary);
    margin-bottom: 1.5em;
}

.tech-visual-area {
    height: 60px; /* Space for visuals */
    margin-bottom: 1.5em;
    position: relative;
    /* Placeholder for complex visuals - e.g., animated background */
    /* background: linear-gradient(-45deg, var(--color-bg-tertiary), var(--color-bg-secondary), var(--color-bg-tertiary));
    background-size: 400% 400%;
    animation: gradientBG 10s ease infinite; */
}

/* Simple circuit lines animation */
.circuit-lines {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: moveCircuit 2s linear infinite;
    opacity: 0.5;
}
@keyframes moveCircuit {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}
@keyframes gradientBG {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}


.progress-bar-container {
    width: 100%;
    height: 10px; /* Slightly thicker bar */
    background-color: var(--color-bg-tertiary);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 1.5em;
    border: 1px solid var(--color-border);
}

.progress-bar-inner {
    height: 100%;
    width: 0%; /* Start at 0 */
    background: var(--gradient-accent); /* Use accent gradient */
    border-radius: 5px;
    /* CSS Animation for the progress */
    animation: progressBarLoad 15s ease-out forwards; /* Adjust duration as needed */
     /* Subtle shine */
     position: relative;
}
/* Shine effect for progress bar */
.progress-bar-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    animation: progressShine 1.5s linear infinite;
    opacity: 0.8;
}

@keyframes progressBarLoad {
    from { width: 0%; }
    to { width: 100%; }
}
@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}


.modal-status {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}
.modal-status .blink { /* Blinking cursor */
    animation: blink 1s infinite;
    color: var(--color-accent-primary);
    font-weight: bold;
}

/* --- End Loading Modal Styles --- */

/* Copy button styles */
.copy-button-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.copy-feedback {
    margin-left: 10px;
    color: var(--color-accent-secondary);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-feedback.visible {
    opacity: 1;
}

/* ATS Visualization Container */
.ats-visualization {
    border: 2px solid var(--color-border-primary);
    border-radius: 10px;
    padding: 15px 15px 0 15px; /* Remove bottom padding completely */
    background-color: var(--color-bg-tertiary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 580px; /* Increased height to ensure filter is visible */
    width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Keep hidden to ensure containment */
    position: relative;
    isolation: isolate; /* Create a new stacking context */
}

/* Before Optimization State */
.ats-visualization.before-optimization {
    border-color: var(--color-accent-danger);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

.ats-visualization.before-optimization .filter-system {
    background: linear-gradient(to right, 
        rgba(220, 38, 38, 0.1), 
        rgba(220, 38, 38, 0.05)
    );
    border-color: rgba(220, 38, 38, 0.2);
}

.ats-visualization.before-optimization .scanner {
    background: linear-gradient(to right, 
        transparent, 
        rgba(220, 38, 38, 0.5), 
        transparent
    );
}

/* After Optimization State */
.ats-visualization.optimized {
    border-color: var(--color-accent-success);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.ats-visualization.optimized .filter-system {
    background: linear-gradient(to right, 
        rgba(16, 185, 129, 0.1), 
        rgba(16, 185, 129, 0.05)
    );
    border-color: rgba(16, 185, 129, 0.2);
}

.ats-visualization.optimized .scanner {
    background: linear-gradient(to right, 
        transparent, 
        rgba(16, 185, 129, 0.5), 
        transparent
    );
}

/* Title of the ATS visualization */
.ats-title {
    font-size: 0.9rem;
    text-align: center;
    color: var(--color-text-secondary);
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

/* Resume Queue - allow for one more resume */
.resume-queue {
    position: relative;
    width: 100%;
    height: 150px; /* Increased from 120px to fit one more resume */
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Filter System Area */
.filter-system {
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-border-primary);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px; /* Reduced from 15px */
    position: relative;
    overflow: visible; /* Changed from hidden to allow elements to overflow */
    z-index: 1; /* Keep lower than mini-doc */
}

.filter-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    position: relative;
}

.filter-status {
    position: absolute;
    left: 0;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.before-status {
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--color-accent-danger);
}

.after-status {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-accent-success);
}

.keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    justify-content: center;
}

.keyword {
    font-size: 0.7rem;
    background-color: var(--color-bg-tertiary);
    padding: 4px 8px;
    border-radius: 4px;
    position: relative;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.keyword[data-weight="high"] {
    color: var(--color-accent-danger);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.optimized .keyword[data-weight="high"] {
    color: var(--color-accent-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.keyword[data-weight="med"] {
    color: var(--color-accent-tertiary);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.optimized .keyword[data-weight="med"] {
    color: var(--color-accent-tertiary);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.keyword[data-weight="low"] {
    color: var(--color-text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Filter Animation Container */
.filter-animation {
    position: relative;
    height: 70px; /* Increased from 40px to 70px for better visibility */
    background-color: var(--color-bg-tertiary);
    border-radius: 4px;
    overflow: visible; /* Allow mini-docs to animate outside */
    margin-bottom: 10px; /* Increased margin for better spacing */
    z-index: 5; /* Lower this to ensure mini-docs can be above it */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Add shadow for depth */
    padding: 8px; /* Add some padding to ensure text doesn't touch edges */
}

.scanner {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(99, 102, 241, 0.5), transparent);
    animation: scanAnimationHorizontal 4s infinite linear; /* Increased from 2s to 4s */
    z-index: 1;
}

@keyframes scanAnimationHorizontal {
    0% {
        left: -20px;
    }
    100% {
        left: 100%;
    }
}

.rejection-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center both horizontally and vertically */
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: 1px;
    transition: color 0.3s ease;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.2); /* Add subtle background */
    padding: 2px 6px;
    border-radius: 3px;
}

/* Resume Items */
.resume-item {
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 10px;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    line-height: 1.4; /* Added line height for better text spacing */
}

/* Queue item specific styling */
.resume-item.queue-item {
    opacity: 1;
    transform: translateY(0);
    animation: fadeIn 0.5s ease-out;
}

/* Resume Item Processing Animation */
.resume-item.processing {
    position: absolute;
    top: -40px; /* Start above the filter */
    left: 0;
    width: calc(100% - 20px);
    height: auto; /* Changed from fixed height to auto */
    min-height: 50px; /* Set minimum height */
    margin: 0 10px;
    z-index: 1; /* Below the filter system */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    animation: slideIntoFilter 3s forwards; /* Increased from 1.5s to 3s */
    background-color: var(--color-bg-secondary);
}

/* Animation for resume sliding into filter */
@keyframes slideIntoFilter {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(40px); /* Slide into center of filter */
        opacity: 0.8;
    }
    100% {
        transform: translateY(90px); /* Increased to slide fully through expanded filter */
        opacity: 0;
    }
}

.resume-item.processed {
    animation: fadeIn 1s ease-out; /* Increased from 0.5s to 1s */
}

/* Simple fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Document icon for resume items */
.doc-icon {
    width: 24px;
    height: 30px;
    background-color: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 2px;
    position: relative;
    margin-right: 10px;
    flex-shrink: 0;
}

.doc-icon::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background-color: var(--color-bg-tertiary);
    border-bottom-left-radius: 4px;
    box-shadow: -1px 1px 0 var(--color-border);
}

.doc-icon::after {
    content: "";
    position: absolute;
    top: 12px;
    left: 5px;
    right: 5px;
    height: 2px;
    background-color: var(--color-border);
    box-shadow: 0 4px 0 var(--color-border), 0 8px 0 var(--color-border);
}

/* Mini document that passes through filter */
.mini-doc {
    position: absolute;
    width: 16px;
    height: 20px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 2px;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100; /* Significantly increased z-index */
    opacity: 0;
    pointer-events: none; /* Prevent blocking interactions */
    will-change: transform, opacity; /* Optimize for animations */
}

.mini-doc.accepted-doc {
    animation: slideToAccepted 2.5s forwards; /* Increased from 1.3s to 2.5s */
    box-shadow: 0 0 5px var(--color-accent-success);
    border-color: var(--color-accent-success);
}

.mini-doc.rejected-doc {
    animation: slideToRejected 2.5s forwards; /* Increased from 1.3s to 2.5s */
    box-shadow: 0 0 5px var(--color-accent-danger);
    border-color: var(--color-accent-danger);
}

.mini-doc::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 5px;
    background-color: var(--color-bg-secondary);
    border-bottom-left-radius: 3px;
    box-shadow: -1px 1px 0 rgba(226, 232, 240, 1);
}

.mini-doc::after {
    content: "";
    position: absolute;
    top: 7px;
    left: 3px;
    right: 3px;
    height: 1px;
    background-color: var(--color-border);
    box-shadow: 0 3px 0 var(--color-border), 0 6px 0 var(--color-border);
}

@keyframes slideToAccepted {
    0% {
        opacity: 1;
        bottom: -2px; /* Start right at the bottom of filter */
        left: 50%;
    }
    70% {
        opacity: 1;
        bottom: -20px;
        left: 65%;
    }
    90% {
        opacity: 0.8;
        bottom: -25px;
        left: 75%;
    }
    100% {
        opacity: 0;
        bottom: -30px;
        left: 80%;
    }
}

@keyframes slideToRejected {
    0% {
        opacity: 1;
        bottom: -2px; /* Start right at the bottom of filter */
        left: 50%;
    }
    70% {
        opacity: 1;
        bottom: -20px;
        left: 35%;
    }
    90% {
        opacity: 0.8;
        bottom: -25px;
        left: 25%;
    }
    100% {
        opacity: 0;
        bottom: -30px;
        left: 20%;
    }
}

.rejection-indicator.flash {
    animation: flashText 0.5s;
}

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

.result-count.pulse::after {
    animation: resultPulse 0.6s;
}

@keyframes resultPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Resume Stream Area - reduced height to minimize gap */
.resume-stream {
    position: relative;
    min-height: 15px; /* Reduced from 50px */
    max-height: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding: 5px 0;
    margin-bottom: 5px; /* Reduced from 10px */
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1); /* Added separator line */
    width: 100%;
}

/* Results Area - removed top border since we added one to resume-stream */
.results {
    display: flex;
    width: 100%;
    position: relative;
    z-index: 5;
    border-top: none;
    margin-top: 0;
}

.rejected, .accepted {
    flex: 1;
    padding: 15px 12px;
    text-align: center;
    position: relative;
}

.rejected {
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--color-accent-danger);
    border-right: 1px solid var(--color-border-primary);
    border-bottom-left-radius: 7px;
    border-left: none; /* Remove left border that may push content */
}

.accepted {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-accent-success);
    border-bottom-right-radius: 7px;
    border-right: none; /* Remove right border that may push content */
}

.resume-item.reject-flash {
    animation: rejectFlash 1s forwards;
}

.resume-item.accept-flash {
    animation: acceptFlash 1s forwards;
}

@keyframes rejectFlash {
    0%, 100% {
        background-color: var(--color-bg-secondary);
    }
    50% {
        background-color: rgba(220, 38, 38, 0.1);
    }
}

@keyframes acceptFlash {
    0%, 100% {
        background-color: var(--color-bg-secondary);
    }
    50% {
        background-color: rgba(16, 185, 129, 0.1);
    }
}

/* Results counter styling */
.result-count {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 5px 0;
    position: relative;
    display: inline-block;
}

.result-count::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: currentColor;
    opacity: 0.3;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.result-percent {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* Toggle Switch for ATS Visualization */
.toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    gap: 8px;
    width: 100%;
}

.toggle-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color 0.3s ease;
}

.toggle-label.active {
    color: var(--color-accent-primary);
    font-weight: 600;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-bg-tertiary);
    transition: .4s;
    border-radius: 24px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: var(--color-accent-primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Email Capture Modal Styles */
.email-capture-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.email-modal-content {
    background-color: var(--color-bg-secondary);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    padding: 30px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    border: 1px solid var(--color-border);
}

.email-capture-form {
    margin-top: 25px;
}

.email-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.email-input-group input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    font-size: 1rem;
}

.email-input-group input:focus {
    outline: none;
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Adjust button padding on smaller screens */
.email-input-group .button {
    padding-left: 15px;
    padding-right: 15px;
    flex-shrink: 0; /* Prevent button from shrinking too much */
}

.email-error {
    color: var(--color-accent-danger);
    font-size: 0.9rem;
    margin-bottom: 15px;
    min-height: 20px;
}

.email-privacy {
    color: var(--color-text-muted);
}

/* Mobile specific adjustments for email capture button */
@media (max-width: 480px) { /* Target smaller mobile screens more specifically */
    .email-input-group {
        flex-direction: column; /* Stack input and button vertically */
    }
    .email-input-group .button {
        width: 100%; /* Make button full width */
        margin-top: 10px; /* Add space above button */
        padding: 12px 15px; /* Restore slightly larger padding */
        font-size: 1rem; /* Restore original font size */
        gap: 8px; /* Restore original gap */
    }
    .email-input-group .button svg {
        width: 16px; /* Restore original icon size */
        height: 16px;
    }
}