/* =========================================
   CRITICAL: Font Loading Strategy
   ========================================= */
@font-face {
    font-family: 'Inter';
    font-display: swap;
    /* Immediate text render with fallback */
    src: local('Inter'), local('-apple-system'), local('BlinkMacSystemFont');
}

/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    /* --- Brand Colors (Bluesky Palette) --- */
    --primary: #0085ff;
    --primary-hover: #0060df;
    --accent: #00e0ff;

    /* --- Functional Colors --- */
    --success: #00c853;
    --danger: #ff3d00;
    --warning: #ffab00;

    /* --- Dark Mode Variables (DEFAULT) --- */
    --bg: #111822;
    /* Deep Blue/Black Background */
    --text: #ffffff;
    --text-muted: #8899ac;

    /* Glassmorphism (Dark) */
    --card-bg: rgba(28, 39, 54, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Input/Elements */
    --input-bg: rgba(0, 0, 0, 0.3);
    --input-border: 1px solid rgba(255, 255, 255, 0.1);

    /* Navbar */
    --nav-bg: rgba(17, 24, 34, 0.85);
}

/* --- Light Mode Overrides --- */
body.light-mode {
    --bg: #f5f7fa;
    --text: #111822;
    --text-muted: #5f6b7c;

    /* Glassmorphism (Light) */
    --card-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
    --shadow: 0 8px 32px rgba(0, 133, 255, 0.1);

    /* Input/Elements */
    --input-bg: #ffffff;
    --input-border: 1px solid #e1e8ed;

    /* Navbar */
    --nav-bg: rgba(255, 255, 255, 0.9);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

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

/* Utility: Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: var(--glass-border);
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.logo-icon {
    width: 48px;
    height: 48px;
    display: block;
}

/* Navigation */
.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
}

#mainNav ul {
    display: flex;
    gap: 1.5rem;
}

#mainNav a {
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

#mainNav a:hover {
    color: var(--primary);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s;
}

.theme-toggle:hover {
    transform: rotate(15deg);
    color: var(--warning);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================
   3. HERO SECTION & TOOL INTERFACE
   ========================================= */
.hero {
    padding: 8rem 0 4rem;
    text-align: center;
}

/* Hero h1 and subtitle should be centered */
.hero h1,
.hero>.container>p,
.hero .new-launch {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Article content left alignment (paragraphs and headings inside article cards) */
.article-card h2,
.article-card h3,
.article-card h4,
.article-card p,
.article-card li,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content p,
.article-content li {
    text-align: left;
}

/* Override hero margin for article content paragraphs */
.article-card p,
.article-card li,
.article-content p,
.article-content li {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.new-launch {
    display: inline-block;
    background: rgba(0, 133, 255, 0.15);
    color: var(--primary);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 133, 255, 0.3);
    margin-bottom: 2.5rem;
}

/* --- Download Form Container --- */
.download-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    text-align: left;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 0.6rem 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.tab-btn.active {
    background: rgba(0, 133, 255, 0.15);
    color: var(--primary);
    border-color: rgba(0, 133, 255, 0.3);
}

/* Input Fields */
.input-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 14px;
    background: var(--input-bg);
    border: var(--input-border);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 133, 255, 0.2);
}

/* Dropdown Arrow & Layout */
.form-select {
    width: 100%;
    padding: 12px 40px 12px 15px;
    background-color: var(--input-bg);
    border: var(--input-border);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    cursor: pointer;

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
}

body.light-mode .form-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23111822'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
}

.textarea-large {
    min-height: 120px;
    resize: vertical;
}

.helper-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #0060df);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 133, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 133, 255, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

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

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-info {
    background: #3b82f6;
    color: white;
}

.btn-text {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--input-border);
    margin-top: 15px;
    width: 100%;
    border-radius: 10px;
    text-decoration: none;
}

.btn-text:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(0, 133, 255, 0.05);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    height: 40px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 0.8rem;
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
}

/* =========================================
   4. BATCH & HISTORY STYLES
   ========================================= */

/* Header & Controls */
#batchProfileInput .options-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

#batchProfileInput .options-row label {
    white-space: nowrap;
    min-width: fit-content;
}

#batchProfileInput .options-row select {
    flex-grow: 1;
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 20px;
}

.batch-header div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    background: rgba(0, 133, 255, 0.2);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.batch-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.batch-controls select {
    flex: 1;
    min-width: 150px;
}

