/* ============================================
   TIK4DOWN - TikTok Downloader Styles
   Color Scheme: TikTok Pink (#fe2c55) + Teal (#25f4ee)
   ============================================ */

/* ---------- RESET & VARIABLES ---------- */
:root {
    /* TikTok Colors */
    --primary: #fe2c55;
    --primary-light: #ff6b8a;
    --primary-dark: #d41e43;
    --secondary: #25f4ee;
    --secondary-dark: #00c9c0;
    --accent-gradient: linear-gradient(135deg, #fe2c55, #25f4ee);
    --accent-gradient-reverse: linear-gradient(135deg, #25f4ee, #fe2c55);

    /* Dark Theme (default) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a28;
    --bg-card-hover: #222236;
    --bg-input: #1e1e2e;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b5;
    --text-muted: #707088;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(254, 44, 85, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Sizing */
    --container-max: 1200px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 50px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f5f5fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f8;
    --bg-input: #f0f0f8;
    --text-primary: #1a1a2e;
    --text-secondary: #555570;
    --text-muted: #888898;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 30px rgba(254, 44, 85, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.06);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

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

img {
    max-width: 100%;
    display: block;
}

/* ---------- DYNAMIC BACKGROUND LOGOS ---------- */
.bg-logos {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-logo {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
    transition: transform 0.1s linear;
}

.bg-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(20%);
}

/* Logo 1 — Large, top-right, slow spin */
.bg-logo-1 {
    width: 500px;
    height: 500px;
    top: -80px;
    right: -120px;
    opacity: 0.04;
    animation: bgSpin 60s linear infinite, bgPulse 8s ease-in-out infinite;
}

/* Logo 2 — Medium, bottom-left, reverse spin */
.bg-logo-2 {
    width: 380px;
    height: 380px;
    bottom: 10%;
    left: -100px;
    opacity: 0.035;
    animation: bgSpinReverse 45s linear infinite;
}

/* Logo 3 — Small, center-right, faster spin */
.bg-logo-3 {
    width: 220px;
    height: 220px;
    top: 55%;
    right: 5%;
    opacity: 0.05;
    animation: bgSpin 30s linear infinite, bgFloat 12s ease-in-out infinite;
}

/* Logo 4 — Extra small, top-left accent */
.bg-logo-4 {
    width: 180px;
    height: 180px;
    top: 30%;
    left: 8%;
    opacity: 0.03;
    animation: bgSpinReverse 80s linear infinite, bgFloat 15s ease-in-out infinite alternate;
}

/* Logo 5 — Medium-large, bottom-right, gentle spin */
.bg-logo-5 {
    width: 420px;
    height: 420px;
    bottom: -120px;
    right: 15%;
    opacity: 0.04;
    animation: bgSpin 50s linear infinite, bgPulse 10s ease-in-out infinite 3s;
}

@keyframes bgSpin {
    from {
        rotate: 0deg;
    }

    to {
        rotate: 360deg;
    }
}

@keyframes bgSpinReverse {
    from {
        rotate: 360deg;
    }

    to {
        rotate: 0deg;
    }
}

@keyframes bgFloat {

    0%,
    100% {
        translate: 0 0;
    }

    50% {
        translate: 15px -20px;
    }
}

@keyframes bgPulse {

    0%,
    100% {
        scale: 1;
        filter: grayscale(20%) brightness(1);
    }

    50% {
        scale: 1.05;
        filter: grayscale(10%) brightness(1.15);
    }
}

/* Light theme — slightly more visible */
[data-theme="light"] .bg-logo-1 {
    opacity: 0.06;
}

[data-theme="light"] .bg-logo-2 {
    opacity: 0.05;
}

[data-theme="light"] .bg-logo-3 {
    opacity: 0.07;
}

[data-theme="light"] .bg-logo-4 {
    opacity: 0.045;
}

[data-theme="light"] .bg-logo-5 {
    opacity: 0.055;
}

/* Mobile — reduce count and size */
@media (max-width: 768px) {

    .bg-logo-4,
    .bg-logo-5 {
        display: none;
    }

    .bg-logo-1 {
        width: 280px;
        height: 280px;
    }

    .bg-logo-2 {
        width: 220px;
        height: 220px;
    }

    .bg-logo-3 {
        width: 150px;
        height: 150px;
    }
}

/* ---------- HEADER ---------- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

[data-theme="light"] .main-header {
    background: rgba(255, 255, 255, 0.85);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 36px;
    width: auto;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Theme Toggle */
.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 500;
}

.lang-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.lang-flag {
    font-size: 1.1rem;
}

.lang-arrow {
    font-size: 0.65rem;
    transition: transform 0.3s ease;
}

.language-selector.active .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    min-width: 240px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 100;
    max-height: 70vh;
    overflow-y: auto;
}

.lang-search-wrap {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.lang-search-wrap i {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.lang-search-input {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.82rem;
    outline: none;
}

.lang-search-input::placeholder {
    color: var(--text-muted);
}

.language-selector.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.lang-option:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.lang-option.active {
    background: rgba(254, 44, 85, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.lang-empty-state {
    display: none;
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

@media (max-width: 640px) {
    .lang-dropdown {
        min-width: min(86vw, 280px);
    }
}

/* ---------- HERO SECTION ---------- */
.hero {
    position: relative;
    padding: 140px 0 60px;
    overflow: hidden;
    text-align: center;
    min-height: 500px;
    z-index: 1;
}

.hero-bg-effects {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: floatOrb 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    top: 50%;
    right: -80px;
    animation-delay: -7s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: var(--primary-light);
    bottom: -50px;
    left: 40%;
    animation-delay: -14s;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -20px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(15px, 10px) scale(1.02);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-text h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

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

.hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---------- SEARCH CARD ---------- */
.search-card {
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.search-card:hover {
    box-shadow: var(--shadow-glow);
    border-color: rgba(254, 44, 85, 0.2);
}

.search-card form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
    transition: var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.1);
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.input-wrapper input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 12px 4px;
    font-family: inherit;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.paste-btn,
.clear-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
    flex-shrink: 0;
}

.paste-btn:hover,
.clear-btn:hover {
    color: var(--primary);
    background: rgba(254, 44, 85, 0.08);
}

/* Submit Button */
.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 44, 85, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Error Toast */
.error-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(254, 44, 85, 0.1);
    border: 1px solid rgba(254, 44, 85, 0.2);
    color: var(--primary);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-top: 8px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

/* ---------- MULTI-URL MODE ---------- */
.multi-url-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.multi-url-toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding: 5px 10px 5px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.25s ease, border-color 0.25s ease;
}

.multi-url-toggle-switch:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
}

.multi-url-toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.multi-url-toggle-track {
    position: relative;
    width: 44px;
    height: 23px;
    border-radius: 999px;
    background: #dc2626;
    border: 2px solid #ef4444;
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.multi-url-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.multi-url-toggle-thumb::after {
    content: "✕";
    color: #dc2626;
    font-weight: 900;
    font-size: 0.45rem;
}

.multi-url-toggle-switch input:checked+.multi-url-toggle-track {
    background: #16a34a;
    border-color: #22c55e;
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.multi-url-toggle-switch input:checked+.multi-url-toggle-track .multi-url-toggle-thumb {
    transform: translateX(21px);
}

.multi-url-toggle-switch input:checked+.multi-url-toggle-track .multi-url-toggle-thumb::after {
    content: "✓";
    color: #16a34a;
}

.multi-url-toggle-switch:hover .multi-url-toggle-track {
    transform: scale(1.05);
}

.multi-url-toggle-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    transition: color 0.25s ease;
}

.multi-url-toggle-switch input:checked~.multi-url-toggle-label {
    color: #22c55e;
}

.multi-url-toggle-hint {
    font-size: 0.73rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* Multi-URL Input Area */
.multi-url-input-area {
    margin-top: 16px;
    display: grid;
    gap: 12px;
    animation: fadeInUp 0.35s ease;
}

/* Paste Input Wrapper */
.multi-url-paste-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.multi-url-paste-icon {
    position: absolute;
    left: 16px;
    font-size: 0.88rem;
    color: var(--text-muted);
    opacity: 0.6;
    pointer-events: none;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.multi-url-paste-input {
    width: 100%;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 13px 16px 13px 42px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.multi-url-paste-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.multi-url-paste-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.1);
}

.multi-url-paste-input:focus~.multi-url-paste-icon,
.multi-url-paste-wrapper:focus-within .multi-url-paste-icon {
    color: var(--primary);
    opacity: 1;
}

/* Chip Container */
.multi-url-chip-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    padding: 4px 2px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.multi-url-chip-container::-webkit-scrollbar {
    width: 5px;
}

.multi-url-chip-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}

/* Empty State */
.multi-url-chip-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 16px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.82rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.multi-url-chip-empty i {
    font-size: 0.88rem;
    opacity: 0.5;
}

/* Individual Chip Card */
.multi-url-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    animation: chipSlideIn 0.25s ease;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

@keyframes chipSlideIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }

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

.multi-url-chip:hover {
    border-color: rgba(254, 44, 85, 0.3);
    background: rgba(254, 44, 85, 0.03);
}

.multi-url-chip.is-removing {
    animation: chipSlideOut 0.2s ease forwards;
}

@keyframes chipSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }
}

.multi-url-chip-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.15), rgba(37, 244, 238, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    color: var(--primary);
}

.multi-url-chip-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.multi-url-chip-user {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.multi-url-chip-dot {
    color: var(--text-muted);
    opacity: 0.4;
    font-size: 0.5rem;
}

.multi-url-chip-vid {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Fira Code', monospace;
    letter-spacing: 0.01em;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.multi-url-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.5;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.multi-url-chip-remove:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    opacity: 1;
    transform: scale(1.1);
}


.multi-url-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.multi-url-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--secondary);
    padding: 5px 12px;
    border-radius: 10px;
    border: 1px solid rgba(37, 244, 238, 0.35);
    background: rgba(37, 244, 238, 0.1);
}

