/* === FIXED: Progress Bar Restored === */
.usage-bar-container {
    width: 100%;
    height: 24px;
    background-color: var(--progress-bar-bg);
    border-radius: 5px;
    overflow: hidden;
    margin: 12px 0;
}

.usage-bar {
    height: 100%;
    background-color: var(--accent-color);
    color: #1a1a1a;
    font-weight: bold;
    text-align: center;
    line-height: 24px;
    border-radius: 5px;
    transition: width 0.3s ease-in-out;
}

/* === FIXED: Page Layout Width + Centering === */
.dashboard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === FIXED: Section Spacing for Desktop === */
.dashboard-section {
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    text-align: left;
}

/* === FIXED: CTA Button Alignment and Consistency === */
.dashboard-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.dashboard-cta-buttons .button {
    width: 150px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* === FIXED: Individual Job Card Styling === */
.recent-jobs ul {
    padding: 0;
    list-style: none;
}
.recent-jobs li {
    margin-bottom: 1.5rem;
}
.job-details {
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: left;
}
.job-link {
    margin-top: 0.75rem;
    text-align: left;
}
.job-link .button {
    width: 130px;
    text-align: center;
}

/*
|-------------------------------------------------------------------------------
| ADJUSTMENT SETTINGS - EASILY CUSTOMIZE YOUR CONSOLE & THEME TOGGLE HERE
|-------------------------------------------------------------------------------
| Modify these CSS variables to control various aspects of your UI.
| For visual tweaks, you might only need to change values in this top section.
|
| Values for Desktop are generally applied by default or at higher screen widths.
| Values for Mobile (and sometimes Tablet) will override Desktop values
| within their respective media queries lower in the stylesheet.
|-------------------------------------------------------------------------------
*/
:root {
    /* --- Console/Container Sizing & Padding --- */
    --console-max-width-desktop: 900px;  /* Max width of the main content console on desktop */
    --console-max-width-tablet: 600px;   /* Max width of the main content console on tablets */
    --console-max-width-mobile: 500px;   /* Max width of the main content console on mobile */

    /* REVISED: Changed to min-height variables and assigned initial pixel values */
    --console-min-height-desktop: 600px; /* Adjust this value to increase desktop console length */
    --console-min-height-mobile: 550px;  /* Adjust this value to increase mobile console length */

    --console-padding-desktop: 20px 20px; /* Padding inside the console on desktop (top/bottom left/right) */
    --console-padding-mobile: 10px;      /* Padding inside the console on mobile (top/bottom left/right) */


    /* --- Theme Toggle Adjustments (Desktop) --- */
    --toggle-icon-offset-desktop: 5px;       /* Horizontal distance of the sun/moon icons from the edge of the toggle slider */
    --toggle-thumb-offset-desktop: 4px;      /* Horizontal distance of the circular thumb from the edge of the toggle slider */
    --toggle-icon-size-desktop: 15px;        /* PRIMARY: Font size of the sun/moon icons on desktop. Controls visual height/width. */
    --toggle-icon-top-desktop: 1px;        /* Fine-tune vertical position of the icons within the toggle slider on desktop (e.g., 0px, 2px, -1px) */
    --toggle-thumb-size-desktop: 16px;       /* Size (height & width) of the circular thumb within the toggle slider */
    --toggle-width-desktop: 50px;            /* Overall width of the entire theme toggle switch */
    --toggle-height-desktop: 24px;           /* Overall height of the entire theme toggle switch */
    --toggle-icon-line-height-desktop: var(--toggle-height-desktop); /* Helps vertically center icons within the toggle track */

    /* --- Theme Toggle Adjustments (Mobile) */
    --toggle-icon-offset-mobile: 6px;        /* Horizontal distance of the sun/moon icons from the edge of the toggle slider (mobile) */
    --toggle-thumb-offset-mobile: 4px;      /* Horizontal distance of the circular thumb from the edge of the toggle slider (mobile) */
    --toggle-icon-size-mobile: 15px;         /* PRIMARY: Font size of the sun/moon icons on mobile. Controls visual height/width. */
    --toggle-icon-top-mobile: 1px;         /* Fine-tune vertical position of the icons within the toggle slider on mobile */ /* */
    --toggle-thumb-size-mobile: 16px;        /* Size (height & width) of the circular thumb in the toggle (mobile) */
    --toggle-width-mobile: 50px;             /* Overall width of the entire theme toggle switch (mobile) */
    --toggle-height-mobile: 24px;            /* Overall height of the entire theme toggle switch (mobile) */
    --toggle-icon-line-height-mobile: var(--toggle-height-mobile); /* Helps vertically center icons within the toggle track (mobile) */


    /* --- Button & Form Spacing Adjustments (Mobile specific for fine-tuning) --- */
    --submit-btn-margin-top-desktop: 12px; /* Margin above the submit button on desktop */
    --submit-btn-margin-top-mobile: 12px;  /* Margin above the submit button on mobile. Adjust if button feels detached. */
    --form-margin-bottom-mobile: 0px;    /* IMPORTANT: Margin below the form on mobile. REDUCED TO 0 to prevent scrolling. */
    --footer-padding-bottom-mobile: 5px; /* NEW: Padding below the footer on mobile for bottom space */


    /* --- General Color Scheme Variables (Default: Dark Mode) --- */
    --bg-color: #121212;            /* Background color of the entire page */
    --card-color: #2a2a2a;          /* Background color for cards/containers (e.g., the console, topbar) */
    --text-color: #f9fafb;          /* Primary text color */
    --subtle-text-color: #aaa;      /* Secondary/less prominent text color */
    --border-color: #444;           /* Color for borders and separators */
    --input-bg-color: #1f2937;      /* Background color for input fields and range slider tracks */

    --accent-color: #CDE0E8;        /* Accent color used for highlights, active states, etc. (consistent across themes) */
    --feature-item-bg-dark: #1a1a1a; /* NEW: Pure black for feature items in dark mode */

    /* --- Button Colors (Default: Dark Mode) --- */
    --primary-btn-bg: #3f3f46;      /* Background color for primary buttons (e.g., Submit) */
    --primary-btn-text: #ffffff;    /* Text color for primary buttons */
    --primary-btn-hover: #52525b;   /* Background color for primary buttons on hover */

    --secondary-btn-bg: #ffffff;    /* Background color for secondary buttons (e.g., File Upload button, Play buttons) */
    --secondary-btn-text: #111827;   /* Dark text for secondary buttons */
    --secondary-btn-border: #ddd;   /* Light border for dark mode secondary buttons */
    --secondary-btn-hover: #e0e0e0; /* Lighter hover for dark mode secondary buttons */

    --progress-bar-bg: #555;        /* Background color of progress bars */


    /* --- Homepage Section Colors --- */
    --section-bg-color-alt: #1a1a1a; /* Slightly different background for alternating sections */

    /* --- Internal / Inherited Variables (Do Not Change Directly Here) ---
       These variables are set dynamically or act as defaults, then overridden
       by specific mobile/tablet variables within media queries.
       Change the specific -desktop or -mobile variables above instead. */
    --toggle-icon-offset: var(--toggle-icon-offset-desktop);
    --toggle-thumb-offset: var(--toggle-thumb-offset-desktop);
    --toggle-icon-size: var(--toggle-icon-size-desktop);
    --toggle-icon-top: var(--toggle-icon-top-desktop);
    --toggle-thumb-size: var(--toggle-thumb-size-desktop);
    --toggle-width: var(--toggle-width-desktop);
    --toggle-height: var(--toggle-height-desktop);
    --toggle-icon-line-height: var(--toggle-icon-line-height-desktop);

    --submit-btn-margin-top: var(--submit-btn-margin-top-desktop); /* Default for desktop */
    --form-margin-bottom: var(--form-margin-bottom-mobile); /* Default, will be overridden by desktop if needed */
}

/*
|-------------------------------------------------------------------------------
| LIGHT MODE THEME SETTINGS
|-------------------------------------------------------------------------------
| These variables are applied when the 'light-mode' class is added to the body.
|-------------------------------------------------------------------------------
*/
body.light-mode {
    --bg-color: #f9fafb;
    --card-color: #ffffff;
    --text-color: #111827;
    --subtle-text-color: #555; /* REVERTED: Kept as grey for non-feature text */
    --border-color: #ddd;
    --input-bg-color: #e5e7eb;

    --accent-color: #CDE0E8; /* Kept as is for accents */

    --primary-btn-bg: #1f2937;
    --primary-btn-text: #ffffff;
    --primary-btn-hover: #374151;

    --secondary-btn-bg: #e9ecef;
    --secondary-btn-text: #111827;
    --secondary-btn-border: #ccc;
    --secondary-btn-hover: #d8dbdf;

    --progress-bar-bg: #ccc;

    /* Homepage Section Colors - Light Mode */
    --section-bg-color-alt: #f0f0f0;
}

/* NEW: Targeted Light Mode Readability Enhancements */
body.light-mode .how-it-works li,
body.light-mode .feature-grid .feature-item p,
body.light-mode .why-grid div p {
    color: #111827; /* Force black color for these specific items */
    font-weight: 600; /* Make them semi-bold */
}

/* Ensure the accent color on the strong tags is preserved */
body.light-mode .how-it-works li strong {
    color: var(--accent-color); /* Keep the accent color */
    font-weight: bold; /* Keep it bold */
}

/* Ensure the "Most Popular" text is readable in light mode */
body.light-mode .section-pricing .feature-item span[style*="color:gold"],
body.light-mode .section-pricing .feature-item span[style*="color: gold"] {
    color: #111827 !important; /* Force a dark color for contrast */
}


/*
|-------------------------------------------------------------------------------
| GLOBAL & BASE STYLES
|-------------------------------------------------------------------------------
*/
html, body {
    height: 100%;
    margin: 0;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Rubik', sans-serif !important; /* Ensure Rubik is applied widely */
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
    transition: background-color 0.4s ease, color 0.4s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 50px; /* Base padding for desktop, adjusted by media queries for homepage/process page */
    padding-bottom: 40px; /* REVISED: Added padding at the bottom of the body for desktop footer space */
    overflow-x: hidden;
    overflow-y: auto;
}

/* Specific padding for homepage body to create space below fixed topbar */
body:not(.process-page):not(.status-page):not(.dashboard-page) { /* Applies to index.html specifically */
    padding-top: 70px; /* Increased padding-top for homepage hero container */
}


/* --- Topbar styles --- */
.topbar {
  width: 100%;
  background-color: var(--card-color);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}
.topbar-inner {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center; /* Ensures vertical alignment is centered */
}
.topbar-left {
    display: flex;
    align-items: center; /* Ensures vertical alignment is centered */
    gap: 10px;
}
.brand-name {
  font-weight: bold;
  font-size: 1.1em;
  color: var(--text-color);
  white-space: nowrap; /* ADDED: Prevent text from wrapping on multiple lines */
}
/* Style for the brand name link to make it look like regular text */
.brand-name-link {
    text-decoration: none; /* Removes underline */
    color: var(--text-color); /* Inherits text color from the current theme (dark or light) */
    cursor: pointer; /* Indicates it's clickable */
}

.brand-name-link:hover {
    color: var(--accent-color); /* Optional: changes color on hover for visual feedback */
}

/* Ensure the span inside the link doesn't override colors */
.brand-name-link .brand-name {
    color: inherit; /* Ensures the span inherits color from its parent link */
}

.topbar-link {
  color: var(--text-color);
  text-decoration: none;
  margin-left: 20px;
  font-size: 0.85em;
  transition: color 0.3s ease;
}
.topbar-link:hover {
  color: var(--accent-color);
}
.topbar-right {
    display: flex;
    align-items: center; /* Ensures vertical alignment is centered */
    gap: 15px; /* Spacing between links and toggle */
}

/* NEW: Hide the theme toggle on pages with 'status-page' class */
body.status-page .theme-switch-wrapper,
body.dashboard-page .theme-switch-wrapper { /* Hide on dashboard too */
    display: none;
}


/* === Main Header Logo (for homepage) === */
.main-header-logo {
    width: 250px;
    height: auto;
    margin: 0 auto 20px auto;
    display: none; /* Controlled by JS and theme classes */
    border-radius: 15px;
}
body:not(.light-mode) .main-header-logo.logo-dark-theme {
    display: block;
}
body.light-mode .main-header-logo.logo-light-theme {
    display: block;
}

/* === Main Logo on Process Page === */
.logo { /* This class is used on process.html for the logo below the topbar */
    width: 250px;
    height: auto;
    margin: 0 auto 10px auto; /* REDUCED: space below logo */
    border-radius: 15px;
    display: none; /* Hidden by default, revealed by specific ID rules below */
}
body:not(.light-mode) #main-logo-dark {
    display: block;
}
body.light-mode #main-logo-light {
    display: block;
}