.batch-controls button {
    flex: 0 0 auto;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* List Container */
.batch-list {
    max-height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
    /* Prevent horizontal scrollbar */
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px;
}

.batch-list::-webkit-scrollbar {
    width: 8px;
}

.batch-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Light mode override for batch-list */
body.light-mode .batch-list {
    background: var(--card-bg);
    /* Use same as Single Video tab */
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .batch-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

/* FIX: Optimized Grid for Batch Items */
.batch-item {
    display: grid;
    /* 1. Checkbox (18px) | 2. Thumb (75px) | 3. Info (Fill) | 4. Meta (Auto Fit) */
    grid-template-columns: 18px 75px 1fr auto;
    gap: 12px;
    align-items: center;

    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 6px;
    transition: background 0.2s;

    /* Ensure item doesn't overflow container */
    max-width: 100%;
    overflow: hidden;
}

.batch-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.batch-item img {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* === BATCH INFO STRUCTURE === */
.batch-info {
    overflow: hidden;
    min-width: 0;
    /* Critical for text-overflow to work in grid */
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* 8px spacing system (reduced for tighter layout) */
    font-variant-numeric: tabular-nums;
    /* Aligned number widths */
}

/* Typography Scale: Title > Meta > Status */
.batch-info-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Meta line: date • size OR user • format • date */
.batch-info-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.4;
    flex-wrap: wrap;
    /* Allow wrapping on very small screens */
}

.batch-info-meta span {
    white-space: nowrap;
}

.meta-sep {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
}

body.light-mode .meta-sep {
    color: rgba(0, 0, 0, 0.3);
}

.meta-size,
.meta-date,
.meta-user,
.meta-format {
    font-variant-numeric: tabular-nums;
}

/* Status and Action Areas */
.batch-info-status,
.batch-info-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    transition: all 0.3s ease;
}

/* Status Badge Color Variants */
.status-waiting {
    background: rgba(255, 171, 0, 0.15);
    color: #ffab00;
    border: 1px solid rgba(255, 171, 0, 0.3);
}

.status-downloading {
    background: rgba(0, 133, 255, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 133, 255, 0.3);
}

.status-complete {
    background: rgba(0, 200, 83, 0.15);
    color: var(--success);
    border: 1px solid rgba(0, 200, 83, 0.3);
}

.status-error {
    background: rgba(255, 61, 0, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 61, 0, 0.3);
}

/* Optional pulse animation for active downloading */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.status-downloading {
    animation: pulse 2s ease-in-out infinite;
}

/* History Link Styling */
.history-link {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.history-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Legacy support - keep for any old references */
.batch-item h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.batch-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* FIX: Checkbox Alignment - Now at start */
.batch-item-actions {
    display: flex;
    justify-content: center;
    align-items: center;
}

.batch-item-actions input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

/* FIX: HISTORY Override - Same layout as batch but without checkbox */
#historyList .batch-item {
    /* Thumb (75px) | Info (Fill) */
    grid-template-columns: 75px 1fr;
    gap: 12px;
}

/* Bigger Title for History */
#historyList .batch-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

#historyList .batch-item p,
#historyList .batch-item a {
    font-size: 0.8rem;
    color: var(--text-muted);
}

#historyList .batch-item a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* =========================================
   5. RESULTS SECTION
   ========================================= */
#resultContainer {
    margin-top: 3rem;
    margin-bottom: 4rem;
}

.result-card {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Inline result card - appears inside the same container as input */
.result-card-inline {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.4s ease-out;
}

body.light-mode .result-card-inline {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.meta-container {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 1.5rem;
}

.meta-container-center {
    text-align: center;
    margin-bottom: 1rem;
}

.preview-img,
.thumbnail-box {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 100%;
}

.thumbnail-box {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.meta-info h3,
.meta-info-center h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: var(--text);
}

.meta-info p,
.meta-info-center p {
    color: var(--text-muted);
}

.quality-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

/* Light mode override for quality-box */
body.light-mode .quality-box {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.options-row {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.option-half {
    flex: 1;
}

.action-buttons-center {
    text-align: center;
    margin-top: 1rem;
}

.progress-area {
    margin-top: 1rem;
    text-align: center;
    display: none;
}

.progress-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    transition: width 0.3s;
}

#statusText {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.post-download-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

#clipEditor {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

#clipEditor h4 {
    margin-bottom: 15px;
    color: var(--text);
}

#clipPlayer {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
    background: black;
}

.time-inputs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.time-inputs div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.time-inputs label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.time-inputs input {
    width: 70px;
    padding: 5px;
    text-align: center;
    border-radius: 5px;
    border: none;
    background: var(--input-bg);
    color: var(--text);
}

/* =========================================
   6. FEATURES SECTION
   ========================================= */
.features-section {
    padding: 4rem 0;
}

.section-heading {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    color: var(--text);
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--text);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   7. HOW TO USE & ARTICLE
   ========================================= */
.how-it-works {
    padding: 4rem 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step-card {
    padding: 2.5rem 2rem;
    position: relative;
    text-align: center;
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-card:hover {
    transform: translateY(-10px);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 133, 255, 0.3);
}

.step-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 1.25rem;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Article */
.article-section {
    padding: 4rem 0;
}

.article-card {
    padding: 3rem;
}

.article-card h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.article-card h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 1.4rem;
}

.article-card h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 600;
}

.article-card p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.article-card strong {
    color: var(--text);
    font-weight: 600;
}

.article-card em {
    font-style: italic;
    color: var(--text-muted);
}