.multi-url-count i {
    font-size: 0.68rem;
    opacity: 0.75;
}

.multi-url-count.has-urls {
    color: var(--primary);
    border-color: rgba(254, 44, 85, 0.35);
    background: rgba(254, 44, 85, 0.1);
}

.multi-url-count.at-limit {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.1);
}

.multi-url-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.multi-url-clear-btn i {
    font-size: 0.72rem;
    opacity: 0.7;
}

.multi-url-clear-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(254, 44, 85, 0.4);
    background: rgba(254, 44, 85, 0.08);
}

/* Multi-URL Submit Button */
.multi-url-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.92), rgba(37, 244, 238, 0.82));
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.multi-url-submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.multi-url-submit-btn:hover:not(:disabled)::before {
    opacity: 1;
}

.multi-url-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 44, 85, 0.35);
}

.multi-url-submit-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.multi-url-submit-btn .btn-spinner {
    display: none;
}

.multi-url-submit-btn.is-loading .btn-text {
    display: none;
}

.multi-url-submit-btn.is-loading .btn-spinner {
    display: inline-flex !important;
}

.multi-url-submit-btn.is-loading>i:first-child {
    display: none;
}

/* ---------- MULTI-URL MODAL ITEMS ---------- */
.multi-url-modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.multi-url-modal-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.15), rgba(37, 244, 238, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
    color: var(--primary);
    transition: background 0.2s ease;
}

.multi-url-modal-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.multi-url-modal-item-user {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}

.multi-url-modal-item-id {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Fira Code', monospace;
    letter-spacing: 0.02em;
    opacity: 0.75;
}

.multi-url-modal-item-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.multi-url-modal-item-badge i {
    font-size: 0.62rem;
}