/* === Processing Page Logo === */
.processing-logo { /* For status.html */
    width: 330px;
    height: auto;
    margin: 30px auto;
    border-radius: 15px;
    display: none; /* Hidden by default, controlled by theme classes */
}
body:not(.light-mode) .processing-logo.logo-dark-theme {
    display: block;
}
body.light-mode .processing-logo.logo-light-theme {
    display: block;
    mix-blend-mode: multiply; /* Optional: if light logo needs better blending */
}


.container {
    width: 90%;
    max-width: var(--console-max-width-mobile); /* Default for mobile */
    /* REVISED: Changed to min-height variables and assigned initial pixel values */
    min-height: var(--console-min-height-mobile); /* Console Min Height - applies by default for mobile */
    margin: 0 auto; /* Center the container, auto margin for top/bottom will be overridden as needed */
    padding: var(--console-padding-mobile); /* Default for mobile */
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    display: flex;
    flex-direction: column; /* This is key for vertical stacking */
    animation: fadeIn 0.4s ease;
    overflow-y: auto; /* This is fine: it only adds scrollbars if content *actually* overflows the viewport */
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

#custom-controls {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.98);
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, transform 0.4s ease-out;
    padding: 20px;
    margin-top: 15px;
    background-color: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

#custom-controls.custom-controls-active {
    max-height: 1000px;
    opacity: 1;
    transform: scale(1);
}

.slider-container {
    margin-bottom: 12px;
}
.control-group {
    margin-bottom: 12px;
}
.control-group label {
    display: block;
    margin-bottom: 5px;
}
.control-group small {
    color: var(--subtle-text-color);
    font-size: 0.8em;
    margin-top: -2px;
    display: block;
}
.value-input {
    width: 75px;
    padding: 4px;
    background-color: var(--input-bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 4px;
    text-align: right;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}
.value-input:focus {
    outline: 1px solid var(--accent-color);
    border-color: var(--accent-color);
}
input:hover {
  border-color: var(--accent-color);
}
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: var(--input-bg-color);
    border-radius: 5px;
    outline: none;
    transition: background 0.2s ease-in-out;
    cursor: pointer;
    margin: 4px 0;
    border: 1px solid var(--border-color);
    max-width: 100%;
}
body.light-mode input[type="range"] {
    background: #c5c5c5;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    margin-top: 1px;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
    border: 1px solid var(--card-color);
}
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: 1px solid var(--card-color);
    margin-top: 1px;
}
input[type="range"]:focus {
    background: var(--input-bg-color);
}

/* === Custom Dropdown (Select) Styling === */
select {
    display: block;
    width: 100%;
    margin: 8px 0;
    padding: 10px;
    background-color: var(--input-bg-color); /* Use variable for background */
    color: var(--text-color); /* Use variable for text color */
    border: 1px solid var(--border-color);
    border-radius: 5px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
    /* Downward arrow SVG - black for light backgrounds, white for dark backgrounds */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="%231a1a1a"><path d="M7 10l5 5 5-5z"/></svg>'); /* Black arrow for light dropdowns */
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px; /* Increased size for dropdown arrow */
    padding-right: 30px; /* Make space for the arrow */
}

/* Specific dropdown styling for dark mode */
body:not(.light-mode) select {
    background-color: #ffffff; /* White background for dropdown in dark mode */
    color: #1a1a1a; /* Dark text for dropdown in dark mode */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="%231a1a1a"><path d="M7 10l5 5 5-5z"/></svg>'); /* Black arrow for dark mode dropdown */
}

/* Specific dropdown styling for light mode */
body.light-mode select {
    background-color: #ffffff; /* White background for dropdown in light mode */
    color: var(--text-color); /* Text color from light mode variables */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="%231a1a1a"><path d="M7 10l5 5 5-5z"/></svg>'); /* Black arrow for light mode dropdown */
}


