/* ==========================================================================
   1. BASE DEFAULT & THEMING (Matched to Main Site)
   ========================================================================== */
:root {
    --bg-glow: #0b0f17;
    --card-bg: #161b22;
    --input-bg: #0d1117;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-light: rgba(255, 255, 255, 0.1);
    
    /* Main Site Amber/Orange Branding Accent */
    --accent: #d97706;
    --accent-hover: #f59e0b;
    
    --btn-bg: var(--accent);
    --btn-text: #ffffff;
    --btn-shadow: rgba(217, 119, 6, 0.25);
    
    --font-stack: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* --- EXPLICIT STATE OVERRIDES --- */
:root[data-theme="dark"] {
    --bg-glow: #0b0f17;
    --card-bg: #161b22;
    --input-bg: #0d1117;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-light: rgba(255, 255, 255, 0.1);
    --accent: #d97706;
    --accent-hover: #f59e0b;
    --btn-bg: var(--accent);
    --btn-text: #ffffff;
    --btn-shadow: rgba(217, 119, 6, 0.3);
}

:root[data-theme="light"] {
    --bg-glow: #f8fafc;
    --card-bg: #ffffff;
    --input-bg: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --accent: #d97706;
    --accent-hover: #b45309;
    --btn-bg: var(--accent);
    --btn-text: #ffffff;
    --btn-shadow: rgba(217, 119, 6, 0.2);
}

/* ==========================================================================
   2. CORE STYLES & LAYOUT
   ========================================================================== */
body {
    background: var(--bg-glow);
    background-attachment: fixed;
    font-family: var(--font-stack);
    color: var(--text-main);
    margin: 0;
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    box-sizing: border-box;
    
    overflow-y: auto; 
    overflow-x: hidden;
    
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 650px;
    margin: 0 auto;
}

/* --- DROP ZONE --- */
#drop-zone {
display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: 2px dashed var(--border-light);
  background-color: var(--card-bg);
  border-radius: 10px; 
  transition: all 0.2s ease;
}

#drop-zone:hover {
    border-color: var(--accent);
    color: var(--text-main);
    background-color: rgba(217, 119, 6, 0.04);
}

#drop-zone input {
    display: none;
}

/* --- TEXT AREA --- */
textarea {
    width: 100%;
    box-sizing: border-box;
    background-color: var(--input-bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 18px;
    font-family: var(--font-stack);
    font-size: 15px;
    color: var(--text-main);
    resize: vertical;
    min-height: 130px;
    transition: border-color 0.2s ease, background-color 0.3s ease, color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

textarea::placeholder {
    color: var(--text-muted);
}

/* --- ACTION BUTTON  --- */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto; /* Removes full 100% width stretch */
  min-width: 200px;
  margin: 16px auto 0; /* Centers the button horizontally */
  padding: 12px 28px; 
  font-size: 14px;
  font-weight: 600;
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--btn-shadow);
  transition: all 0.2s ease;
}

button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--btn-shadow);
}

/* =========================================
   3. ATS REPORT RESULTS STYLING
   ========================================= */

.report-header {
    text-align: center;
    border-bottom: 1px dashed var(--border-light);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

#results-container h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

#results-container h2 .status-accent {
     color: var(--accent); 
}

#results-container h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
}

#results-container ul {
    font-size: 16px; 
    line-height: 1.7;
    padding-left: 20px;
    margin: 0;
    color: var(--text-muted);
}

#results-container li {
    margin-bottom: 10px;
}

#results-container li strong {
    color: var(--text-main);
}

/* ==========================================================================
   4. ATS LOADER WITH ACCENT ANIMATION
   ========================================================================== */

.ats-loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.ats-spinner {
    width: 45px;
    height: 45px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--accent);
    border-right: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

.ats-loading-text {
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes textPulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; text-shadow: 0 0 12px rgba(217, 119, 6, 0.4); }
    100% { opacity: 0.4; }
}

/* =========================================
   5. ERROR STATE STYLING
   ========================================= */

.error-card {
    text-align: center;
    padding: 40px 20px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    background-color: var(--card-bg);
}

.error-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.error-title {
    color: #ef4444;
    font-size: 18px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.error-text {
    color: var(--text-muted);
    font-size: 15px;
    margin: 0;
    line-height: 1.6;
}

/* ==========================================================================
   6. UTILITIES & SELECTION
   ========================================================================== */

/* Text Highlight Colors */
::selection { background-color: var(--accent) !important; color: #ffffff !important; }
::-moz-selection { background-color: var(--accent) !important; color: #ffffff !important; }

button,
input[type="submit"],
input[type="button"] {
    user-select: none;
}

/*Floating Pill Scrollbar*/
/* Firefox Support */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Chrome, Edge, Safari & Opera */
::-webkit-scrollbar {
  width: 10px; /* Width of the scrollbar area */
}

::-webkit-scrollbar-track {
  background: transparent; /* Completely invisible track */
}

::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.22); /* Soft neutral gray thumb */
  border-radius: 99px; /* Fully rounded capsule shape */
  border: 2px solid transparent; /* Gives padding around the thumb */
  background-clip: padding-box; /* Creates the floating inset effect */
  transition: background-color 0.2s ease;
}

/* Hover State */
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.4); /* Brighter gray on hover */
  background-clip: padding-box;
}

/* --- Light Mode Adaptive Colors --- */
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.25);
  background-clip: padding-box;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.45);
  background-clip: padding-box;
}

[data-theme="light"] * {
  scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}