/* Queued state */
.multi-url-modal-item-badge.is-queued {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Processing state */
.multi-url-modal-item.is-processing {
    border-color: rgba(37, 244, 238, 0.3);
    background: rgba(37, 244, 238, 0.03);
}

.multi-url-modal-item-badge.is-processing {
    background: rgba(37, 244, 238, 0.12);
    color: var(--secondary);
    border: 1px solid rgba(37, 244, 238, 0.3);
    animation: multiUrlPulse 1.5s ease-in-out infinite;
}

@keyframes multiUrlPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.65;
    }
}

/* Done state */
.multi-url-modal-item.is-done {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.04);
}

.multi-url-modal-item.is-done .multi-url-modal-item-icon {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.multi-url-modal-item-badge.is-done {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Failed state */
.multi-url-modal-item.is-failed {
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.04);
}

.multi-url-modal-item.is-failed .multi-url-modal-item-icon {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.multi-url-modal-item-badge.is-failed {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}


/* ---------- RESULTS SECTION ---------- */
.results-section {
    padding: 40px 0 60px;
    animation: fadeInUp 0.5s ease;
    position: relative;
    z-index: 1;
}

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

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

/* Video Preview Card */
.video-preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-md);
}

.video-preview-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    gap: 24px;
    align-items: stretch;
}

.video-preview-content {
    display: flex;
    gap: 20px;
    align-items: center;
}

.video-preview-card--merged .video-preview-content {
    order: 1;
    align-items: center;
    padding: 14px;
    border-radius: calc(var(--radius-lg) - 6px);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.video-preview-card--merged .video-preview-content::before {
    content: "";
    position: absolute;
    inset: -16px;
    background-image: var(--preview-bg-image, radial-gradient(circle at 20% 20%, rgba(254, 44, 85, 0.28), transparent 56%), radial-gradient(circle at 88% 82%, rgba(37, 244, 238, 0.22), transparent 60%));
    background-size: cover;
    background-position: center;
    filter: blur(24px) saturate(1.24);
    transform: scale(1.06);
    opacity: 0.5;
    z-index: 0;
}

.video-preview-card--merged .video-preview-content::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(9, 10, 21, 0.74) 6%, rgba(9, 10, 21, 0.52) 46%, rgba(9, 10, 21, 0.8) 100%);
    z-index: 1;
}

.video-preview-card--merged .video-preview-content>* {
    position: relative;
    z-index: 2;
}

.video-preview-card--merged .video-format-panel {
    order: 2;
}

.video-preview-card--merged .video-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-height: 100%;
}