/* Dropdown focus/hover */
select:hover,
select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(205, 224, 232, 0.5);
    outline: none !important;
}


/* === Theme Toggle Specifics === */
/* Wrapper for the custom switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 10px; /* Adjust spacing as needed */
}

/* The actual switch label */
.theme-switch {
    position: relative;
    display: inline-block;
    width: var(--toggle-width);
    height: var(--toggle-height);
}

/* Hide default HTML checkbox */
.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider itself */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary-btn-bg); /* Dark mode slider background */
    -webkit-transition: .4s;
    transition: .4s;
    display: flex; /* For icon positioning */
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--toggle-icon-offset); /* Padding to keep icons within the slider */
}

/* The slider thumb/circle */
.slider:before {
    z-index: 2;
    position: absolute;
    content: "";
    height: var(--toggle-thumb-size);
    width: var(--toggle-thumb-size);
    left: var(--toggle-thumb-offset);
    top: 4px; /* 4px */
    background-color: white; /* Thumb color */
    -webkit-transition: .4s;
    transition: .4s;
}

/* Rounded sliders */
.slider.round {
    border-radius: var(--toggle-height); /* Makes the track rounded */
}
.slider.round:before {
    border-radius: 50%; /* Makes the thumb circular */
}

/* Change slider background when checkbox is checked (Light Mode) */
input:checked + .slider {
    background-color: var(--accent-color); /* Light mode slider background */
}

/* Move thumb when checkbox is checked */
input:checked + .slider:before {
    z-index: 2;
    -webkit-transform: translateX(calc(var(--toggle-width) - var(--toggle-thumb-size) - (var(--toggle-thumb-offset) * 2))); /* Move thumb to the right */
    -ms-transform: translateX(calc(var(--toggle-width) - var(--toggle-thumb-size) - (var(--toggle-thumb-offset) * 2)));
    transform: translateX(calc(var(--toggle-width) - var(--toggle-thumb-size) - (var(--toggle-thumb-offset) * 2)));
}

/* Icon styling */
.slider .icon {
    top: var(--toggle-icon-top); /* This will control the vertical fine-tuning */
    z-index: 1;
    font-size: var(--toggle-icon-size); /* PRIMARY CONTROL FOR ICON SIZE */
    line-height: var(--toggle-icon-line-height); /* Helps with vertical centering within the slider */
    color: white; /* Icon color, typically white for contrast on dark/accent background */
    position: absolute; /* Allows precise positioning within the slider */
    transition: opacity 0.4s ease;
    z-index: 1; /* Ensure icons are above the thumb */
    /* Removed explicit height/width as font-size and line-height are more effective for icon fonts */
}

/* Position light mode icon (sun) — shown in dark mode */
.slider .light-icon {
    right: var(--toggle-icon-offset);
    opacity: 1;
}

/* Position dark mode icon (moon) — shown in light mode */
.slider .dark-icon {
    left: var(--toggle-icon-offset);
    opacity: 0;
}

/* Light mode: show MOON icon */
input:checked + .slider .light-icon {
    opacity: 0;
}
input:checked + .slider .dark-icon {
    opacity: 1;
}


/* --- Buttons --- */
.button { /* General button style */
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: none; /* Ensure no default button border */
}

.primary-btn {
    background-color: var(--primary-btn-bg);
    color: var(--primary-btn-text);
}
.primary-btn:hover {
    background-color: var(--primary-btn-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* New: For the repeated CTA button */
.try-now-cta {
    margin-top: 30px; /* Space above the repeated CTA */
    margin-bottom: 20px; /* Space below the repeated CTA */
}


.secondary-btn { /* Used for Wavesurfer play buttons and Reset to Defaults */
    background-color: var(--secondary-btn-bg);
    color: var(--secondary-btn-text);
    border: 1px solid var(--secondary-btn-border);
    padding: 0.5rem 1rem; /* Slightly smaller padding than primary */
    font-size: 0.9em;
    border-radius: 5px; /* Slightly less rounded */
}
.secondary-btn:hover {
    background-color: var(--secondary-btn-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Play button for Wavesurfer (icon only) */
.waveform-play-button {
    background: none; /* No background */
    border: none; /* No border */
    color: #fff; /* White icon color */
    font-size: 2.5em; /* Large icon size */
    cursor: pointer;
    position: absolute;
    left: 0px; /* Moved to the very left edge */
    top: calc(50% - 10px); /* Pushed up more aggressively using calc */
    transform: translateY(-50%); /* Correct vertical centering */
    z-index: 10; /* Ensure it's above the waveform */
    transition: color 0.2s ease;
    padding: 0;
    display: flex; /* For centering the icon */
    align-items: center;
    justify-content: center;
    width: 40px; /* Make it a square hit area */
    height: 40px;
    border-radius: 50%; /* Optional: round hit area */
    text-shadow: 0 0 5px rgba(0,0,0,0.5); /* Subtle shadow for visibility */
}

.waveform-play-button:hover {
    color: var(--accent-color); /* Highlight on hover */
}
body.light-mode .waveform-play-button {
    color: var(--primary-btn-bg); /* Darker color in light mode */
    text-shadow: none;
}
body.light-mode .waveform-play-button:hover {
    color: var(--primary-btn-hover);
}


.button-spinner {
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Custom File Upload Styles --- */
.file-upload-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
  width: 100%;
}
#file-upload {
  display: none;
}
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 25px 20px;
    margin-top: 8px;
    text-align: center;
    color: var(--subtle-text-color);
    transition: border-color 0.3s ease, background-color 0.3s ease;
    width: 100%;
    cursor: pointer;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative; /* Needed for error message positioning */
}
.drop-zone.drag-over {
    border-color: var(--accent-color);
    background-color: rgba(205, 224, 232, 0.1);
}
.drop-zone.error-highlight {
    border-color: #dc3545; /* Red color for error */
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}
.drop-zone p {
    margin: 3px 0;
    color: var(--subtle-text-color);
    font-size: 0.95em;
}
.drop-zone .fas {
    font-size: 3em; /* Base font size for general icons */
    margin-bottom: 8px;
    color: var(--accent-color); /* Changed from --subtle-text-color */
    height: auto; /* Ensure general icons don't stretch vertically */
    width: auto;
}
#file-name-display {
  margin-top: 6px;
  color: var(--text-color);
  font-size: 0.9em;
  font-weight: bold;
}
.file-upload-info { /* New style for file upload info text */
    font-size: 0.85em;
    color: var(--subtle-text-color);
    margin-top: 5px;
    margin-bottom: 0;
}
.error-message {
    color: #e5484d; /* A brighter, more modern red */
    font-weight: 600; /* Make it semi-bold */
    font-size: 0.9em; /* Slightly larger */
    margin-top: 5px;
    margin-bottom: 0;
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    width: 100%;
    text-align: center;
}
.declick-wrapper {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.declick-wrapper input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    display: inline-block;
}
.declick-wrapper label {
    margin-bottom: 0;
    display: inline-block;
    font-size: 0.9em;
}


/* --- Misc Controls Styling --- */
.slider-label-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.custom-controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 12px;
}
.custom-controls-header h3 {
    margin: 0;
    font-size: 1em;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

/* --- Homepage Specific Section Styling --- */
/* The hero section itself is now a .container */
.hero-section {
    max-width: 800px; /* Restrict content width as desired */
    margin-top: 0 !important; /* Ensure no negative margin-top here */
    margin-bottom: 40px !important; /* Increased space under hero container */
    /* The container class itself provides:
       background-color: var(--card-color);
       border: 1px solid var(--border-color);
       box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
       This is the desired look.
    */
}

.hero-tagline-main {
    font-size: 1.5rem; /* Larger font size */
    font-weight: 600;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.hero-tagline-sub {
    font-size: 1.125rem;
    color: var(--subtle-text-color);
    margin-bottom: 0.4rem;
}

/* Sections without the main 'container' style */
.content-section {
    width: 100%; /* Take full width */
    padding: 0; /* Remove container padding here, it's now on inner-container */
    margin-bottom: 25px; /* Spacing between sections */
    border-top: 1px solid var(--border-color); /* Stylish line separation */
    background-color: var(--bg-color); /* Default page background */
    box-shadow: none; /* Remove shadows */
    border-radius: 0; /* Remove border radius */
}
/* No border-top on the first content-section as it's below the hero container */
.content-section:first-of-type {
    border-top: none;
}


/* Inner container to constrain content width and apply padding */
.section-inner-container {
    max-width: 900px; /* Max width for content inside sections */
    margin: 0 auto; /* Center content */
    padding: 30px 20px; /* Padding inside the section content */
    background-color: var(--card-color); /* Apply card background to inner content area */
    border-left: 1px solid var(--border-color); /* Add side borders for contained look */
    border-right: 1px solid var(--border-color);
    /* Remove top/bottom borders and shadows as they are now handled by the outer .content-section */
    border-top: none;
    border-bottom: none;
    box-shadow: none;
}
/* Alternate background for some sections for visual distinction */
.content-section:nth-of-type(even) .section-inner-container { /* Apply to 2nd, 4th, 6th sections (after hero) */
    background-color: var(--section-bg-color-alt);
}
body.light-mode .content-section:nth-of-type(even) .section-inner-container {
    background-color: var(--section-bg-color-alt);
}


.section-features h2,
.section-demo h2,
.section-why-cleancut h2,
.section-faq h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-color);
}