/* Legal section styling for static pages (about, privacy, terms, etc.) */
.legal-divider {
    margin: 2rem 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .legal-divider {
    border-top-color: rgba(0, 0, 0, 0.15);
}

.legal-notice {
    font-size: 0.9em;
    color: var(--text-muted);
    font-style: italic;
}

/* List styles moved to unified section below at line ~1478 */

.last-updated {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* =========================================
   8. FAQ SECTION
   ========================================= */
.faq-section {
    padding: 4rem 0;
}

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

.faq-item {
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.2s;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.05);
}

.faq-question h3 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--text);
}

.faq-question i {
    transition: transform 0.3s;
    color: var(--primary);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: rgba(0, 0, 0, 0.1);
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 1rem 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--text-muted);
    margin: 0;
}

/* =========================================
   9. FOOTER
   ========================================= */
footer {
    background: var(--nav-bg);
    border-top: var(--glass-border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--primary);
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* =========================================
   10. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {

    /* Container padding */
    .container {
        width: 95%;
        padding: 0 10px;
    }

    /* Header */
    .mobile-menu-btn {
        display: block;
    }

    #mainNav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem;
        display: none;
        flex-direction: column;
    }

    #mainNav.active {
        display: flex;
    }

    #mainNav ul {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        text-align: center;
    }

    .nav-wrapper {
        gap: 1rem;
    }

    /* Hero */
    .hero {
        padding: 6rem 0 3rem;
    }

    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .download-form {
        padding: 1.5rem;
    }

    /* Tabs - 2x2 Grid on mobile for discoverability */
    .tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        /* 2 columns */
        gap: 8px;
        margin-bottom: 1.5rem;
    }

    .tab-btn {
        padding: 0.65rem 0.5rem;
        font-size: 0.85rem;
        text-align: center;
        white-space: normal;
        /* Allow text wrapping if needed */
        line-height: 1.3;
    }

    /* Form */
    .input-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    /* Tool Options */
    .options-row {
        flex-direction: column;
        align-items: stretch;
    }

    .option-half {
        width: 100%;
    }

    .batch-controls {
        flex-direction: column;
        gap: 10px;
    }

    .batch-controls select,
    .batch-controls button {
        width: 100%;
        min-width: 0;
        margin-bottom: 0;
    }

    /* Batch items - more compact on mobile */
    .batch-item {
        grid-template-columns: 16px 50px 1fr;
        gap: 8px;
        padding: 8px 10px;
    }

    .batch-item img {
        width: 50px;
        height: 50px;
    }

    /* Metadata wraps to new line on mobile */
    .batch-info-meta {
        font-size: 0.75rem;
    }

    /* Status badge smaller on mobile */
    .status-badge {
        font-size: 0.7rem;
        padding: 2px 8px;
    }

    /* History on mobile */
    #historyList .batch-item {
        grid-template-columns: 50px 1fr;
        gap: 8px;
    }

    /* Result cards */
    .result-card {
        padding: 1.5rem;
    }

    .meta-container {
        flex-direction: column;
        text-align: center;
    }

    .thumbnail-box {
        width: 100px;
        height: 100px;
    }

    .quality-box {
        padding: 1rem;
    }

    /* Features grid */
    .features-grid,
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Batch header stacks better on mobile */
    .batch-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .batch-header div:first-child {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .download-form {
        padding: 1rem;
    }

    .tab-btn {
        padding: 0.45rem 0.7rem;
        font-size: 0.8rem;
    }

    .batch-item {
        grid-template-columns: 14px 45px 1fr;
        gap: 6px;
    }

    .batch-item img {
        width: 45px;
        height: 45px;
    }

    #historyList .batch-item {
        grid-template-columns: 45px 1fr;
    }
}

/* =========================================
   11. ARTICLE / CONTENT LIST TYPOGRAPHY
   ========================================= */

/*
 * These styles apply ONLY to content areas:
 * - .article-card (static pages: about, history, privacy, terms, etc.)
 * - .article-content (blog posts)
 * - .article-section .article-card (homepage article section)
 */

/* ---- UNIFIED LIST STYLES ---- */

.article-card ul,
.article-card ol,
.article-content ul,
.article-content ol {
    margin: 1rem 0 1rem 1.5rem;
    padding-left: 0.5rem;
    list-style-position: outside;
}

/* Unordered Lists - Blue disc bullets */
.article-card ul,
.article-content ul {
    list-style-type: disc !important;
}

/* Ordered Lists - Blue decimal numbers */
.article-card ol,
.article-content ol {
    list-style-type: decimal !important;
}

/* List Items - Proper spacing and alignment */
.article-card li,
.article-content li {
    margin-bottom: 0.6rem;
    line-height: 1.7;
    color: var(--text-muted);
    padding-left: 0.25rem;
}

/* Blue colored list markers using ::marker */
.article-card li::marker,
.article-content li::marker {
    color: var(--primary);
    font-weight: 700;
}

/* Ensure strong text inside list items is visible */
.article-card li strong,
.article-content li strong {
    color: var(--text);
}

/* Nested Lists - Reduced spacing */
.article-card ul ul,
.article-card ol ol,
.article-card ul ol,
.article-card ol ul,
.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
    margin: 0.4rem 0 0.4rem 1rem;
}