.thumbnail-wrapper {
    position: relative;
    width: 160px;
    min-width: 160px;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 9/16;
    background: linear-gradient(165deg, rgba(254, 44, 85, 0.12), rgba(37, 244, 238, 0.08));
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.video-info {
    flex: 1;
    min-width: 0;
    max-width: 60ch;
}

.video-title {
    font-size: 1.02rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 48ch;
}

.video-description {
    margin: -2px 0 4px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 56ch;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-top: 6px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-value {
    font-size: 0.88rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.96);
}

/* Author Row */
.author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.author-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.author-name i {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.author-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.author-link-text {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.author-link:disabled {
    cursor: default;
    opacity: 0.95;
}

.author-expand-icon {
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.author-link.expanded .author-expand-icon {
    transform: rotate(180deg);
}

.profile-latest-section {
    margin-top: 18px;
    display: grid;
    gap: 14px;
}

.profile-feature-info {
    margin-top: 14px;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 12px 0 0;
}

.profile-feature-info h4 {
    margin: 0 0 6px;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.profile-feature-info p {
    margin: 0 0 8px;
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.profile-feature-info ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.profile-feature-info li {
    font-size: 0.79rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.profile-feature-info li i {
    color: var(--primary);
    font-size: 0.72rem;
    margin-top: 3px;
    flex-shrink: 0;
    opacity: 0.8;
}

.profile-feature-info h4 i {
    color: var(--secondary);
    margin-right: 4px;
    opacity: 0.7;
}

.profile-posts-panel {
    margin: 0;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    text-align: left;
    overflow: hidden;
}

.profile-posts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-posts-heading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.profile-posts-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0;
}

.profile-posts-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(37, 244, 238, 0.35);
    background: rgba(37, 244, 238, 0.1);
    color: var(--secondary);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.profile-posts-status {
    font-size: 0.76rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    min-height: 28px;
    overflow-wrap: anywhere;
    text-align: center;
}

.profile-posts-status:empty {
    display: none;
}

.profile-posts-status.loading::before {
    content: "";
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--secondary);
    animation: t4dSpin 0.8s linear infinite;
}

.profile-posts-status.warn {
    color: #f59e0b;
}

.profile-posts-status.error {
    color: var(--primary);
}

.profile-bulk-toolbar {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Toggle Switch ── */
.bulk-toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding: 5px 10px 5px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.25s ease, border-color 0.25s ease;
}

.bulk-toggle-switch:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
}

.bulk-toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.bulk-toggle-track {
    position: relative;
    width: 44px;
    height: 23px;
    border-radius: 999px;
    background: #dc2626;
    border: 2px solid #ef4444;
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.bulk-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bulk-toggle-thumb::after {
    content: "✕";
    color: #dc2626;
    font-weight: 900;
    font-size: 0.45rem;
}

.bulk-toggle-switch input:checked+.bulk-toggle-track {
    background: #16a34a;
    border-color: #22c55e;
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.bulk-toggle-switch input:checked+.bulk-toggle-track .bulk-toggle-thumb {
    transform: translateX(21px);
}

.bulk-toggle-switch input:checked+.bulk-toggle-track .bulk-toggle-thumb::after {
    content: "✓";
    color: #16a34a;
}

.bulk-toggle-switch:hover .bulk-toggle-track {
    transform: scale(1.05);
}

.bulk-toggle-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    transition: color 0.25s ease;
}

.bulk-toggle-switch input:checked~.bulk-toggle-label {
    color: #22c55e;
}

/* ── Professional Controls ── */
.profile-bulk-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 6px 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.profile-bulk-control-btn,
.profile-bulk-prepare-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 7px 14px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.profile-bulk-control-btn {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.profile-bulk-control-btn i {
    font-size: 0.72rem;
    opacity: 0.7;
}

.profile-bulk-prepare-btn {
    background: linear-gradient(135deg, rgba(254, 44, 85, 0.85), rgba(37, 244, 238, 0.75));
    border-color: transparent;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.profile-bulk-prepare-btn i {
    font-size: 0.72rem;
}

.profile-bulk-control-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(37, 244, 238, 0.4);
    background: rgba(255, 255, 255, 0.1);
}

.profile-bulk-prepare-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(254, 44, 85, 0.3);
}

.profile-bulk-control-btn:disabled,
.profile-bulk-prepare-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.profile-bulk-selection-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 10px;
    border: 1px solid rgba(254, 44, 85, 0.3);
    background: rgba(254, 44, 85, 0.1);
}

.profile-bulk-selection-count i {
    font-size: 0.68rem;
    opacity: 0.75;
}

.bulk-count-text {
    white-space: nowrap;
}

.profile-bulk-progress {
    margin-top: 10px;
    display: grid;
    gap: 6px;
}

.profile-bulk-progress-bar-wrapper {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.profile-bulk-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    background-size: 180% 100%;
    transition: width 0.25s ease;
}

.profile-bulk-progress.is-active .profile-bulk-progress-bar {
    animation: profileBulkProgressFlow 1.4s linear infinite;
}

@keyframes profileBulkProgressFlow {
    0% {
        background-position: 180% 0;
    }

    100% {
        background-position: -180% 0;
    }
}

.profile-bulk-progress-text {
    font-size: 0.76rem;
    color: var(--text-secondary);
}

.profile-posts-list {
    margin-top: 12px;
    display: flex;
    align-items: stretch;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(254, 44, 85, 0.45) transparent;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.profile-posts-list::-webkit-scrollbar {
    height: 7px;
}

.profile-posts-list::-webkit-scrollbar-track {
    background: transparent;
}

.profile-posts-list::-webkit-scrollbar-thumb {
    background: rgba(254, 44, 85, 0.45);
    border-radius: 999px;
}

.profile-post-card {
    position: relative;
    width: 116px;
    min-width: 116px;
    max-width: 116px;
    flex: 0 0 116px;
    aspect-ratio: 9 / 16;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card-hover);
    padding: 0;
    display: block;
    font: inherit;
    color: inherit;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.profile-post-card:hover,
.profile-post-card:focus-visible {
    border-color: rgba(254, 44, 85, 0.55);
    transform: translateY(-2px);
    outline: none;
}

.profile-post-card.is-active {
    border-color: rgba(37, 244, 238, 0.85);
    box-shadow: 0 0 0 2px rgba(37, 244, 238, 0.18);
}

.profile-post-card.is-loading {
    pointer-events: none;
    border-color: rgba(37, 244, 238, 0.8);
}

.profile-post-card.is-selected {
    border-color: rgba(254, 44, 85, 0.88);
    box-shadow: 0 0 0 2px rgba(254, 44, 85, 0.2);
}

.profile-post-card.is-bulk-ready {
    border-color: rgba(34, 197, 94, 0.68);
}

.profile-post-card.is-bulk-partial {
    border-color: rgba(245, 158, 11, 0.68);
}

.profile-post-card.is-bulk-failed {
    border-color: rgba(239, 68, 68, 0.7);
}

.profile-post-card.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 16, 0.6);
    z-index: 4;
}

.profile-post-thumb,
.profile-post-thumb-fallback {
    width: 100%;
    height: 100%;
}

.profile-post-thumb {
    display: block;
    object-fit: cover;
}

.profile-post-thumb-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    background: linear-gradient(160deg, rgba(254, 44, 85, 0.14), rgba(37, 244, 238, 0.08));
}

.profile-post-thumb-fallback i {
    font-size: 1.6rem;
    opacity: 0.45;
}

.profile-post-select-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 6;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: rgba(8, 10, 16, 0.58);
    color: #fff;
    font-size: 0.72rem;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.15s ease, transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
    pointer-events: none;
}

.profile-posts-panel.is-bulk-mode .profile-post-select-indicator {
    opacity: 1;
    transform: scale(1);
}

.profile-post-card.is-selected .profile-post-select-indicator {
    background: rgba(254, 44, 85, 0.92);
    border-color: rgba(254, 44, 85, 0.95);
}

.profile-post-bulk-status {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 6;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #fff;
    background: rgba(0, 0, 0, 0.58);
    pointer-events: none;
}

.profile-post-bulk-status.state-ready {
    display: inline-flex;
    background: rgba(22, 163, 74, 0.85);
}

.profile-post-bulk-status.state-partial {
    display: inline-flex;
    background: rgba(217, 119, 6, 0.86);
}

.profile-post-bulk-status.state-failed {
    display: inline-flex;
    background: rgba(220, 38, 38, 0.88);
}

.profile-post-bottom-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px 7px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
    color: #fff;
    font-size: 0.74rem;
    font-weight: 600;
}

.profile-post-order {
    color: rgba(255, 255, 255, 0.88);
}

.profile-post-plays {
    color: #fff;
}

.profile-post-hover-overlay {
    position: absolute;
    inset: auto 0 0 0;
    max-height: 70%;
    padding: 10px 8px 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.22));
    color: #fff;
    font-size: 0.74rem;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.profile-post-card:hover .profile-post-hover-overlay,
.profile-post-card:focus-visible .profile-post-hover-overlay {
    opacity: 1;
    transform: translateY(0);
}

.profile-post-card.is-loading .profile-post-hover-overlay {
    opacity: 1;
    transform: translateY(0);
    padding-bottom: 42px;
}

.profile-posts-panel.is-bulk-mode .profile-post-hover-overlay {
    display: none;
}

.profile-post-loading-indicator {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 5;
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 0.73rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 4px 8px;
}

.profile-post-card.is-loading .profile-post-loading-indicator {
    display: inline-flex;
}

.profile-posts-message {
    font-size: 0.82rem;
    color: var(--text-secondary);
    min-width: 100%;
    padding: 8px 2px;
}