.section-description {
    font-size: 1rem;
    margin-bottom: 2rem; /* Increased margin for description */
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: var(--subtle-text-color);
}

/* New: Styles for Technical Specifications section */
.section-specs {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: left;
    color: var(--subtle-text-color);
}
.section-specs h3 {
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 15px;
    color: var(--text-color);
}
/* Revert the ul styles for section-specs back to default */
.section-specs ul {
    list-style: disc; /* Use default disc bullets */
    padding-left: 20px; /* Add padding for bullets */
    max-width: none; /* Remove width constraint if it applies to ul */
    text-align: left;
}
.section-specs li {
    margin-bottom: 8px;
    font-size: 1em; /* Revert to standard font size */
    padding-left: 0; /* Remove custom padding */
    position: static; /* Remove relative positioning */
}
.section-specs li:before {
    content: none; /* Remove custom bullets */
}
.section-specs p {
    text-align: left; /* Align paragraphs left within this section */
    padding: 0 20px; /* Add some horizontal padding */
    margin-bottom: 10px;
    font-size: 0.9em;
}


/* New: Styles for How It Works section list */
.how-it-works {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: left;
    color: var(--subtle-text-color);
}
.how-it-works h3 {
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 15px;
    color: var(--text-color);
}
.how-it-works ul {
    list-style: none; /* Remove default bullet points */
    padding: 0;
    margin: 0 auto 20px auto;
    max-width: 500px; /* Constrain list width for readability */
}
.how-it-works li {
    margin-bottom: 8px;
    font-size: 0.95em;
    padding-left: 20px; /* Indent for readability */
    position: relative;
}
.how-it-works li strong {
    color: var(--accent-color); /* Highlight the step numbers/titles */
}
/* Custom bullet point for How It Works steps */
.how-it-works li:before {
    content: "•"; /* Custom bullet character */
    color: var(--accent-color); /* Match accent color */
    font-size: 1.2em;
    position: absolute;
    left: 0;
    top: 0;
}

/* Specific styling for the supported formats/max file size under the steps */
.how-it-works li:not(:first-child):not(:nth-child(2)):not(:nth-child(3)) { /* Targets specific items after the numbered steps */
    font-size: 0.85em;
    color: var(--subtle-text-color);
    padding-left: 40px; /* Further indent these details */
}
.how-it-works li:not(:first-child):not(:nth-child(2)):not(:nth-child(3)):before {
    content: ""; /* Remove bullet for these sub-items */
}


.feature-grid, .why-grid, .faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Adjusted minmax for better flow */
    gap: 25px; /* Increased gap for better spacing */
    text-align: left; /* Align text left within grid items */
}

.feature-item, .why-item, .faq-item {
    /* This rule sets the default background, which will be for dark mode */
    background-color: var(--bg-color); /* Use the default bg-color for most items in dark mode */
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* NEW: Specific rule to make feature items in 'section-features' black in dark mode */
.section-features .feature-item {
    background-color: var(--feature-item-bg-dark); /* Use the new pure black variable */
}

/* Explicitly set light mode background for all feature items */
body.light-mode .feature-item {
    background-color: var(--card-color); /* Revert to card color in light mode */
}


.feature-item:hover, .why-item:hover, .faq-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.feature-item h3, .why-title, .faq-question {
    font-weight: bold;
    font-size: 1.25rem; /* Larger headings */
    margin-bottom: 0.8rem;
    color: var(--text-color);
}
.feature-item p, .why-item p, .faq-item p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--subtle-text-color);
}


/* Wavesurfer Demo Styles */
.audio-demo-player {
    margin-bottom: 2rem; /* Space between Before and After players */
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--bg-color); /* Different background for audio player within section */
}
body.light-mode .audio-demo-player {
    background-color: var(--input-bg-color);
}

.audio-demo-player h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--text-color);
}

.waveform-wrapper { /* New wrapper for play button and waveform */
    position: relative;
    display: flex; /* Use flex to align icon and waveform */
    align-items: center;
    /* Removed gap as padding-left on waveform-container will handle spacing */
    margin: 15px auto;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--card-color);
    /* padding-left controlled by waveform-container now */
}
body:not(.light-mode) .waveform-wrapper {
    background-color: var(--card-color);
}
body.light-mode .waveform-wrapper {
    background-color: var(--input-bg-color); /* Lighter background in light mode */
}

.waveform-container {
    flex-grow: 1; /* Allow waveform to take available space */
    overflow: hidden; /* Ensures waveform doesn't bleed */
    background-color: rgba(0,0,0,0.1); /* Subtle background for waveform area */
    padding: 5px 0 5px 38px; /* Vertical padding and crucial padding-left for button space */
}
body.light-mode .waveform-container {
    background-color: rgba(0,0,0,0.15); /* Made darker for light mode */
}


/* Styles for the Video Demo Section */
.video-demo-section {
    padding: 0; /* Handled by inner container */
}


body.light-mode

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    width: 100%;
    background-color: var(--card-color); /* Placeholder background */
    border-radius: 8px;
}
.video-placeholder .fas {
    font-size: 4em;
    margin-bottom: 15px;
    color: var(--accent-color);
}
.video-placeholder p {
    font-size: 1.1em;
    color: var(--subtle-text-color);
}


/* Processing Page Specific Styles */
.full-width-btn {
    width: 100%; /* Make the button full width */
    max-width: 100%; /* Ensure it doesn't exceed its parent */
    box-sizing: border-box; /* Include padding and border in the width */
}
.file-upload-info { /* Added for process.html file size/format info */
    font-size: 0.85em;
    color: var(--subtle-text-color);
    margin-top: 5px;
    margin-bottom: 0;
}


/* --- Status page styles (moved from inline status.html) --- */
body.status-page {
    /* This is the general padding. Let styles.css handle default desktop, and media queries specific overrides. */
    padding-top: 0; /* Ensures no default padding here to avoid conflicts */
}

body.status-page,
body.status-page h1,
body.status-page h3,
body.status-page p,
body.status-page label,
body.status-page select,
body.status-page button,
body.status-page input,
/* Apply to dashboard elements too as it inherits status-page */
body.dashboard-page h1,
body.dashboard-page h3,
body.dashboard-page p,
body.dashboard-page label,
body.dashboard-page select,
body.dashboard-page button,
body.dashboard-page input {
    font-family: 'Rubik', sans-serif !important;
    color: var(--text-color);
}

/* Dropdown styling for dark mode */
body.status-page:not(.light-mode) select,
body.dashboard-page:not(.light-mode) select {
    background-color: #ffffff;
    color: #1a1a1a;
}

/* Dropdown styling for light mode */
body.status-page.light-mode select,
body.dashboard-page.light-mode select {
    background-color: #ffffff;
    color: var(--text-color);
}

/* Dropdown default style for smoother transitions and controlled highlight */
body.status-page select,
body.dashboard-page select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 0 0 transparent;
}

/* Dropdown hover and focus styles */
body.status-page select:hover,
body.status-page select:focus,
body.dashboard-page select:hover,
body.dashboard-page select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(205, 224, 232, 0.5);
    outline: none !important;
}
/* Specific browser focus suppression for better consistency */
body.status-page select:-moz-focusring,
body.dashboard-page select:-moz-focusring {
    outline: none !important;
    box-shadow: none !important;
}
body.status-page select::-moz-focus-inner,
body.dashboard-page select::-moz-focus-inner {
    border: 0 !important;
    padding: 0 !important;
}


body.status-page .container {
    background-color: var(--card-color);
    /* Adjust padding to match the desired complete state (16px from styles.css media query) */
    padding: 16px; /* Changed from 40px */
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* --- Page Specific --- */
.status-box {
    text-align: center;
    /* Adjust margin-top to reduce space above content within the container */
    margin-top: 20px; /* Changed from 50px */
}

.spinner {
    border: 8px solid rgba(128, 128, 128, 0.2);
    border-top-color: var(--text-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

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

.progress-bar-container {
    width: 100%;
    background-color: var(--progress-bar-bg);
    border-radius: 5px;
    margin: 20px 0;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.progress-bar {
    width: 0%;
    height: 30px;
    background-color: var(--accent-color); /* Changed to accent color */
    text-align: center;
    line-height: 30px;
    color: #1a1a1a;
    font-weight: bold;
    border-radius: 5px;
    transition: width 0.4s ease-in-out;
}

body.status-page .button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-btn-bg); /* Use primary-btn-bg for consistency */
    color: var(--primary-btn-text); /* Use primary-btn-text for consistency */
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    transition: background-color 0.2s ease-in-out;
}

body.status-page .button:hover {
    background-color: var(--primary-btn-hover); /* Use primary-btn-hover for consistency */
}

/* --- Mobile-specific Adjustments (using Media Queries) --- */
@media (max-width: 600px) {
    body.status-page {
        padding-top: 30px;
    }

    body.status-page .container {
        padding: 25px;
    }

    body.status-page h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    body.status-page p {
        font-size: 0.95em;
        line-height: 1.4em;
    }

    /* .logo and .processing-logo sizes are now in styles.css */

    body.status-page .status-box {
        margin-top: 30px;
    }

    body.status-page .spinner {
        width: 50px;
        height: 50px;
        border-width: 6px;
        margin: 15px auto;
    }

    body.status-page .progress-bar-container {
        margin: 15px 0;
    }

    body.status-page .progress-bar {
        height: 25px;
        line-height: 25px;
        font-size: 0.9em;
    }

    body.status-page .button {
        padding: 12px 18px;
        margin-top: 15px;
        font-size: 0.95em;
    }
}

body.status-page .footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--subtle-text-color);
    font-size: 0.85em;
}

/* Desktop-specific adjustment for status page (from 769px and up) */
@media (min-width: 769px) {
    body.status-page {
        padding-top: 80px !important; /* This value will lower the container on desktop */
    }
}
/* --- End Status page styles --- */

/*
|-------------------------------------------------------------------------------
| AUTH PAGE STYLES (Login & Register)
|-------------------------------------------------------------------------------
*/
.auth-container {
    width: 90%;
    max-width: 420px; /* Optimal width for auth forms */
    margin: 3rem auto; /* Give it some space from the top */
    padding: 2rem 2.5rem;
    background-color: var(--card-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-out;
}

.auth-container h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-color);
}

.auth-container form {
    display: flex;
    flex-direction: column;
}

.auth-container input[type="email"],
.auth-container input[type="password"] {
    width: 100%;
    max-width: 304px; /* Set max-width to match reCAPTCHA */
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    padding: 12px 15px;
    margin-bottom: 1rem;
    background-color: var(--input-bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
}

.auth-container input[type="email"]:focus,
.auth-container input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(205, 224, 232, 0.4);
}

.auth-container .g-recaptcha {
    margin-bottom: 1rem;
    display: flex; /* NEW: Use flexbox for centering */
    justify-content: center; /* NEW: Center the reCAPTCHA widget */
}

.auth-container button[type="submit"] {
    width: 100%;
    max-width: 304px; /* Match input and reCAPTCHA width */
    margin-left: auto;
    margin-right: auto;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-btn-text);
    background-color: var(--primary-btn-bg);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.auth-container button[type="submit"]:hover {
    background-color: var(--primary-btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.auth-container p {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--subtle-text-color);
}

.auth-container p a {
    color: var(--accent-color);
    font-weight: bold;
    text-decoration: none;
    transition: opacity 0.2s;
}

.auth-container p a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Flash Messages (Errors, Success, etc.) */
.flashes {
    list-style: none;
    padding: 0;
    margin: 0 auto 1rem auto; /* Center the flash messages */
    max-width: 304px; /* Match form width */
}

.flashes li {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
}

/* Example error category style */
.flashes .error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Example success category style */
.flashes .success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}


/*
|-------------------------------------------------------------------------------
| RESPONSIVE ADJUSTMENTS
|-------------------------------------------------------------------------------
| These media queries apply specific styles based on screen width.
| Some settings that change for mobile/tablet are controlled by variables
| defined at the top, which are then used here to override the defaults.
|-------------------------------------------------------------------------------
*/