.profile-posts-message.error {
    color: var(--primary);
}

.profile-bulk-download-actions {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.profile-bulk-download-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    min-height: 52px;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
    font-family: inherit;
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
}

.profile-bulk-download-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.profile-bulk-download-btn:hover:not(:disabled)::before {
    transform: translateX(100%);
}

.bulk-btn-hd {
    background: linear-gradient(135deg, #fe2c55 0%, #d41e43 50%, #25f4ee 100%);
    box-shadow: 0 4px 18px rgba(254, 44, 85, 0.3);
}

.bulk-btn-hd:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(254, 44, 85, 0.45), 0 0 0 2px rgba(254, 44, 85, 0.2);
}

.bulk-btn-mp3 {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 50%, #6366f1 100%);
    box-shadow: 0 4px 18px rgba(168, 85, 247, 0.3);
}

.bulk-btn-mp3:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(168, 85, 247, 0.45), 0 0 0 2px rgba(168, 85, 247, 0.2);
}

/* MP3 Retry Progress */
.bulk-btn-mp3.is-retrying {
    position: relative;
    overflow: hidden;
}

.bulk-btn-mp3.is-retrying::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.12) 50%, transparent 100%);
    animation: mp3RetryShimmer 1.5s infinite;
    pointer-events: none;
}

.mp3-retry-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #a855f7, #22c55e);
    border-radius: 0 999px 999px 0;
    transition: width 0.4s ease;
}

@keyframes mp3RetryShimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.bulk-btn-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
    opacity: 0.9;
}

.bulk-btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.bulk-btn-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.bulk-btn-count {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.8;
}

.bulk-btn-arrow {
    font-size: 0.78rem;
    flex-shrink: 0;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.profile-bulk-download-btn:hover:not(:disabled) .bulk-btn-arrow {
    transform: translateX(3px);
    opacity: 1;
}

.profile-bulk-download-btn:disabled {
    opacity: 0.45;
    cursor: default;
    filter: saturate(0.6);
}

.profile-posts-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.profile-posts-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    touch-action: manipulation;
}

.profile-posts-load-more-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(254, 44, 85, 0.55);
}

.profile-posts-load-more-btn:disabled {
    opacity: 0.65;
    cursor: default;
}

.format-health-status {
    margin-top: 8px;
    font-size: 0.84rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.format-health-status.ok {
    color: #22c55e;
}

.format-health-status.warn {
    color: #f59e0b;
}

.format-health-status.error {
    color: var(--primary);
}

/* Engagement Stats */
.engagement-stat {
    background: none;
    padding: 0;
    border-radius: 0;
    font-weight: 600;
    border: none;
    transition: var(--transition);
    min-width: 0;
    box-shadow: none;
    backdrop-filter: none;
    color: rgba(255, 255, 255, 0.9);
}

.engagement-stat i.fa-heart {
    color: #ef4444;
}

.engagement-stat i.fa-play {
    color: #14b8a6;
}

.engagement-stat i.fa-comment {
    color: #3b82f6;
}

.engagement-stat i {
    font-size: 0.94rem;
}

/* Format Selection */
.format-selection-wrapper,
.video-format-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-md);
}

.video-preview-card--merged .video-format-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border-radius: calc(var(--radius-lg) - 2px);
}

.format-header {
    margin-bottom: 12px;
}

.format-header h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.format-header i {
    color: var(--primary);
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.format-card {
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px 28px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.format-card:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.format-card.selected {
    border-color: var(--primary);
    background: rgba(254, 44, 85, 0.08);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.1);
}

.format-card .format-type {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.format-card .format-quality {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.format-card .format-ext {
    font-size: 0.77rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: auto;
}

/* MP3 Audio Format Card */
.format-card-audio {
    border-color: var(--border-color);
    background: var(--bg-input);
}

.format-card-audio:hover {
    border-color: #a855f7;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(168, 85, 247, 0.03));
    box-shadow: none;
}

.format-card-audio.selected {
    border-color: #a855f7;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(168, 85, 247, 0.1));
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15), 0 4px 25px rgba(168, 85, 247, 0.25);
}

.format-card-audio .format-type {
    color: #a855f7;
}

.format-card-audio .format-type i {
    margin-right: 4px;
}

/* Ultra HD Format Card */
.format-card-ultra {
    border-color: rgba(245, 158, 11, 0.35);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(234, 179, 8, 0.03));
    position: relative;
    overflow: hidden;
}

.format-card-ultra::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(245, 158, 11, 0.08) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: ultraShimmer 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ultraShimmer {

    0%,
    100% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }
}

.format-card-ultra:hover {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(234, 179, 8, 0.06));
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}

.format-card-ultra.selected {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(234, 179, 8, 0.1));
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15), 0 4px 25px rgba(245, 158, 11, 0.25);
}

.format-card-ultra .format-type {
    color: #f59e0b;
}

.format-card-ultra .format-type i {
    margin-right: 4px;
}

.ultra-badge {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.3;
    white-space: nowrap;
}

.no-wm-tag {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.3;
    white-space: nowrap;
}

/* ---------- SKELETON / PROGRESSIVE FORMAT CARDS ---------- */

/* Skeleton card — placeholder while provider is loading */
.format-card-skeleton {
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px 28px;
    text-align: center;
    height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.55;
}

.format-card-skeleton::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.06) 50%, transparent 70%);
    animation: skeletonShimmer 1.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes skeletonShimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.format-card-skeleton .skeleton-label {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.format-card-skeleton .skeleton-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    opacity: 0.6;
    margin-bottom: 8px;
}

/* Indeterminate progress bar at bottom of skeleton card */
.skeleton-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    border-radius: 0 0 14px 14px;
}

.skeleton-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    animation: skeletonProgress 1.5s ease-in-out infinite;
}

@keyframes skeletonProgress {
    0% {
        left: -40%;
    }

    100% {
        left: 100%;
    }
}

/* Entry animation for format cards appearing progressively */
.format-card-enter {
    animation: formatCardSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes formatCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }

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