/* --- Responsive adjustments for Tablet/Desktop (min-width: 768px) --- */
@media (min-width: 768px) {
    body {
        padding-top: 60px; /* Standard padding-top for general desktop */
    }
    /* Adjusted padding for process page on desktop */
    body.process-page {
        padding-top: 55px !important; /* REVISED: Further reduced for tighter gap */
    }
    body:not(.process-page):not(.status-page):not(.dashboard-page) { /* Applies to index.html specifically */
        padding-top: 70px; /* Homepage specific padding-top */
    }
    body.dashboard-page { /* Adjusted padding for dashboard page on desktop */
        padding-top: 80px !important;
    }


    .container:not(.auth-container):not(.dashboard-container) { /* Exclude auth and dashboard container from this rule */
        max-width: var(--console-max-width-tablet);
        /* REVISED: Apply desktop min-height here */
        min-height: var(--console-min-height-desktop); /* Apply desktop min-height */
        padding: var(--console-padding-desktop);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        margin: 0 auto; /* Center with auto margins */
    }
    .main-header-logo {
        width: 270px;
        margin-bottom: 30px;
    }
    .logo { /* This is for process.html */
        width: 270px;
        margin-bottom: 10px; /* Reduced from 30px */
    }
    .processing-logo {
        width: 270px;
        margin-bottom: 35px;
    }
    .status-box {
        margin-top: 0;
    }
    .control-group {
        margin-bottom: 18px;
    }
    input:not(.auth-container input),
    select:not(.auth-container select),
    button:not(.auth-container button) {
        padding: 9px;
        margin: 8px 0;
        font-size: 0.95em;
    }
    /* .button for process audio uses .full-width-btn now */
    .button.primary-btn.full-width-btn {
        padding: 12px;
        margin-top: var(--submit-btn-margin-top-desktop);
    }

    .theme-switch-wrapper {
        margin-left: 20px;
    }
    .theme-switch {
        height: var(--toggle-height-desktop);
        width: var(--toggle-width-desktop);
    }
    .slider:before {
    z-index: 2;
        height: var(--toggle-thumb-size-desktop);
        width: var(--toggle-thumb-size-desktop);
        left: var(--toggle-thumb-offset-desktop);
        bottom: 3px;
    }
    input:checked + .slider:before {
    z-index: 2;
    -webkit-transform: translateX(calc(var(--toggle-width-desktop) - var(--toggle-thumb-size-desktop) - (var(--toggle-thumb-offset-desktop) * 2)));
    -ms-transform: translateX(calc(var(--toggle-width) - var(--toggle-thumb-size) - (var(--toggle-thumb-offset) * 2)));
    transform: translateX(calc(var(--toggle-width-desktop) - var(--toggle-thumb-size-desktop) - (var(--toggle-thumb-offset) * 2)));
    }

    .slider .icon {
        font-size: var(--toggle-icon-size-desktop); /* PRIMARY CONTROL FOR ICON SIZE */
        line-height: var(--toggle-icon-line-height-desktop); /* Helps with vertical centering */
        top: var(--toggle-icon-top-desktop); /* Fine-tune vertical position */
        /* Removed explicit height/width */
    }
    .slider .light-icon {
        right: var(--toggle-icon-offset-desktop);
    }
    .slider .dark-icon {
        left: var(--toggle-icon-offset-desktop);
    }


    .custom-controls-header {
        font-size: 1em;
    }
    .value-input {
        width: 60px;
        padding: 3px;
        font-size: 0.9em;
    }
    input[type="range"] {
        height: 6px;
        margin: 6px 0;
    }
    input[type="range"]::-webkit-slider-thumb {
        width: 16px;
        height: 16px;
    }
    input[type="range"]::-moz-range-thumb {
        width: 16px;
        height: 16px;
    }
    .drop-zone .fas {
        font-size: 3.2em;
        margin-bottom: 12px;
        height: auto; /* Ensure general icons don't stretch vertically */
        width: auto;
    }
    .drop-zone {
        padding: 30px 20px;
        min-height: 120px;
    }
    .declick-wrapper {
        padding: 12px;
        margin-top: 18px;
        margin-bottom: 18px;
    }

    .topbar-inner {
        flex-direction: row;
        flex-wrap: nowrap;
    }
    .topbar-right {
        margin-top: 0;
        display: flex;
        align-items: center;
        text-align: right;
    }
    .topbar-link {
        margin-left: 20px;
        margin-right: 0;
        font-size: 0.85em;
    }
    .topbar-link:first-child {
        margin-left: 20px;
    }
    .brand-name {
        font-size: 1.1em;
    }
    .footer {
        margin-top: 40px !important; /* REVISED: Tighter gap for desktop */
        padding: 15px;
        font-size: 0.8em;
    }

    /* Homepage specific spacing on desktop */
    .hero-section {
        margin-bottom: 40px !important; /* Increased space under hero container */
        padding-top: 30px;
        padding-bottom: 30px;
    }
    .hero-tagline-main {
        font-size: 2.2rem;
        margin-top: 1.5rem;
    }
    .hero-tagline-sub {
        font-size: 1.3rem;
        margin-bottom: 2rem;
    }
    .content-section {
        margin-bottom: 40px; /* Larger spacing between sections */
    }
    .section-inner-container {
        padding: 40px 20px;
    }
    .section-features h2,
    .section-demo h2,
    .section-why-cleancut h2,
    .section-faq h2,
    .video-demo-section h2 { /* Added video section */
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    .feature-grid, .why-grid, .faq-grid {
        gap: 30px;
    }
    .feature-item, .why-item, .faq-item {
        padding: 25px;
    }
    .feature-item h3, .why-title, .faq-question {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    .feature-item p, .why-item p, .faq-item p {
        font-size: 1rem;
    }
    .audio-demo-player {
        margin-bottom: 2.5rem;
        padding: 30px;
    }
    .audio-demo-player h3 {
        font-size: 1.4rem;
    }
    .waveform-wrapper {
        /* Removed padding-left from here as it's now on .waveform-container */
    }
    .waveform-container { /* Specific desktop adjustment for waveform-container */
        padding-left: 45px; /* Adjusted: Nudged left on desktop */
    }
    .waveform-play-button {
        left: 0px;
    }
}

/* --- Cap width for ultra-wide displays (min-width: 1024px) --- */
@media (min-width: 1024px) {
    .container:not(.auth-container):not(.dashboard-container) {
        max-width: var(--console-max-width-desktop);
    }
    /* Homepage sections can go wider on larger screens */
    .hero-section {
        max-width: 1000px; /* Constrain content inside the full-width hero wrapper */
    }
    .content-section {
        max-width: 100%; /* Allows full width */
    }
    .section-inner-container {
        max-width: 1000px; /* Max width for content inside sections */
    }
}

/* --- Footer styles --- */
/* These general footer styles apply unless overridden by media queries */
.footer {
    margin-top: 0px; /* Default margin, will be overridden by desktop media query */
    padding: 15px;
    border-top: 1px solid var(--border-color);
    color: var(--subtle-text-color);
    font-size: 0.8em;
    text-align: center;
    width: 100%;
    flex-shrink: 0;
}
.footer p { /* Reset margin for footer paragraphs */
    margin: 5px 0;
}
.footer-link {
    text-decoration: underline;
    color: var(--subtle-text-color);
}
.footer-link:hover {
    color: var(--accent-color);
}

/* --- Tagline Style --- */
.tagline {
    font-size: 1em;
    color: var(--subtle-text-color);
    margin-top: -5px; /* Keep this to position relative to logo */
    margin-bottom: 10px; /* REDUCED: Space below tagline */
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* === CleanCut – Final Layout Fixes === */
body, html {
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  margin: 0;
}
/* Process page specific padding/margin for cleaner look */
/* This rule exists but is overridden by media queries for process.page */
body.process-page { /* Add this class to your body tag on process.html */
    padding-top: 80px; /* Default for the process page, overridden by specific media queries */
}

.container:not(.auth-container):not(.dashboard-container) {
  margin-top: 0;
  margin-bottom: 0px; /* REDUCED TO 0: Margin below container (global default) */
  max-height: none; /* Keep max-height as none, min-height will control */
  overflow: visible; /* Ensure content is visible unless a fixed height is specifically desired */
  background-color: var(--card-color);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/*
|-------------------------------------------------------------------------------
| MOBILE LAYOUT SPECIFIC ADJUSTMENTS (<= 600px)
|-------------------------------------------------------------------------------
| These media queries apply specific styles based on screen width.
| Adjust values here if the spacing is not correct after changing variables above.
|-------------------------------------------------------------------------------
*/

/* --- Responsive adjustments for Mobile (max-width: 600px) --- */
@media (max-width: 600px) {
  body {
    padding-top: 25px; /* Default body padding for mobile, adjusted further below */
    padding-bottom: 120px;
  }
  body.process-page {
    padding-top: 50px;
  }
  /* Adjusted for index.html specifically, to push content below the topbar */
  body:not(.process-page):not(.status-page):not(.dashboard-page) { /* Applies to index.html specifically */
      padding-top: 65px; /* Adjust this value as needed to clear the topbar */
  }
  body.dashboard-page { /* Adjusted padding for dashboard page on mobile */
      padding-top: 60px !important; /* Adjusted top padding for mobile dashboard */
  }

  .container:not(.auth-container):not(.dashboard-container) {
    padding-bottom: 20px;
    margin-bottom: 0px;
  }
  form:not(.auth-container form) {
    margin-bottom: var(--form-margin-bottom-mobile);
  }
  .footer {
    position: relative;
    padding-bottom: var(--footer-padding-bottom-mobile);
    margin-top: 30px;
  }
  /* Mobile responsive adjustments for logos */
  .main-header-logo {
    width: 200px;
    margin-bottom: 5px; /* Reduced further to compress space */
  }
  .logo { /* This is for process.html */
    max-width: 180px;
    height: auto;
    margin-bottom: 10px;
  }
  .processing-logo { /* Specific adjustment for processing page logo on mobile */
    width: 200px;
    margin-top: 10px;
    margin-bottom: 20px;
  }

  /* Homepage specific spacing on mobile */
  .hero-section {
    /* Aggressively reduced padding and negative margin to make it shorter */
    min-height: 340px !important; /* Slightly reduced min-height */
    padding-top: 5px; /* Tightly reduced top padding */
    padding-bottom: 5px; /* Added back 5px padding-bottom for slight spacing */
    margin-bottom: -110px; /* Maintain aggressive negative margin for overlap */
    margin-top: 0 !important; /* Ensure no negative margin pushes it up */
  }
  .hero-tagline-main {
    font-size: 1.5rem;
    margin-top: 0.3rem; /* Further reduced */
    margin-bottom: 0.1rem; /* Further reduced */
  }
  .hero-tagline-sub {
    font-size: 1.1rem;
    margin-bottom: 0.3rem; /* Further reduced */
  }
  .content-section {
      margin-top: 15px;
      margin-bottom: 20px;
      border-top: 1px solid var(--border-color);
  }
  .section-inner-container {
      padding: 20px;
  }
  .section-features h2,
  .section-demo h2,
  .section-why-cleancut h2,
  .section-faq h2,
  .video-demo-section h2 { /* Added video section */
      font-size: 1.6rem;
      margin-bottom: 1rem;
  }
  .section-description {
      font-size: 0.95rem;
      margin-bottom: 1.5rem;
  }
  .feature-grid, .why-grid, .faq-grid {
      gap: 20px;
      /* Force stacking on mobile */
      grid-template-columns: 1fr;
  }
  .feature-item, .why-item, .faq-item {
      padding: 15px;
  }
  .feature-item h3, .why-title, .faq-question {
      font-size: 1.15rem;
      margin-bottom: 0.6rem;
  }
  .feature-item p, .why-item p, .faq-item p {
      font-size: 0.9em;
  }
  .audio-demo-player {
      margin-bottom: 1.5rem;
      padding: 15px;
  }
  .audio-demo-player h3 {
      font-size: 1.1rem;
  }
  .waveform-wrapper {
      /* Removed padding-left from here as it's now on .waveform-container */
  }
  .waveform-container { /* Specific mobile adjustment for waveform-container */
      padding-left: 32px; /* Adjusted: Nudged left for mobile */
  }
  .waveform-play-button {
      left: 0px;
      top: calc(50% - 3px);
      height: 32px;
      width: 32px;
      font-size: 1.5em;
      transform: translateY(-50%);
  }
    /* Responsive adjustments for video section */

    .video-placeholder .fas {
        font-size: 3em;
    }
    .video-placeholder p {
        font-size: 1em;
    }
}

/* Further Mobile Spacing Tweaks for very small screens (<= 400px) */
@media (max-width: 400px) {
  .main-header-logo {
    width: 180px;
  }
  .logo {
    max-width: 150px;
  }
  .processing-logo {
    width: 180px;
  }
  .auth-container {
    padding: 2rem 1.5rem;
  }
    /* Even smaller font for hero text on very small screens */
    .hero-tagline-main {
        font-size: 1.35rem;
        line-height: 1.6rem;
    }
    .hero-tagline-sub {
        font-size: 1.05rem; /* Slightly larger for better readability */
    }
    /* Mobile Topbar Adjustments for very small screens */
    .topbar {
        padding: 8px 5px; /* Further reduced padding */
    }
    .topbar-link {
        font-size: 0.7em; /* Even smaller font on very small screens */
    }
    .brand-name {
        font-size: 0.85em; /* Even smaller brand name */
    }
    .topbar-left,
    .topbar-right {
        gap: 3px; /* Minimal gap on very small screens */
    }
}

.topbar-text a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
}

.topbar-text a:hover {
  color: var(--accent-color);
}


/* Ensure top-left brand text link is clickable and styled */
.topbar-text a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.topbar-text a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

/* This media query ensures that the mobile 'top' adjustment for toggle icons
   is applied consistently for screen widths up to 768px. */
@media (max-width: 768px) {
  .slider .icon {
    top: var(--toggle-icon-top-mobile);
  }
}


/* General responsive style overrides (keep these separate if they apply broadly) */
.section-pricing h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text-color);
}
.section-pricing .feature-item {
  background-color: var(--section-bg-color-alt);
}


/* === Final Mobile & Polish Tweaks === */
@media (max-width: 768px) {
  .content-section {
    padding-block: 2rem;
  }

  .faq-question {
    margin-bottom: 0.5rem;
  }

  .faq-question + p {
    margin-bottom: 1.25rem;
  }

  .feature-item {
    text-align: left;
  }

  .section-pricing .section-description {
    font-size: 1.125rem;
  }
}

@media (min-width: 769px) {
  .feature-item {
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color); /* Changed from --border-color-light as it wasn't defined */
    border-radius: 8px;
    padding: 1rem;
  }

  .faq-question + p {
    margin-bottom: 1.5rem;
  }

  .button.try-now-cta {
    font-weight: 600;
    font-size: 1.05rem;
  }
}