/* Skeleton exit animation */
.format-card-skeleton-exit {
    animation: skeletonFadeOut 0.25s ease-out forwards;
}

@keyframes skeletonFadeOut {
    to {
        opacity: 0;
        transform: scale(0.92);
    }
}

/* Download Button */
.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 13px 20px;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    touch-action: manipulation;
}

.download-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(254, 44, 85, 0.4);
}

.download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Progress Hub */
.progress-hub {
    margin-top: 20px;
    animation: fadeInUp 0.3s ease;
}

.progress-bar-wrapper {
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Success Hub */
.success-hub {
    text-align: center;
    margin-top: 20px;
    animation: fadeInUp 0.3s ease;
}

.success-icon {
    font-size: 2.5rem;
    color: #10b981;
    margin-bottom: 8px;
}

.success-hub p {
    font-weight: 600;
    color: #10b981;
}

.btn-redownload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px auto 0;
    padding: 10px 24px;
    background: transparent;
    border: 1.5px solid #10b981;
    color: #10b981;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-redownload:hover {
    background: rgba(16, 185, 129, 0.12);
    transform: translateY(-1px);
}

.video-preview-card--merged .progress-hub,
.video-preview-card--merged .success-hub {
    margin-top: 14px;
}

.video-preview-card--merged .progress-text {
    font-size: 0.84rem;
}

.video-preview-card--merged .success-icon {
    font-size: 2.15rem;
}

.video-preview-card--merged .success-hub p {
    font-size: 0.92rem;
}

@media (max-width: 1180px) {
    .video-preview-split {
        grid-template-columns: 1fr;
    }

    .video-preview-card--merged .video-preview-content {
        order: 1;
        padding: 12px;
    }

    .video-preview-card--merged .video-format-panel {
        order: 2;
    }
}

/* Download Another */
.download-another-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px auto 0;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.download-another-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(254, 44, 85, 0.05);
}

/* ---------- FEATURES SECTION ---------- */
.features-section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 48px;
    letter-spacing: -0.02em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(254, 44, 85, 0.2);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(254, 44, 85, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.3rem;
    color: var(--primary);
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    background: var(--accent-gradient);
    color: #fff;
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---------- HOW TO SECTION ---------- */
.howto-section {
    padding: 80px 0;
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
}

.howto-steps {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.howto-step {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    position: relative;
}

.step-number {
    width: 42px;
    height: 42px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    margin: 0 auto 12px;
    box-shadow: 0 4px 15px rgba(254, 44, 85, 0.3);
}

.howto-step h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.howto-step p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

@media (max-width: 900px) {
    .howto-steps {
        flex-wrap: wrap;
    }

    .howto-step {
        flex: 0 1 calc(33.333% - 16px);
        min-width: 140px;
    }
}

@media (max-width: 576px) {
    .howto-step {
        flex: 0 1 calc(50% - 12px);
    }
}

/* ---------- FAQ SECTION ---------- */
.faq-section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--border-hover);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question i {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 12px;
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0 20px 18px;
}

.faq-answer p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ---------- SEO CONTENT SECTION ---------- */
.seo-content {
    padding: 80px 0;
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
}

.seo-content h2 {
    text-align: center;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    margin-bottom: 40px;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.seo-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}

.seo-block h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.seo-block p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Format Comparison Table */
.format-comparison {
    max-width: 700px;
    margin: 0 auto;
}

.format-comparison h3 {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 12px 16px;
    text-align: center;
    font-size: 0.9rem;
}

.comparison-table th {
    background: rgba(254, 44, 85, 0.08);
    color: var(--text-primary);
    font-weight: 600;
}

.comparison-table td {
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* ---------- LSI KEYWORDS SECTION ---------- */
.lsi-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px 24px;
}

.lsi-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lsi-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

.lsi-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(254, 44, 85, 0.06);
    border: 1px solid rgba(254, 44, 85, 0.15);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: default;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lsi-tag:hover {
    background: rgba(254, 44, 85, 0.12);
    border-color: rgba(254, 44, 85, 0.3);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(254, 44, 85, 0.1);
}

.lsi-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.lsi-question {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: default;
    transition: all 0.2s ease;
}

.lsi-question i {
    font-size: 0.65rem;
    color: rgba(59, 130, 246, 0.5);
}

.lsi-question:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.25);
    color: #3b82f6;
}

.lsi-question:hover i {
    color: #3b82f6;
}

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

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
}

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

.footer-logo {
    height: 28px;
    width: auto;
}

.footer-brand p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

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

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.footer-disclaimer {
    font-size: 0.75rem !important;
    color: var(--text-muted);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .container {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }

    .results-section {
        padding: 28px 0 44px;
    }

    .video-preview-card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .hero {
        padding: 100px 0 40px;
        min-height: auto;
    }

    .video-preview-content {
        flex-direction: column;
        text-align: center;
    }

    .thumbnail-wrapper {
        width: 120px;
        min-width: 120px;
        margin: 0 auto;
    }

    .video-title {
        font-size: 1rem;
    }

    .video-meta {
        justify-content: center;
        gap: 10px;
    }

    .author-row {
        justify-content: center;
    }

    .author-link-text {
        max-width: 180px;
    }

    .format-selection-wrapper,
    .video-format-panel {
        padding: 16px;
    }

    .format-header h3 {
        font-size: 1rem;
    }

    .profile-post-card {
        width: 102px;
        min-width: 102px;
        max-width: 102px;
        flex-basis: 102px;
    }

    .profile-latest-section {
        margin-top: 14px;
        gap: 10px;
    }

    .profile-posts-panel {
        padding: 16px;
    }

    .profile-posts-header {
        align-items: stretch;
        gap: 8px;
    }

    .profile-posts-heading {
        width: 100%;
        justify-content: space-between;
    }

    .profile-posts-status {
        width: 100%;
        justify-content: center;
    }

    .bulk-toggle-switch {
        width: 100%;
        justify-content: space-between;
    }

    .profile-bulk-controls {
        width: 100%;
    }

    .profile-bulk-control-btn,
    .profile-bulk-prepare-btn {
        flex: 1 1 calc(50% - 6px);
        min-height: 38px;
    }

    .profile-bulk-selection-count {
        width: 100%;
        text-align: center;
    }

    .profile-feature-info {
        margin-top: 12px;
        padding-top: 10px;
    }

    .profile-bulk-download-actions {
        grid-template-columns: 1fr;
    }

    .profile-bulk-download-btn {
        min-height: 48px;
    }

    .profile-posts-list {
        margin-top: 10px;
    }

    .profile-post-bottom-meta {
        font-size: 0.7rem;
        padding: 7px 7px 6px;
    }

    .profile-post-hover-overlay {
        display: none;
    }

    .profile-posts-actions {
        justify-content: center;
        margin-top: 12px;
    }

    .profile-posts-load-more-btn {
        width: 100%;
        justify-content: center;
        min-height: 40px;
    }

    .download-btn {
        padding: 12px 18px;
        font-size: 0.97rem;
    }

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

    .formats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .search-card {
        padding: 20px;
    }
}