.trial-info {
    margin-top: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

.price {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0.5rem;
    color: var(--accent-color);
}

.green-highlight {
    color: #22c55e;
    font-weight: bold;
}

.feature-item {
    padding: 1rem;
    border-radius: 12px;
    background-color: var(--card-color);
    margin-bottom: 1.5rem;
}



/* --- Final mobile spacing & icon tweaks --- */

.section-pricing {
    padding-bottom: 3rem;
}

.trial-info {
    margin-bottom: 2rem;
}

.feature-item ul {
    padding-left: 1.2rem;
    line-height: 1.6;
}

.feature-item ul li {
    margin-bottom: 0.5rem;
}



@media (max-width: 640px) {
  .section-pricing {
    padding-top: 2rem;
    padding-bottom: 4rem;
  }

  .trial-info {
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
  }

  .feature-item {
    margin-bottom: 2rem;
  }

  .feature-item ul li {
    margin-bottom: 0.65rem;
  }
}

/* Force container to go full width on mobile */
@media (max-width: 600px) {
  body,
  html {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
  }

  .container:not(.auth-container):not(.dashboard-container) {
    max-width: 100% !important;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }
}

/* FIX FOR MOBILE VERTICAL BARS */
@media (max-width: 600px) {
  .content-section {
    background-color: var(--card-color);
    margin-top: 0;
    margin-bottom: 0;
  }

  /* Re-adds space between the content of the sections */
  .section-inner-container {
      padding-top: 40px;
      padding-bottom: 40px;
  }

  /* Removes the top border from the very first section */
  .content-section:first-of-type {
      border-top: none;
  }
}

/* ===== FIXED VIDEO EMBED BLOCK - 16:9 Aspect Ratio with Full Coverage ===== */
.video-container {
  position: relative !important;
  width: 100% !important;
  max-width: 1400px !important; /* Increased video width */
  margin: 0 auto !important;
  padding-bottom: 56.25% !important; /* 16:9 aspect ratio (height/width) */
  height: 0 !important;
  background-color: #000 !important;
  border: 3px solid white !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.15) !important;
}

.video-container iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block !important;
}
/* ===== END OF FIXED VIDEO EMBED BLOCK ===== */