@keyframes t4dSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    .results-section {
        padding: 22px 0 36px;
    }

    .bg-logo-3 {
        display: none;
    }

    .search-card {
        padding: 16px;
    }

    .video-preview-card,
    .format-selection-wrapper,
    .video-format-panel,
    .profile-posts-panel {
        padding: 14px;
    }

    .thumbnail-wrapper {
        width: 108px;
        min-width: 108px;
    }

    .author-avatar {
        width: 34px;
        height: 34px;
    }

    .author-link-text {
        max-width: 140px;
    }

    .video-title {
        font-size: 0.95rem;
        line-height: 1.35;
    }

    .profile-posts-title {
        font-size: 0.9rem;
    }

    .profile-posts-count {
        padding: 3px 8px;
        font-size: 0.72rem;
    }

    .profile-posts-status {
        font-size: 0.72rem;
        padding: 4px 8px;
        min-height: 26px;
    }

    .profile-posts-list {
        gap: 8px;
    }

    .profile-post-card {
        width: 88px;
        min-width: 88px;
        max-width: 88px;
        flex-basis: 88px;
    }

    .profile-post-bottom-meta {
        font-size: 0.66rem;
        padding: 6px 6px 5px;
    }

    .profile-post-loading-indicator {
        font-size: 0.67rem;
        padding: 3px 6px;
        gap: 4px;
    }

    .profile-post-select-indicator {
        width: 20px;
        height: 20px;
        top: 6px;
        right: 6px;
        font-size: 0.66rem;
    }

    .profile-post-bulk-status {
        top: 6px;
        left: 6px;
        padding: 2px 6px;
        font-size: 0.58rem;
    }

    .profile-feature-info li {
        font-size: 0.78rem;
    }

    .profile-posts-load-more-btn {
        font-size: 0.76rem;
        padding: 9px 12px;
    }

    .formats-grid {
        grid-template-columns: 1fr;
    }

    .header-content {
        padding: 12px 16px;
    }

    .lang-code {
        display: none;
    }
}

@media (max-width: 430px) {
    .profile-posts-heading {
        gap: 6px;
    }

    .profile-posts-title {
        font-size: 0.86rem;
    }

    .profile-posts-count {
        padding: 2px 7px;
        font-size: 0.68rem;
    }

    .profile-posts-status {
        font-size: 0.69rem;
    }

    .profile-post-card {
        width: 86px;
        min-width: 86px;
        max-width: 86px;
        flex-basis: 86px;
    }
}

@media (max-width: 390px) {
    .container {
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
    }

    .results-section {
        padding: 18px 0 30px;
    }

    .video-preview-card,
    .format-selection-wrapper,
    .video-format-panel,
    .profile-posts-panel {
        padding: 12px;
    }

    .profile-post-card {
        width: 82px;
        min-width: 82px;
        max-width: 82px;
        flex-basis: 82px;
    }

    .profile-posts-load-more-btn,
    .download-btn {
        min-height: 42px;
    }
}

/* ================================================
   BULK DOWNLOAD MODAL
   ================================================ */

.bulk-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: bulkModalFadeIn 0.25s ease;
}

@keyframes bulkModalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes bulkModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }

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

.bulk-modal-panel {
    width: 100%;
    max-width: 540px;
    max-height: 80vh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
    overflow: hidden;
    animation: bulkModalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bulk-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.bulk-modal-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bulk-modal-close-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.bulk-modal-close-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(254, 44, 85, 0.08);
}

.bulk-modal-progress-wrapper {
    height: 6px;
    background: var(--bg-input);
    overflow: hidden;
    position: relative;
}

.bulk-modal-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    background-size: 200% 100%;
    animation: bulkProgressShimmer 1.8s linear infinite;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes bulkProgressShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.bulk-modal-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    gap: 8px;
    flex-shrink: 0;
}

.bulk-modal-status-text {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.bulk-modal-status-counter {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
}

.bulk-modal-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding: 0 24px 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(254, 44, 85, 0.35) transparent;
}

.bulk-modal-list::-webkit-scrollbar {
    width: 5px;
}

.bulk-modal-list::-webkit-scrollbar-track {
    background: transparent;
}

.bulk-modal-list::-webkit-scrollbar-thumb {
    background: rgba(254, 44, 85, 0.35);
    border-radius: 999px;
}

.bulk-modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.bulk-modal-item-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-card-hover);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bulk-modal-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bulk-modal-item-thumb-fallback {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.bulk-modal-item-info {
    flex: 1;
    min-width: 0;
}

.bulk-modal-item-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bulk-modal-item-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.bulk-modal-item-progress-track {
    margin-top: 6px;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    display: none;
}

.bulk-modal-item-progress-track.is-active {
    display: block;
}

.bulk-modal-item-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    transition: width 0.18s linear;
}

.bulk-modal-item-progress-track.is-indeterminate .bulk-modal-item-progress-fill {
    width: 34%;
    animation: bulkIndeterminateSlide 1s ease-in-out infinite;
}

@keyframes bulkIndeterminateSlide {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(320%);
    }
}

.bulk-modal-item-status {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

/* Item states */
.bulk-modal-item.is-queued {
    opacity: 0.6;
}

.bulk-modal-item.is-queued .bulk-modal-item-status {
    background: var(--bg-card-hover);
    color: var(--text-muted);
}

.bulk-modal-item.is-downloading {
    border-color: rgba(37, 244, 238, 0.5);
    background: rgba(37, 244, 238, 0.04);
    opacity: 1;
    box-shadow: 0 0 0 1px rgba(37, 244, 238, 0.08);
}

.bulk-modal-item.is-downloading .bulk-modal-item-status {
    background: rgba(37, 244, 238, 0.15);
    color: var(--secondary);
    animation: bulkItemPulse 1.2s ease-in-out infinite;
}

@keyframes bulkItemPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }
}

.bulk-modal-item.is-done {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.04);
    opacity: 1;
}

.bulk-modal-item.is-done .bulk-modal-item-status {
    background: rgba(34, 197, 94, 0.18);
    color: #22c55e;
}

.bulk-modal-item.is-failed {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.04);
    opacity: 1;
}

.bulk-modal-item.is-failed .bulk-modal-item-status {
    background: rgba(239, 68, 68, 0.18);
    color: #ef4444;
}

.bulk-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.bulk-modal-done-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    touch-action: manipulation;
}

.bulk-modal-done-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(34, 197, 94, 0.4);
}

.bulk-modal-done-btn i {
    font-size: 1.1rem;
}

/* Modal responsive */
@media (max-width: 600px) {
    .bulk-modal-overlay {
        padding: 12px;
        align-items: flex-end;
    }

    .bulk-modal-panel {
        max-height: calc(100dvh - 24px);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .bulk-modal-header {
        padding: 16px 18px 12px;
    }

    .bulk-modal-title {
        font-size: 1rem;
    }

    .bulk-modal-status-row {
        padding: 10px 18px;
    }

    .bulk-modal-list {
        padding: 0 18px 14px;
    }

    .bulk-modal-item {
        padding: 8px 10px;
        gap: 10px;
    }

    .bulk-modal-item-thumb {
        width: 36px;
        height: 36px;
    }

    .bulk-modal-footer {
        padding: 14px 18px;
        padding-bottom: max(14px, env(safe-area-inset-bottom));
    }
}


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

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

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

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

/* ---------- UTILITIES ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==========================================================
   RTL (Right-to-Left) Support — Arabic, Urdu
   ========================================================== */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Header */
[dir="rtl"] .header-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .logo {
    flex-direction: row-reverse;
}

/* Hero Section */
[dir="rtl"] .hero-title,
[dir="rtl"] .hero-subtitle {
    direction: rtl;
    text-align: center;
}

/* Search — URL input always LTR */
[dir="rtl"] .search-box input[type="text"],
[dir="rtl"] .search-box input[type="url"],
[dir="rtl"] .search-input {
    direction: ltr;
    text-align: left;
}

[dir="rtl"] .input-wrapper {
    flex-direction: row-reverse;
}

[dir="rtl"] .paste-btn {
    border-radius: 12px 0 0 12px;
}

/* Features Grid */
[dir="rtl"] .feature-card {
    text-align: right;
}

[dir="rtl"] .feature-card .feature-icon {
    margin-left: 0;
    margin-right: 0;
}

/* How-to Steps */
[dir="rtl"] .step-card {
    text-align: right;
}

[dir="rtl"] .step-number {
    margin-left: 16px;
    margin-right: 0;
}

/* FAQ */
[dir="rtl"] .faq-question {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .faq-question span {
    text-align: right;
}

[dir="rtl"] .faq-answer {
    text-align: right;
}

[dir="rtl"] .faq-toggle {
    margin-right: auto;
    margin-left: 0;
}

/* SEO Blocks */
[dir="rtl"] .seo-block {
    text-align: right;
}

/* Footer */
[dir="rtl"] .footer-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .footer-brand {
    text-align: right;
}

[dir="rtl"] .footer-links {
    direction: rtl;
    text-align: right;
}

/* Language Dropdown */
[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .lang-option {
    flex-direction: row-reverse;
    text-align: right;
}

/* Results / Format Cards */
[dir="rtl"] .format-card {
    text-align: right;
}

[dir="rtl"] .format-info {
    text-align: right;
}

/* Blog Article */
[dir="rtl"] .article-content {
    text-align: right;
}

[dir="rtl"] .article-meta {
    flex-direction: row-reverse;
}

[dir="rtl"] .breadcrumb {
    flex-direction: row-reverse;
}

[dir="rtl"] .toc-list {
    padding-right: 20px;
    padding-left: 0;
}

/* ==========================================================
   Language-Specific Font Families — Noto Sans
   ========================================================== */
[lang="hi"] body {
    font-family: 'Noto Sans Devanagari', 'Inter', system-ui, -apple-system, sans-serif;
}

[lang="th"] body {
    font-family: 'Noto Sans Thai', 'Inter', system-ui, -apple-system, sans-serif;
}

[lang="ar"] body {
    font-family: 'Noto Sans Arabic', 'Inter', system-ui, -apple-system, sans-serif;
}

[lang="ur"] body {
    font-family: 'Noto Nastaliq Urdu', 'Noto Sans Arabic', 'Inter', system-ui, -apple-system, sans-serif;
}

[lang="ja"] body {
    font-family: 'Noto Sans JP', 'Inter', system-ui, -apple-system, sans-serif;
}

[lang="ko"] body {
    font-family: 'Noto Sans KR', 'Inter', system-ui, -apple-system, sans-serif;
}

[lang="bn"] body {
    font-family: 'Noto Sans Bengali', 'Inter', system-ui, -apple-system, sans-serif;
}

[lang="zh"] body {
    font-family: 'Noto Sans SC', 'Inter', system-ui, -apple-system, sans-serif;
}