/* Dashboard specific styles */
.dashboard-container {
    max-width: 900px; /* Default max-width for desktop */
    margin: 6rem auto 2rem auto; /* Default margin for desktop */
    padding: 2rem;
    background-color: var(--card-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-align: left;
    /* Added for consistency, will be overridden by mobile media query */
    width: 90%; /* Ensure it doesn't stretch too wide on larger screens before max-width kicks in */
}

.dashboard-container h1 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.dashboard-section {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.dashboard-section h2 {
    color: var(--text-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.usage-stats p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--subtle-text-color);
}

.usage-stats strong {
    color: var(--accent-color);
    word-break: break-word; /* Ensure long words break */
    display: inline-block; /* Allow wrapping if needed */
}
/* Specific style for remaining minutes to ensure red/green color stands out */
.usage-stats strong[style*="color: red"],
.usage-stats strong[style*="color: rgb(34, 197, 94)"] {
    font-weight: bold;
    font-size: 1.15rem; /* Make it slightly larger */
}


.usage-bar-container {
    width: 100%;
    background-color: var(--progress-bar-bg);
    border-radius: 5px;
    margin-top: 1rem;
    height: 25px;
    overflow: hidden;
}

.usage-bar {
    height: 100%;
    background-color: var(--accent-color); /* Changed to accent color */
    border-radius: 5px;
    text-align: center;
    color: #1a1a1a;
    line-height: 25px;
    font-weight: bold;
    transition: width 0.5s ease-in-out;
    white-space: nowrap; /* Prevent percentage from wrapping onto next line */
    min-width: 40px; /* Ensure bar is wide enough for text even at low percentages */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 5px; /* Add some internal padding */
    box-sizing: border-box; /* Include padding in width calculation */
}

.recent-jobs ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-jobs li {
    background-color: var(--card-color); /* Use card color for list items */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    word-break: break-word; /* Break long words */
}

.job-details {
    flex-grow: 1;
    color: var(--subtle-text-color);
    font-size: 0.95rem;
    /* Added for mobile text overflow */
    min-width: 0; /* Allow flex item to shrink below content size */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.job-details strong {
    color: var(--text-color);
    font-size: 1rem;
    word-break: break-all; /* Aggressively break file names */
}

.job-details p {
    margin: 0.2rem 0;
    word-break: break-word; /* Ensure paragraphs break words */
}

.job-link {
    flex-shrink: 0; /* Prevent button from shrinking */
    margin-left: 1rem; /* Space from job details on desktop */
}

.job-link .button {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.dashboard-cta-buttons {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: row; /* Default to row for desktop */
    gap: 1.5rem; /* Space between buttons on desktop */
    justify-content: center; /* Center buttons on desktop */
}

.dashboard-cta-buttons .button {
    width: auto; /* Default to auto width for desktop */
    padding: 0.75rem 1.5rem; /* Standard button padding */
}

/* Dashboard Desktop Specific Overrides (min-width: 601px) */
@media (min-width: 601px) {
    body.dashboard-page {
        padding-top: 80px !important; /* Ensure desktop dashboard starts below topbar */
        padding-bottom: 40px; /* Ensure space at bottom for desktop footer */
    }
    .dashboard-container {
        max-width: 900px;
        padding: 2rem;
        margin: 6rem auto 2rem auto;
        background-color: var(--card-color);
        border-radius: 12px;
        border: 1px solid var(--border-color);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }
    .dashboard-section {
        background-color: var(--bg-color); /* Explicitly set for desktop */
        border: 1px solid var(--border-color);
        border-radius: 10px;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    .recent-jobs li {
        flex-direction: row;
        padding: 1rem;
    }
    .job-details {
        margin-bottom: 0;
        text-align: left;
    }
    .job-link {
        margin-left: 1rem;
        width: auto;
    }
    .job-link .button {
        width: auto;
    }
}

/* Dashboard Mobile Specific Overrides (max-width: 600px) */
@media (max-width: 600px) {
    body.dashboard-page {
        padding-top: 60px !important; /* Adjusted top padding for mobile dashboard */
        padding-bottom: 20px !important; /* Reduced bottom padding to keep footer closer */
    }
    .dashboard-container {
        margin-top: 0 !important; /* Set to 0 to remove gap above container on mobile */
        padding: 1rem; /* Reduced padding */
        max-width: 100% !important; /* Ensure it takes full width */
        border-radius: 0; /* Remove border-radius on small screens */
        border-left: none; /* Remove side borders */
        border-right: none;
        box-shadow: none; /* Remove shadow */
    }
    .dashboard-container h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem; /* Reduced margin */
    }
    .dashboard-section {
        padding: 1rem;
        border-radius: 0; /* Remove border-radius on small screens */
        border-left: none; /* Remove side borders */
        border-right: none;
        margin-bottom: 1rem; /* Reduced space between sections */
    }
    .dashboard-section h2 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    .usage-stats p {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }
    .usage-bar {
        font-size: 0.8em; /* Smaller font for percentage */
    }
    .recent-jobs li {
        flex-direction: column; /* Stack items vertically */
        align-items: flex-start; /* Align text to the left */
        padding: 0.8rem; /* Reduced padding */
        margin-bottom: 0.6rem; /* Reduced margin between jobs */
    }
    .job-details {
        width: 100%; /* Take full width */
        margin-bottom: 0.5rem; /* Space between details and button */
        word-break: break-word; /* Ensure longer text breaks */
    }
    .job-details strong {
        font-size: 0.95rem;
        word-break: break-all; /* Aggressively break file names */
    }
    .job-details p {
        font-size: 0.85rem;
    }
    .job-link {
        width: 100%; /* Ensure button container takes full width */
        text-align: center; /* Center the button */
        margin-left: 0; /* Remove left margin */
    }
    .job-link .button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        width: 90%; /* Make button take up most of the width */
        max-width: 250px; /* Limit width for button */
        display: block; /* Ensure button is block for margin auto to work */
        margin-left: auto; /* Center button */
        margin-right: auto; /* Center button */
    }
    .dashboard-cta-buttons {
        flex-direction: column; /* Stack buttons on mobile */
        gap: 0.8rem; /* Slightly reduced gap */
        margin-bottom: 1.5rem; /* More space below cta buttons */
    }
    .dashboard-cta-buttons .button {
        width: 80%; /* Make CTA buttons slightly narrower for aesthetics */
        max-width: 280px;
        display: block; /* Ensure buttons are block for margin auto to work */
        margin-left: auto; /* Center buttons */
        margin-right: auto; /* Center buttons */
    }
    body.dashboard-page .footer {
        padding-bottom: 15px; /* Add more space below the footer on mobile */
    }
}


.video-demo-section .section-inner-container {
  max-width: 1400px !important; /* Increased container width */
  padding-left: 10px !important; /* Reduced padding */
  padding-right: 10px !important; /* Reduced padding */
  padding-top: 40px !important;
  padding-bottom: 40px !important;
}

.video-demo-section .try-now-cta {
  margin-top: 20px !important;
  display: inline-block !important;
}

/* Ensure white border on desktop */
@media (min-width: 601px) {
  .video-container {
    border: 3px solid white !important;
    border-radius: 12px !important;
  }
  /* Use accent color in light mode for contrast */
  body.light-mode .video-container {
    border: 3px solid var(--accent-color) !important;
  }
}

/* ===== FIX 2: Mobile Container Padding and Full Layout ===== */
.dashboard-container {
  padding: 1rem;
  box-sizing: border-box;
  width: 100%;
}

.dashboard-section {
  box-sizing: border-box;
  width: 100%;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 10px;
}

.dashboard-job {
  box-sizing: border-box;
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.dashboard-cta-buttons .button {
    width: 150px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
}

/* ===== START: UNIFIED MOBILE HEADER FIX ===== */

@media (max-width: 768px) {

  /* 1. Main header bar styling */
  .topbar {
    /* Adjust the first value (top padding) to raise or lower the text.
       Example: 'padding: 8px 16px;' will raise the text higher. */
    padding: 10px 10px; /* Reduced horizontal padding for mobile */
    box-sizing: border-box;
    /* We remove the fixed height to let padding control the size */
  }

  /* 2. Inner container for positioning */
  .topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Ensures vertical alignment is centered */
    width: 100%;
  }

  /* (The rest of the rules are the same...) */
  .topbar-left {
    display: flex;
    align-items: center; /* Ensures vertical alignment is centered */
    gap: 5px; /* Reduced gap for items in left section */
  }

  .topbar-right {
    display: flex;
    align-items: center; /* Ensures vertical alignment is centered */
    gap: 8px; /* Reduced gap for items in right section */
  }

  .brand-name {
    font-size: 0.9em; /* Slightly smaller brand name */
    margin-right: 0;
  }

  .topbar-link {
    font-size: 0.75em; /* Smaller font for navigation links */
    margin-left: 8px; /* Slightly reduced margin between links */
    /* NEW: Fine-tune vertical position of text links */
    position: relative;
    top: -1px; /* Adjust this value (-1px, -2px, 0px) to shift text up/down */
  }

  .header-nav-item {
      margin-left: 0; /* Align first item correctly if the `gap` above doesn't control it fully */
  }

  .theme-switch-wrapper {
      margin-left: 5px; /* Adjust margin if needed to bring it closer */
      /* Ensure the theme switch itself is vertically centered if its internal elements have height variations */
      display: flex;
      align-items: center;
  }
}

/* For very small screens (e.g., width less than 400px), further reduce if necessary */
@media (max-width: 400px) {
    .topbar-link {
        font-size: 0.7em; /* Even smaller font on very small screens */
    }
    .brand-name {
        font-size: 0.85em; /* Even smaller brand name */
    }
    .topbar-left,
    .topbar-right {
        gap: 3px; /* Minimal gap on very small screens */
    }
    .topbar {
        padding: 8px 5px; /* Further reduced padding */
    }
}
/* ===== END: UNIFIED MOBILE HEADER FIX ===== */

/* Add vertical space above the hero section button on mobile */
@media (max-width: 600px) {
  .hero-section .button.primary-btn {
    margin-top: 20px; /* Adjust this value to add more or less space */
  }
}

/* --- Locked Pro Feature Styling --- */
.locked-feature {
    position: relative;
    pointer-events: none; /* Disable mouse events on the container's children */
}

.locked-feature::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.85); /* Dark semi-transparent overlay */
    border-radius: 8px; /* Match the container's border-radius */
    z-index: 10;
}

body.light-mode .locked-feature::after {
    background: rgba(249, 250, 251, 0.85); /* Light semi-transparent overlay */
}

.locked-feature-message {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    transform: translate(-50%, -50%);
    z-index: 11;
    color: var(--text-color);
    text-align: center;
    padding: 20px;
    pointer-events: all; /* IMPORTANT: Allow clicking the upgrade button */
}

.locked-feature-message h4 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    font-weight: 600;
}

.locked-feature-message p {
    font-size: 0.95em;
    margin-bottom: 20px;
    color: var(--subtle-text-color);
}

.locked-feature-message .button {
    font-weight: 600;
}