/* ==========================================================================
   DoConverter UI - Utilitarian Flat Minimal Engineering (SKILL_UI.md)
   Color System: Strict True Neutral Grays & Sharp Red Accent
   Typography: Apple system stack, Negative Letter Spacing
   Geometry: Sharp edges (4px - 8px max), Flat minimal surfaces, NO EMOJIS
   ========================================================================== */

/* 1. Design Tokens & Theme Architecture */
:root {
    --color-scheme: light;

    /* Canvas (Background behind blocks) & Surfaces (The blocks themselves) */
    --bg-canvas: #f3f4f6;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f9fafb;
    --bg-surface-subtle: #f9fafb;
    --bg-surface-elevated: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);

    /* Borders */
    --border-subtle: #e5e7eb;
    --border-strong: #d1d5db;
    --border-glass: #e5e7eb;
    --border-dropzone: #9ca3af;

    /* Typography */
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;

    /* Brand / Action Accents (Sharp Red) */
    --accent: #dc2626;
    --accent-hover: #b91c1c;
    --accent-surface: #fef2f2;
    --accent-contrast: #ffffff;

    /* Dynamic Converter Theme Colors (Defaults to Accent Red) */
    --theme-color: #ad0000;
    --theme-color-hover: #8f0000;
    --theme-color-surface: rgba(173, 0, 0, 0.1);
    --theme-text-color: #ffffff;

    /* State Accents */
    --success: #16a34a;
    --success-surface: #f0fdf4;
    --error: #dc2626;
    --error-surface: #fef2f2;
    --warning: #d97706;
    --warning-surface: #fffbeb;

    /* Radii (Sharp edges, 4px to 8px max) */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 8px;

    /* Shadows (Flat minimal, subtle neutral shadows, NO colored glow) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Transitions & Motion */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
    --duration-fast: 120ms;
    --duration-normal: 180ms;
}

[data-theme="dark"] {
    --color-scheme: dark;

    /* Canvas & Surfaces (True Grays, strictly NO blue or purple tints) */
    --bg-canvas: #121212;
    --bg-surface: #1e1e1e;
    --bg-surface-hover: #262626;
    --bg-surface-subtle: #262626;
    --bg-surface-elevated: #262626;
    --bg-glass: rgba(30, 30, 30, 0.85);

    /* Borders */
    --border-subtle: #333333;
    --border-strong: #404040;
    --border-glass: #333333;
    --border-dropzone: #525252;

    /* Typography */
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;

    /* Brand / Action Accents (Red Skin for Dark Mode) */
    --accent: #ef4444;
    --accent-hover: #dc2626;
    --accent-surface: rgba(239, 68, 68, 0.12);
    --accent-contrast: #ffffff;

    /* Dynamic Converter Theme Colors (Defaults to Accent Red) */
    --theme-color: #ad0000;
    --theme-color-hover: #8f0000;
    --theme-color-surface: rgba(173, 0, 0, 0.12);
    --theme-text-color: #ffffff;

    /* State Accents */
    --success: #22c55e;
    --success-surface: rgba(34, 197, 94, 0.1);
    --error: #ef4444;
    --error-surface: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-surface: rgba(245, 158, 11, 0.1);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
}

/* Temporary class to prevent transition flickering during theme change */
.no-transitions,
.no-transitions *,
.no-transitions *::before,
.no-transitions *::after {
    transition: none !important;
}

/* ==========================================================================
   Active Converter Theme Colors
   Video = #ff0318, Hudba = #a800d6, Obrázky = #ffdd00,
   PDF a Dokumenty = #007bff, E-Knihy = #00b812, YouTube = #ad0000,
   SVG Vectorizer = #ffdd00
   ========================================================================== */
.tool-video,
body[data-tool="video"] {
    --theme-color: #ff0318;
    --theme-color-hover: #b5000f;
    --theme-color-surface: rgba(173, 0, 0, 0.12);
    --theme-text-color: #ffffff;
}

.tool-audio,
body[data-tool="audio"] {
    --theme-color: #a800d6;
    --theme-color-hover: #8c00b3;
    --theme-color-surface: rgba(168, 0, 214, 0.12);
    --theme-text-color: #ffffff;
}

.tool-image,
body[data-tool="image"],
.tool-svg,
body[data-tool="svg"] {
    --theme-color: #ffdd00;
    --theme-color-hover: #e6c700;
    --theme-color-surface: rgba(255, 221, 0, 0.15);
    --theme-text-color: #000000;
}

.tool-pdf,
body[data-tool="pdf"] {
    --theme-color: #007bff;
    --theme-color-hover: #0062cc;
    --theme-color-surface: rgba(0, 123, 255, 0.12);
    --theme-text-color: #ffffff;
}

.tool-ebook,
body[data-tool="ebook"] {
    --theme-color: #00b812;
    --theme-color-hover: #00940e;
    --theme-color-surface: rgba(0, 184, 18, 0.12);
    --theme-text-color: #ffffff;
}

.tool-youtube,
body[data-tool="youtube"] {
    --theme-color: #ad0000;
    --theme-color-hover: #8f0000;
    --theme-color-surface: rgba(173, 0, 0, 0.15);
    --theme-text-color: #ffffff;
}

/* 2. Base Styles & Apple System Typography */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--duration-normal) var(--ease-out), color var(--duration-normal) var(--ease-out);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.02em;
    font-weight: 600;
    color: var(--text-primary);
}

/* Minimal SVG Icon Utilities */
.icon-svg {
    display: inline-block;
    vertical-align: middle;
    width: 1em;
    height: 1em;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* 3. Navigation Bar */
.navbar {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 2rem;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 1rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.nav-brand-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.nav-brand-logo .icon-svg {
    width: 16px;
    height: 16px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.nav-item-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    transition: color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}

.nav-item-link .icon-svg {
    width: 15px;
    height: 15px;
}

.nav-item-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-surface-hover);
}

.nav-item-link.active {
    color: var(--theme-color, var(--accent));
    background-color: var(--theme-color-surface, var(--accent-surface));
    font-weight: 600;
}

/* Dedicated Active & Hover States per Converter Menu Item */
.nav-item-link.nav-link-video.active {
    color: #ad0000;
    background-color: rgba(173, 0, 0, 0.12);
}

.nav-item-link.nav-link-video:hover:not(.active) {
    color: #ad0000;
}

.nav-item-link.nav-link-audio.active {
    color: #a800d6;
    background-color: rgba(168, 0, 214, 0.12);
}

.nav-item-link.nav-link-audio:hover:not(.active) {
    color: #a800d6;
}

.nav-item-link.nav-link-image.active {
    color: #ffdd00;
    background-color: rgba(255, 221, 0, 0.15);
}

[data-theme="light"] .nav-item-link.nav-link-image.active {
    color: #92400e;
    background-color: rgba(255, 221, 0, 0.25);
}

.nav-item-link.nav-link-image:hover:not(.active) {
    color: #ffdd00;
}

[data-theme="light"] .nav-item-link.nav-link-image:hover:not(.active) {
    color: #92400e;
}

.nav-item-link.nav-link-pdf.active {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.12);
}

.nav-item-link.nav-link-pdf:hover:not(.active) {
    color: #007bff;
}

.nav-item-link.nav-link-ebook.active {
    color: #00b812;
    background-color: rgba(0, 184, 18, 0.12);
}

.nav-item-link.nav-link-ebook:hover:not(.active) {
    color: #00b812;
}

.nav-item-link.nav-link-youtube.active {
    color: #ad0000;
    background-color: rgba(173, 0, 0, 0.15);
}

.nav-item-link.nav-link-youtube:hover:not(.active) {
    color: #ad0000;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Jazykový přepínač CZ / EN */
.lang-switch-group {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.2rem 0.3rem;
}

.lang-flag-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    opacity: 0.65;
    transition: opacity var(--duration-fast) var(--ease-out),
        background-color var(--duration-fast) var(--ease-out),
        transform var(--duration-fast) var(--ease-out);
}

.lang-flag-btn:hover {
    opacity: 1;
    background-color: var(--bg-surface);
}

.lang-flag-btn:active {
    transform: scale(0.96);
}

.lang-flag-btn.active {
    opacity: 1;
    background-color: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    font-weight: 700;
}

.flag-img {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    display: block;
}

.lang-code-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
}

/* Theme Toggle Button (Sharp edges, micro-interaction scale(0.94)) */
.theme-toggle-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--duration-fast) var(--ease-out),
        background-color var(--duration-fast) var(--ease-out),
        border-color var(--duration-fast) var(--ease-out);
}

.theme-toggle-btn .icon-svg {
    width: 16px;
    height: 16px;
}

.theme-toggle-btn:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
}

.theme-toggle-btn:active {
    transform: scale(0.94);
}

.btn-premium-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #ef4444;
    color: #ffffff;
    border: none;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}

.btn-premium-nav .icon-svg {
    width: 14px;
    height: 14px;
}

.btn-premium-nav:hover {
    background-color: #dc2626;
}

.btn-premium-nav:active {
    transform: scale(0.97);
}

.user-badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--accent-surface);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.user-badge-premium .icon-svg {
    width: 13px;
    height: 13px;
}

.user-email {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.user-email-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
    background: var(--bg-surface);
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    transition: transform var(--duration-fast) var(--ease-out),
        background-color var(--duration-fast) var(--ease-out),
        border-color var(--duration-fast) var(--ease-out);
    flex-shrink: 0;
}

.user-email-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-surface-hover);
    border-color: var(--border-subtle);
}

.user-email-link:active {
    transform: scale(0.94);
}

.user-email-link .icon-svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

/* Header Action Buttons & Hamburger Menu */
.nav-login-btn-header {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.btn-register-header {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

.btn-register-header:hover:not(:disabled) {
    background-color: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

.btn-logout-header {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.hamburger-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: transform var(--duration-fast) var(--ease-out),
        background-color var(--duration-fast) var(--ease-out),
        border-color var(--duration-fast) var(--ease-out);
    flex-shrink: 0;
}

.hamburger-btn:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.hamburger-btn:active {
    transform: scale(0.94);
}

.hamburger-btn .icon-svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Mobile Menu Drawer & Backdrop
   ========================================================================== */
.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    animation: fadeIn 0.2s var(--ease-out);
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 86vw;
    background: var(--bg-canvas);
    border-left: 1px solid var(--border-subtle);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
    animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-glass);
}

.mobile-menu-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-menu-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.mobile-menu-close-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--duration-fast) var(--ease-out);
}

.mobile-menu-close-btn:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
}

.mobile-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-sizing: border-box;
}

.mobile-menu-section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.mobile-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 0.35rem;
    padding-left: 0.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
    background: var(--bg-surface);
    border: 1px solid transparent;
}

.mobile-nav-link:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.mobile-nav-link .icon-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.mobile-nav-link.active {
    background-color: var(--theme-color-surface, var(--accent-surface));
    color: var(--theme-color, var(--accent));
    font-weight: 600;
    border-color: var(--theme-color, var(--accent));
}

.mobile-lang-switch {
    display: flex;
    justify-content: space-around;
    padding: 0.4rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.mobile-lang-switch .lang-flag-btn {
    flex: 1;
    justify-content: center;
    padding: 0.5rem;
}

.mobile-menu-auth {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.mobile-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: var(--radius-sm);
    box-sizing: border-box;
}

/* 4. Layout & Content Surfaces */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.main-content {
    flex: 1;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    box-sizing: border-box;
}

.page-header {
    margin-bottom: 2rem;
    text-align: center;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Horizontal design accent line under converter titles */
.header-accent-line {
    width: 64px;
    height: 3px;
    background-color: var(--theme-color, var(--accent));
    border: none;
    margin: 0.65rem auto 1.15rem auto;
    border-radius: var(--radius-sm);
    transition: background-color var(--duration-normal) var(--ease-out), width var(--duration-normal) var(--ease-out);
}

.page-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Flat Minimal Clean Card */
.clean-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--duration-fast) var(--ease-out);
}

/* 5. Dropzone Mechanics (Sharp 2px dashed, scale(1.01), red border hover) */
.dropzone {
    background: var(--bg-surface);
    border: 2px dashed var(--border-dropzone);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: border-color var(--duration-normal) var(--ease-out),
        background-color var(--duration-normal) var(--ease-out),
        transform var(--duration-normal) var(--ease-out);
}

.dropzone:hover {
    border-color: var(--accent);
    background-color: var(--bg-surface-hover);
}

.dropzone.is-dragover,
.dropzone.has-file {
    border-color: var(--accent);
    background-color: var(--accent-surface);
    border-style: solid;
    transform: scale(1.01);
}

.dropzone-icon-box {
    margin-bottom: 0.85rem;
    color: var(--text-secondary);
    transition: transform var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.dropzone-icon-box .icon-svg {
    width: 44px;
    height: 44px;
}

.dropzone:hover .dropzone-icon-box {
    transform: translateY(-2px);
    color: var(--accent);
}

.dropzone-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.dropzone-sub {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.file-input-hidden {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Truncation Utility */
.text-truncate {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
    display: block !important;
}

/* 6. File Cards & Staggered Entrance */
.file-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    max-width: 100%;
    margin-top: 1.25rem;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    animation: cardEnter var(--duration-normal) var(--ease-out) forwards;
    transition: transform var(--duration-fast) var(--ease-out),
        box-shadow var(--duration-fast) var(--ease-out);
}

.file-card:hover {
    box-shadow: var(--shadow-md);
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

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

.file-meta,
.file-card-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.file-info,
.file-text-meta {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.file-icon-box {
    color: var(--accent);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.file-icon-box .icon-svg {
    width: 22px;
    height: 22px;
}

.file-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    display: block;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-card .btn,
.file-card .btn-remove {
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: auto;
}

/* Multi-file selection list (PdfTools, etc.) */
.pdf-selected-wrapper {
    margin-top: 1.5rem;
}

.pdf-selected-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.pdf-selected-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pdf-selected-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.pdf-selected-item {
    margin-top: 0;
}

.btn-clear-all {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    color: var(--text-secondary);
    border-color: var(--border-subtle);
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-fast);
}

.btn-clear-all:hover {
    color: var(--error);
    border-color: var(--error);
    background: var(--error-surface);
}

.btn-clear-all .icon-svg {
    width: 14px;
    height: 14px;
}

/* 7. Options Grid & Selects */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.option-group {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
}

.option-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text-secondary);
}

.premium-pill {
    background: var(--accent-surface);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.clean-select {
    width: 100%;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--duration-fast) var(--ease-out);
}

.clean-select:focus {
    border-color: var(--accent);
}

/* 8. Action Buttons (Sharp edges, active scale 0.97, NO gradients) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: transform var(--duration-fast) var(--ease-out),
        background-color var(--duration-fast) var(--ease-out),
        opacity var(--duration-fast) var(--ease-out);
}

.btn .icon-svg {
    width: 16px;
    height: 16px;
}

.btn:active:not(:disabled) {
    transform: scale(0.97);
}

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

.btn-primary {
    background: var(--accent);
    color: var(--accent-contrast);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
}

/* Converter Action Buttons dynamic theme background & text contrast */
.main-content .btn-primary,
.clean-card .btn-primary,
.btn-action-large.btn-primary,
.input-with-button .btn-primary {
    background-color: var(--theme-color, var(--accent));
    color: var(--theme-text-color, #ffffff);
}

.main-content .btn-primary:hover:not(:disabled),
.clean-card .btn-primary:hover:not(:disabled),
.btn-action-large.btn-primary:hover:not(:disabled),
.input-with-button .btn-primary:hover:not(:disabled) {
    background-color: var(--theme-color-hover, var(--accent-hover));
    color: var(--theme-text-color, #ffffff);
}

.main-content .btn-primary svg,
.clean-card .btn-primary svg,
.btn-action-large.btn-primary svg {
    stroke: currentColor;
    fill: none;
}

/* Explicit high-contrast override for bright yellow theme on Image & SVG pages */
.tool-image .btn-primary,
.tool-svg .btn-primary,
body[data-tool="image"] .btn-primary,
body[data-tool="svg"] .btn-primary {
    color: #000000 !important;
    font-weight: 700;
}

.tool-image .btn-primary svg,
.tool-svg .btn-primary svg,
body[data-tool="image"] .btn-primary svg,
body[data-tool="svg"] .btn-primary svg {
    stroke: #000000 !important;
}

/* Navbar buttons stay standard brand accent red (#ef4444) */
.navbar .btn-primary {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

.navbar .btn-primary:hover:not(:disabled) {
    background-color: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

/* Dynamic theme elements on converter pages */
.main-content .dropzone:hover {
    border-color: var(--theme-color, var(--accent));
}

.main-content .dropzone:hover .dropzone-icon-box {
    color: var(--theme-color, var(--accent));
}

.main-content .dropzone.is-dragover,
.main-content .dropzone.has-file {
    border-color: var(--theme-color, var(--accent));
    background-color: var(--theme-color-surface, var(--accent-surface));
}

.main-content .file-icon-box {
    color: var(--theme-color, var(--accent));
}

.main-content .progress-indicator {
    background: var(--theme-color, var(--accent));
}

.main-content .clean-select:focus,
.main-content .clean-input:focus {
    border-color: var(--theme-color, var(--accent));
}

.yt-mode-btn.active {
    color: var(--theme-color, var(--accent));
    background-color: var(--theme-color-surface, var(--accent-surface));
    border-color: var(--theme-color, var(--accent));
}

.pdf-tab-btn.active,
.mode-pill-btn.active,
.nav-pills .nav-link.active {
    background-color: var(--theme-color);
    color: var(--theme-text-color, #ffffff);
    border-color: var(--theme-color);
}

    .ebook-format-btn.active {
        border-color: var(--theme-color, var(--accent));
        background-color: var(--theme-color-surface, var(--accent-surface));
    }

    .ebook-format-btn.active .fmt-badge {
        background-color: var(--theme-color, var(--accent));
        color: #ffffff;
    }

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

    .btn-outline:hover:not(:disabled) {
        background: var(--bg-surface-hover);
        color: var(--text-primary);
    }

    .btn-sm {
        padding: 0.35rem 0.7rem;
        font-size: 0.82rem;
        border-radius: var(--radius-sm);
    }

    .btn-action-large {
        width: 100%;
        padding: 0.85rem;
        font-size: 0.98rem;
        margin-top: 1.25rem;
    }

    /* 9. Progress Bar (Animated strictly via GPU scaleX, 160ms, never width) */
    .progress-card {
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: 1.25rem;
        margin-top: 1.25rem;
        animation: cardEnter var(--duration-normal) var(--ease-out) forwards;
    }

    .progress-header {
        display: flex;
        justify-content: space-between;
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.6rem;
    }

    .progress-track {
        height: 6px;
        background: var(--border-subtle);
        border-radius: var(--radius-sm);
        overflow: hidden;
        position: relative;
    }

    .progress-indicator {
        height: 100%;
        width: 100%;
        background: var(--accent);
        transform-origin: left;
        transition: transform 160ms var(--ease-out);
    }

    /* Indeterminate loader for server operations */
    .progress-indicator.indeterminate {
        transform-origin: left;
        width: 35%;
        animation: indeterminateSheen 1.2s infinite var(--ease-out);
    }

    @keyframes indeterminateSheen {
        0% {
            transform: translateX(-100%) scaleX(0.5);
        }

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

        100% {
            transform: translateX(300%) scaleX(0.5);
        }
    }

    .loading-pulse {
        font-size: 0.8rem;
        color: var(--accent);
        font-weight: 600;
    }

    /* 10. Alerts & Feedback */
    .clean-alert {
        padding: 0.85rem 1.15rem;
        border-radius: var(--radius-md);
        font-size: 0.88rem;
        margin-top: 1.25rem;
        animation: cardEnter var(--duration-normal) var(--ease-out) forwards;
    }

    .clean-alert.error {
        background: var(--error-surface);
        border: 1px solid rgba(220, 38, 38, 0.3);
        color: var(--error);
    }

    .clean-alert.success {
        background: var(--success-surface);
        border: 1px solid rgba(22, 163, 74, 0.3);
        color: var(--success);
    }

    /* 11. YouTube Downloader Layout */
    .input-with-button {
        display: flex;
        gap: 0.6rem;
        margin-bottom: 1.5rem;
    }

    .clean-input {
        flex: 1;
        background: var(--bg-surface);
        color: var(--text-primary);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-sm);
        padding: 0.75rem 0.95rem;
        font-size: 0.92rem;
        outline: none;
        transition: border-color var(--duration-fast) var(--ease-out);
    }

    .clean-input:focus {
        border-color: var(--accent);
    }

    .clean-input::placeholder {
        color: var(--text-tertiary);
        opacity: 1;
    }

    .clean-input::-webkit-input-placeholder {
        color: var(--text-tertiary);
    }

    .clean-input::-moz-placeholder {
        color: var(--text-tertiary);
        opacity: 1;
    }

    .clean-input:-ms-input-placeholder {
        color: var(--text-tertiary);
    }

    .yt-preview-box {
        display: flex;
        gap: 1.25rem;
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: 1rem;
        margin-bottom: 1.5rem;
        align-items: center;
        animation: cardEnter var(--duration-normal) var(--ease-out) forwards;
    }

    .yt-preview-thumb {
        width: 140px;
        height: 82px;
        object-fit: cover;
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-sm);
    }

    .yt-preview-info h3 {
        font-size: 1.05rem;
        margin-bottom: 0.3rem;
    }

    .yt-preview-info p {
        font-size: 0.85rem;
        color: var(--text-tertiary);
    }

    /* 12. Tool Grid (Dashboard on Home.razor) */
    .tool-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 1.25rem;
        margin-top: 1.5rem;
    }

    /* Individual Tool Card Theme Color Bindings */
    .card-tool-video {
        --card-color: #ad0000;
        --card-hover: #8f0000;
        --card-surface: rgba(173, 0, 0, 0.12);
    }

    .card-tool-audio {
        --card-color: #a800d6;
        --card-hover: #8c00b3;
        --card-surface: rgba(168, 0, 214, 0.12);
    }

    .card-tool-image {
        --card-color: #ffdd00;
        --card-hover: #e6c700;
        --card-surface: rgba(255, 221, 0, 0.15);
    }

    .card-tool-pdf {
        --card-color: #007bff;
        --card-hover: #0062cc;
        --card-surface: rgba(0, 123, 255, 0.12);
    }

    .card-tool-ebook {
        --card-color: #00b812;
        --card-hover: #00940e;
        --card-surface: rgba(0, 184, 18, 0.12);
    }

    .card-tool-youtube {
        --card-color: #ad0000;
        --card-hover: #8f0000;
        --card-surface: rgba(173, 0, 0, 0.15);
    }

    .card-tool-svg {
        --card-color: #ffdd00;
        --card-hover: #e6c700;
        --card-surface: rgba(255, 221, 0, 0.15);
    }

    .tool-card {
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-lg);
        padding: 1.75rem;
        text-decoration: none;
        color: inherit;
        box-shadow: var(--shadow-sm);
        transition: transform var(--duration-fast) var(--ease-out),
            box-shadow var(--duration-fast) var(--ease-out),
            border-color var(--duration-fast) var(--ease-out);
        display: flex;
        flex-direction: column;
    }

    .tool-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--card-color, var(--border-strong));
    }

    .tool-card:active {
        transform: scale(0.985);
    }

    .tool-icon-box {
        color: var(--card-color, var(--accent));
        margin-bottom: 0.85rem;
        transition: transform var(--duration-fast) var(--ease-out);
    }

    .tool-card:hover .tool-icon-box {
        transform: scale(1.08);
    }

    .tool-icon-box .icon-svg {
        width: 32px;
        height: 32px;
    }

    .tool-title {
        font-size: 1.15rem;
        font-weight: 600;
        margin-bottom: 0.45rem;
    }

    .tool-desc {
        color: var(--text-secondary);
        font-size: 0.88rem;
        line-height: 1.5;
        flex: 1;
    }

    .tool-cta {
        margin-top: 1.25rem;
        color: var(--card-color, var(--accent));
        font-weight: 600;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 0.3rem;
        transition: gap var(--duration-fast) var(--ease-out);
    }

    .tool-card:hover .tool-cta {
        gap: 0.5rem;
    }

    /* Light mode adjustments for high readability with yellow (#ffdd00) cards */
    [data-theme="light"] .card-tool-image .tool-icon-box,
    [data-theme="light"] .card-tool-svg .tool-icon-box {
        color: #92400e;
    }

    [data-theme="light"] .card-tool-image .tool-cta,
    [data-theme="light"] .card-tool-svg .tool-cta {
        color: #92400e;
    }

    /* 13. PDF Tools Tabs & Sections */
    .pdf-tab-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
        border-bottom: 1px solid var(--border-subtle);
        padding-bottom: 0.5rem;
    }


    .pdf-tab-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        background: transparent;
        border: none;
        padding: 0.5rem 0.85rem;
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--text-secondary);
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: color var(--duration-fast) var(--ease-out),
            background-color var(--duration-fast) var(--ease-out),
            transform var(--duration-fast) var(--ease-out);
    }

    .pdf-tab-btn .icon-svg {
        width: 15px;
        height: 15px;
    }

    .pdf-tab-btn:hover {
        color: var(--text-primary);
        background-color: var(--bg-surface-hover);
    }

    .pdf-tab-btn:active {
        transform: scale(0.97);
    }

    .pdf-tab-btn.active {
        color: var(--accent);
        background-color: var(--accent-surface);
        background-color: var(--theme-color);
        color: var(--theme-text-color, #ffffff);
        border-color: var(--theme-color);
        box-shadow: var(--shadow-sm);
    }

    .pdf-tab-btn.active .icon-svg {
        stroke: var(--theme-text-color, #ffffff);
    }

    .pdf-tab-btn.active:hover {
        background-color: var(--theme-color-hover, var(--theme-color));
        color: var(--theme-text-color, #ffffff);
    }

    .pdf-extracted-box {
        margin-top: 1.5rem;
        animation: cardEnter var(--duration-normal) var(--ease-out) forwards;
    }

    .pdf-extracted-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.6rem;
        font-size: 0.9rem;
        font-weight: 600;
    }

    .pdf-extracted-textarea {
        width: 100%;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .pdf-selected-wrapper {
        margin-top: 1.5rem;
    }

    .pdf-selected-title {
        font-size: 0.92rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
        display: block;
    }

    .pdf-selected-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .pdf-selected-item {
        margin-top: 0;
        padding: 0.65rem 1rem;
        font-size: 0.88rem;
    }

    /* 14. Modals (Sharp & Flat Minimal) */
    .modal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        padding: 1.5rem;
        animation: modalBackdropEnter var(--duration-fast) var(--ease-out) forwards;
    }

    @keyframes modalBackdropEnter {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .modal-card {
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-lg);
        width: 100%;
        max-width: 580px;
        padding: 2.25rem;
        position: relative;
        box-shadow: var(--shadow-lg);
        max-height: 90vh;
        overflow-y: auto;
        animation: modalScaleEnter var(--duration-normal) var(--ease-out) forwards;
    }

    @keyframes modalScaleEnter {
        from {
            opacity: 0;
            transform: scale(0.96);
        }

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

    .modal-close-btn {
        position: absolute;
        top: 1.25rem;
        right: 1.25rem;
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        color: var(--text-secondary);
        width: 28px;
        height: 28px;
        border-radius: var(--radius-sm);
        cursor: pointer;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color var(--duration-fast) var(--ease-out);
    }

    .modal-close-btn:hover {
        background-color: var(--border-subtle);
        color: var(--text-primary);
    }

    .modal-close-btn:active {
        transform: scale(0.92);
    }

    .badge-premium {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        background: var(--accent-surface);
        border: 1px solid var(--accent);
        color: var(--accent);
        padding: 0.2rem 0.6rem;
        border-radius: var(--radius-sm);
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        margin-bottom: 0.75rem;
    }

    .badge-premium .icon-svg {
        width: 13px;
        height: 13px;
    }

    .modal-header {
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .modal-title {
        font-size: 1.4rem;
        font-weight: 700;
        margin-bottom: 0.4rem;
        color: var(--text-primary);
        letter-spacing: -0.02em;
    }

    .modal-subtitle {
        font-size: 0.88rem;
        color: var(--text-secondary);
        line-height: 1.45;
    }

    .premium-benefits {
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
        margin-bottom: 1.5rem;
    }

    .benefit-item {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        padding: 0.75rem 1rem;
        border-radius: var(--radius-md);
    }

    .benefit-icon {
        color: var(--accent);
        display: flex;
        align-items: center;
        margin-top: 2px;
    }

    .benefit-icon .icon-svg {
        width: 18px;
        height: 18px;
    }

    .benefit-item strong {
        display: block;
        font-size: 0.88rem;
        color: var(--text-primary);
        margin-bottom: 0.15rem;
    }

    .benefit-item p {
        font-size: 0.8rem;
        color: var(--text-secondary);
        line-height: 1.4;
        margin: 0;
    }

    .comparison-table-wrapper {
        margin-bottom: 1.25rem;
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        overflow-x: auto;
    }

    .comparison-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.82rem;
        text-align: left;
    }

    .comparison-table thead tr {
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border-subtle);
    }

    .comparison-table th {
        padding: 0.65rem 0.85rem;
        font-weight: 600;
        font-size: 0.75rem;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .comparison-table th:last-child {
        color: var(--accent);
    }

    .comparison-table td {
        padding: 0.65rem 0.85rem;
        border-bottom: 1px solid var(--border-subtle);
        color: var(--text-primary);
    }

    .comparison-table tr:last-child td {
        border-bottom: none;
    }

    .comparison-table .feature-cell {
        font-weight: 500;
        color: var(--text-primary);
    }

    .comparison-table .free-cell {
        color: var(--text-secondary);
        font-size: 0.78rem;
    }

    .comparison-table .premium-cell {
        color: var(--accent);
        font-weight: 600;
        font-size: 0.78rem;
    }

    .pricing-card {
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: 1rem;
        text-align: center;
        margin-bottom: 1.25rem;
    }

    .pricing-selector-container {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .plan-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        border-radius: var(--radius-md);
        cursor: pointer;
        user-select: none;
        box-sizing: border-box;
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                    max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                    border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                    background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
    }

    .plan-card.active {
        max-height: 85px;
        padding: 0.75rem 1rem;
        background: var(--bg-surface-elevated);
        border: 2px solid var(--accent);
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    }

    .plan-card.inactive {
        max-height: 48px;
        padding: 0.35rem 0.85rem;
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        opacity: 0.55;
        transform: scale(0.97);
    }

    .plan-card.inactive:hover {
        opacity: 0.85;
        transform: scale(0.98);
        border-color: var(--text-tertiary);
    }

    .plan-card-left {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        min-width: 0;
    }

    .plan-radio-circle {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        border: 2px solid var(--border-default);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: border-color var(--duration-fast) var(--ease-out);
    }

    .plan-card.active .plan-radio-circle {
        border-color: var(--accent);
    }

    .plan-radio-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: var(--accent);
        opacity: 0;
        transform: scale(0.5);
        transition: all var(--duration-fast) var(--ease-out);
    }

    .plan-card.active .plan-radio-dot {
        opacity: 1;
        transform: scale(1);
    }

    .plan-info {
        display: flex;
        flex-direction: column;
        min-width: 0;
        line-height: 1.25;
    }

    .plan-name-badge {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .plan-name {
        font-weight: 700;
        font-size: 0.95rem;
        color: var(--text-primary);
    }

    .plan-card.inactive .plan-name {
        font-size: 0.88rem;
    }

    .plan-tag-default {
        background-color: var(--success);
        color: #ffffff;
        font-size: 0.6rem;
        font-weight: 700;
        padding: 0.15rem 0.4rem;
        border-radius: var(--radius-full);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .plan-sub {
        font-size: 0.75rem;
        color: var(--text-tertiary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        transition: opacity var(--duration-fast) var(--ease-out);
    }

    .plan-card.inactive .plan-sub {
        opacity: 0;
        height: 0;
        margin: 0;
    }

    .plan-price-wrap {
        display: flex;
        align-items: baseline;
        gap: 0.3rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .plan-price-main {
        font-weight: 700;
        font-size: 1.25rem;
        color: var(--text-primary);
    }

    .plan-card.active .plan-price-main {
        color: var(--accent);
    }

    .plan-card.inactive .plan-price-main {
        font-size: 1.05rem;
    }

    .plan-price-alt {
        font-size: 0.82rem;
        color: var(--text-secondary);
        font-weight: 500;
    }

    .plan-card.inactive .plan-price-alt {
        font-size: 0.75rem;
    }

    .price-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
    }

    .price-value {
        font-size: 1.65rem;
        font-weight: 700;
        color: var(--text-primary);
        letter-spacing: -0.02em;
    }

    .price-alt {
        font-size: 1rem;
        color: var(--text-secondary);
        font-weight: 500;
    }

    .price-desc {
        font-size: 0.8rem;
        color: var(--text-tertiary);
        font-weight: 500;
    }

    .payment-tabs {
        display: flex;
        gap: 0.5rem;
        margin-top: 0.65rem;
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--border-subtle);
        padding-bottom: 0.5rem;
    }

    .payment-tabs .tab-btn {
        flex: 1;
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        background: transparent;
        border: 1px solid var(--border-subtle);
        color: var(--text-secondary);
        padding: 0.6rem 0.75rem;
        border-radius: var(--radius-sm);
        font-size: 0.82rem;
        font-weight: 600;
        cursor: pointer;
        transition: background-color var(--duration-fast) var(--ease-out),
            color var(--duration-fast) var(--ease-out),
            border-color var(--duration-fast) var(--ease-out),
            transform var(--duration-fast) var(--ease-out);
    }

    .tab-badge-recommended {
        position: absolute;
        top: -9px;
        left: 8px;
        background-color: var(--success);
        color: #ffffff;
        font-size: 0.6rem;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        padding: 0.12rem 0.45rem;
        border-radius: var(--radius-sm);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
        pointer-events: none;
        line-height: 1.1;
        z-index: 2;
        white-space: nowrap;
    }

    .payment-tabs .tab-btn .icon-svg {
        width: 15px;
        height: 15px;
    }

    .payment-tabs .tab-btn:hover {
        color: var(--text-primary);
        background-color: var(--bg-surface-hover);
    }

    .payment-tabs .tab-btn:active {
        transform: scale(0.97);
    }

    .payment-tabs .tab-btn.active {
        background-color: var(--accent);
        color: var(--accent-contrast);
        border-color: var(--accent);
    }

    .payment-tabs .tab-btn.active .tab-badge-recommended {
        background-color: #ffffff;
        color: var(--accent);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    }

    .payment-tabs .tab-btn.disabled,
    .payment-tabs .tab-btn[disabled] {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
    }

    .payment-body {
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: 1.25rem;
    }

    .currency-selector {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .pill-btn {
        flex: 1;
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        color: var(--text-secondary);
        padding: 0.4rem 0.65rem;
        border-radius: var(--radius-sm);
        font-size: 0.8rem;
        font-weight: 600;
        cursor: pointer;
        transition: background-color var(--duration-fast) var(--ease-out),
            color var(--duration-fast) var(--ease-out),
            border-color var(--duration-fast) var(--ease-out),
            transform var(--duration-fast) var(--ease-out);
    }

    .pill-btn:hover {
        color: var(--text-primary);
    }

    .pill-btn:active {
        transform: scale(0.96);
    }

    .pill-btn.active {
        background: var(--accent-surface);
        color: var(--accent);
        border-color: var(--accent);
    }

    .loading-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        padding: 2rem 0;
        font-size: 0.88rem;
        color: var(--text-secondary);
    }

    .spinner {
        width: 26px;
        height: 26px;
        border: 2px solid var(--border-subtle);
        border-top-color: var(--accent);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    .qr-container {
        display: flex;
        gap: 1.25rem;
        align-items: center;
        margin-bottom: 1rem;
    }

    @media (max-width: 520px) {
        .qr-container {
            flex-direction: column;
            text-align: center;
        }
    }

    .qr-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.4rem;
        background: #ffffff;
        padding: 0.75rem;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border-subtle);
        box-shadow: var(--shadow-sm);
    }

    .qr-image {
        width: 140px;
        height: 140px;
        display: block;
    }

    .qr-hint {
        font-size: 0.72rem;
        color: #4b5563;
        font-weight: 500;
    }

    .payment-details {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .detail-row {
        display: flex;
        justify-content: space-between;
        font-size: 0.85rem;
        padding-bottom: 0.35rem;
        border-bottom: 1px dashed var(--border-subtle);
    }

    .detail-row .label {
        color: var(--text-secondary);
    }

    .detail-row .val {
        color: var(--text-primary);
        font-weight: 600;
    }

    .detail-row .val.highlight {
        color: var(--accent);
    }

    .detail-row .val.mono {
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 0.82rem;
    }

    .polling-indicator {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.78rem;
        color: var(--text-tertiary);
        margin: 0.75rem 0;
    }

    .pulse-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--success);
        animation: pulse 1.8s infinite;
    }

    @keyframes pulse {

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

        50% {
            opacity: 0.4;
            transform: scale(0.85);
        }
    }

    .paypal-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .paypal-box p {
        font-size: 0.88rem;
        color: var(--text-secondary);
        max-width: 380px;
    }

    .btn-paypal {
        background: var(--text-primary);
        color: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        padding: 0.7rem 1.4rem;
        border-radius: var(--radius-md);
        font-size: 0.92rem;
        font-weight: 600;
        cursor: pointer;
        box-shadow: var(--shadow-sm);
        transition: background-color var(--duration-fast) var(--ease-out),
            transform var(--duration-fast) var(--ease-out);
    }

    .btn-paypal:hover:not(:disabled) {
        background: var(--accent);
        color: var(--accent-contrast);
    }

    .btn-paypal:active:not(:disabled) {
        transform: scale(0.97);
    }

    .btn-paypal:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .error-banner {
        margin-top: 1rem;
        padding: 0.75rem;
        background: var(--error-surface);
        border: 1px solid rgba(220, 38, 38, 0.3);
        color: var(--error);
        border-radius: var(--radius-sm);
        font-size: 0.85rem;
        text-align: center;
    }

    .error-banner a,
    .error-banner-link {
        color: var(--error);
        font-weight: 700;
        text-decoration: underline;
        text-underline-offset: 3px;
        transition: opacity var(--duration-fast) var(--ease-out);
    }

    .error-banner a:hover,
    .error-banner-link:hover {
        opacity: 0.8;
        text-decoration: underline;
    }

    .paypal-currency-selector {
        width: 100%;
        max-width: 380px;
        margin: 0.25rem 0 0.5rem 0;
    }

    .qr-placeholder-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.85rem;
        padding: 1.5rem 1rem;
        text-align: center;
    }

    .qr-placeholder-text {
        font-size: 0.88rem;
        color: var(--text-secondary);
        max-width: 340px;
        margin: 0;
    }

    .btn-generate-qr {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.65rem 1.25rem;
        font-size: 0.88rem;
        font-weight: 600;
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-sm);
    }

    .btn-generate-qr .icon-svg {
        width: 16px;
        height: 16px;
    }

    .success-banner {
        margin-top: 1rem;
        padding: 0.75rem;
        background: var(--success-surface);
        border: 1px solid rgba(22, 163, 74, 0.3);
        color: var(--success);
        border-radius: var(--radius-sm);
        font-size: 0.85rem;
        text-align: center;
        font-weight: 600;
    }

    /* 15. Ad Container & Slot */
    .ad-banner-slot,
    #ad-container {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 2.5rem;
        margin-bottom: 1.5rem;
        padding: 0.5rem 0;
        min-height: 54px;
        width: 100%;
    }

    .mobile-bottom-ad {
        width: 320px;
        height: 50px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .sidebar-ad {
        width: 160px;
        height: 600px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Cross-Promo Section */
    .cross-promo-section {
        margin-top: 3rem;
        border-top: 1px solid var(--border-subtle);
        padding-top: 2rem;
        text-align: center;
    }

    .cross-promo-title {
        font-size: 1.15rem;
        font-weight: 600;
        margin-bottom: 0.4rem;
    }

    .cross-promo-sub {
        font-size: 0.85rem;
        color: var(--text-secondary);
        margin-bottom: 1.25rem;
    }

    .cross-promo-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1rem;
    }

    .cross-promo-item {
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: 1.25rem;
        text-align: left;
    }

    .cross-promo-icon {
        color: var(--accent);
        margin-bottom: 0.5rem;
    }

    .cross-promo-icon .icon-svg {
        width: 22px;
        height: 22px;
    }

    /* 16. Auth Pages & Controls */
    .auth-container {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 2.5rem 1rem;
        min-height: 70vh;
    }

    .auth-card {
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-lg);
        padding: 2.25rem;
        width: 100%;
        max-width: 420px;
        box-shadow: var(--shadow-md);
        animation: cardEnter var(--duration-normal) var(--ease-out) forwards;
    }

    .auth-header {
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .auth-logo {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
        letter-spacing: -0.02em;
    }

    .auth-logo .icon-svg {
        width: 20px;
        height: 20px;
        color: var(--accent);
    }

    .auth-header h1 {
        font-size: 1.4rem;
        font-weight: 700;
        margin-bottom: 0.35rem;
    }

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

    .form-group {
        margin-bottom: 1.15rem;
    }

    .form-group label {
        display: block;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--text-secondary);
        margin-bottom: 0.4rem;
    }

    .form-control {
        width: 100%;
        background: var(--bg-surface);
        color: var(--text-primary);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-sm);
        padding: 0.65rem 0.85rem;
        font-size: 0.92rem;
        outline: none;
        transition: border-color var(--duration-fast) var(--ease-out);
    }

    .form-control:focus {
        border-color: var(--accent);
    }

    .form-check {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1.25rem;
    }

    .form-checkbox {
        width: 15px;
        height: 15px;
        accent-color: var(--accent);
        cursor: pointer;
    }

    .form-check label {
        font-size: 0.85rem;
        color: var(--text-secondary);
        cursor: pointer;
    }

    .auth-helper-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1.25rem;
        gap: 0.5rem;
    }

    .auth-helper-row .form-check {
        margin-bottom: 0;
    }

    .auth-forgot-link {
        font-size: 0.82rem;
        color: var(--accent);
        text-decoration: none;
        font-weight: 500;
        transition: color var(--duration-fast) var(--ease-out);
        white-space: nowrap;
    }

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

    .auth-success-action {
        margin-bottom: 1.5rem;
    }

    .btn-block {
        width: 100%;
    }

    .auth-divider {
        display: flex;
        align-items: center;
        margin: 1.5rem 0;
        color: var(--text-tertiary);
        font-size: 0.8rem;
    }

    .auth-divider::before,
    .auth-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--border-subtle);
    }

    .auth-divider span {
        padding: 0 0.75rem;
    }

    .oauth-buttons {
        display: flex;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .btn-oauth {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        color: var(--text-primary);
        padding: 0.65rem 0.85rem;
        border-radius: var(--radius-md);
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        transition: background-color var(--duration-fast) var(--ease-out),
            transform var(--duration-fast) var(--ease-out);
    }

    .btn-oauth:hover {
        background-color: var(--bg-surface-hover);
    }

    .btn-oauth:active {
        transform: scale(0.97);
    }

    .auth-footer {
        text-align: center;
        font-size: 0.85rem;
        color: var(--text-secondary);
    }

    .auth-footer .link {
        color: var(--accent);
        text-decoration: none;
        font-weight: 600;
    }

    .auth-footer .link:hover {
        text-decoration: underline;
    }

    .alert-box {
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
    }

    .alert-box.error {
        background: var(--error-surface);
        border: 1px solid rgba(220, 38, 38, 0.3);
        color: var(--error);
    }

    .alert-box.success {
        background: var(--success-surface);
        border: 1px solid rgba(22, 163, 74, 0.3);
        color: var(--success);
    }

    .user-exists-alert {
        margin-top: 1.25rem;
        margin-bottom: 0.5rem;
        line-height: 1.5;
    }

    .alert-box .btn-link {
        background: transparent;
        border: none;
        padding: 0;
        margin: 0;
        font: inherit;
        color: inherit;
        font-weight: 700;
        text-decoration: underline;
        cursor: pointer;
        display: inline;
    }

    .alert-box .btn-link:hover {
        text-decoration: none;
        opacity: 0.85;
    }

    /* 17. Initial App Loader (index.html) */
    .app-initial-loader {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 85vh;
        gap: 1.25rem;
    }

    .loader-logo {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .loader-logo-img {
        width: 64px;
        height: 64px;
        object-fit: contain;
        display: block;
    }

    .loader-logo-text {
        font-size: 1.6rem;
        font-weight: 700;
        color: var(--text-primary);
        letter-spacing: -0.02em;
        line-height: 1.2;
    }

    .loader-spinner {
        width: 32px;
        height: 32px;
        border: 2px solid var(--border-subtle);
        border-top-color: var(--accent);
        border-radius: 50%;
        animation: spin 0.75s linear infinite;
    }

    .loader-text {
        font-size: 0.88rem;
        color: var(--text-secondary);
    }

    /* 18. Accessibility & System Preferences */
    @media (prefers-reduced-motion: reduce) {

        *,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
            scroll-behavior: auto !important;
        }

        .file-card,
        .progress-card,
        .clean-alert,
        .yt-preview-box,
        .modal-card,
        .auth-card {
            animation: none;
            opacity: 1;
            transform: none;
        }
    }

    /* ==========================================================================
   19. Responsive Layout & Navigation System
   ========================================================================== */

    /* Tablet & Mobile Breakpoint (<= 992px): Přepnutí na Hamburger navigaci */
    @media (max-width: 992px) {
        .navbar {
            padding: 0.75rem 1.25rem;
        }

        .nav-links {
            display: none !important;
        }

        .hamburger-btn {
            display: inline-flex !important;
        }

        .clean-card {
            padding: 1.5rem;
        }

        .main-content {
            padding: 1.75rem 1.25rem;
        }
    }

    /* Portrait Mode (Mobil na výšku: displeje na výšku <= 992px nebo malé obrazovky <= 600px) */
    @media (max-width: 992px) and (orientation: portrait),
    (max-width: 600px) {
        .navbar {
            padding: 0.65rem 0.85rem;
            gap: 0.5rem;
        }

        /* Skrytí textového názvu DoConverter pro Free uživatele (aby se vešlo tlačítko Premium) */
        .nav-brand-text {
            display: none;
        }

        /* Pokud je uživatel Premium, tlačítko Premium se nezobrazuje a uvolnilo se místo pro název */
        .header-is-premium .nav-brand-text {
            display: inline-block !important;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 130px;
        }

        .header-is-premium .nav-brand {
            min-width: 0;
            flex-shrink: 1;
        }

        /* Skrytí jazykových vlajek z hlavičky (jsou uvnitř menu) */
        .nav-header-lang {
            display: none !important;
        }

        /* Skrytí tlačítek Registrovat a Odhlásit z hlavičky (jsou uvnitř menu dole) */
        .btn-register-header,
        .btn-logout-header {
            display: none !important;
        }

        .nav-actions {
            gap: 0.45rem;
        }

        .btn-premium-nav {
            padding: 0.4rem 0.65rem;
            font-size: 0.78rem;
        }

        .nav-login-btn-header {
            padding: 0.35rem 0.6rem;
            font-size: 0.82rem;
        }

        /* Zobrazení spodní sekce Registrace/Odhlásit uvnitř hamburger menu */
        .mobile-menu-auth {
            display: block !important;
        }

        .clean-card {
            padding: 1.25rem;
        }

        .main-content {
            padding: 1.25rem 0.75rem;
        }

        .app-footer {
            padding: 1rem 0.85rem;
        }
    }

    /* Landscape Mode (Mobil na šířku: orientace na šířku <= 992px) */
    @media (max-width: 992px) and (orientation: landscape) {
        .navbar {
            padding: 0.5rem 1.25rem;
            gap: 0.75rem;
        }

        /* V landscape režimu vytáhnout tlačítka Registrovat a Odhlásit zpět do viditelné hlavičky */
        .btn-register-header,
        .btn-logout-header {
            display: inline-flex !important;
        }

        /* V landscape režimu skrýt auth sekci v menu, aby nedocházelo k duplicitě */
        .mobile-menu-auth {
            display: none !important;
        }

        .main-content {
            padding: 1.25rem 1.5rem;
        }
    }

    /* Landscape: jazykový přepínač v hlavičce podle šířky displeje */
    @media (max-width: 749px) and (orientation: landscape) {
        .nav-header-lang {
            display: none !important;
        }
    }

    @media (min-width: 750px) and (max-width: 992px) and (orientation: landscape) {
        .nav-header-lang {
            display: inline-flex !important;
        }

        .mobile-lang-section {
            display: none !important;
        }
    }

    /* 20. Blazor Error UI */
    #blazor-error-ui {
        display: none;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-top: 2px solid var(--accent);
        color: var(--text-primary);
        padding: 0.85rem 1.5rem;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
        z-index: 10000;
        font-size: 0.9rem;
        box-sizing: border-box;
    }

    #blazor-error-ui .reload {
        color: var(--accent);
        text-decoration: underline;
        margin-left: 0.5rem;
        font-weight: 600;
    }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 1.25rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.25rem;
        line-height: 1;
        color: var(--text-secondary);
    }

    #blazor-error-ui .dismiss:hover {
        color: var(--text-primary);
    }

    /* 21. E-book Converter */
    .ebook-config-box {
        margin-top: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .ebook-format-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 0.75rem;
        margin-top: 0.5rem;
    }

    .ebook-format-btn {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        cursor: pointer;
        text-align: left;
        transition: border-color var(--ease-out) 150ms, background-color var(--ease-out) 150ms;
    }

    .ebook-format-btn:hover {
        border-color: var(--border-focus);
        background: var(--bg-card);
    }

    .ebook-format-btn.active {
        border-color: var(--accent);
        background: var(--bg-card);
        box-shadow: 0 0 0 1px var(--accent);
    }

    .ebook-format-btn .fmt-badge {
        display: inline-block;
        padding: 0.2rem 0.5rem;
        background: var(--bg-page);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-sm);
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
        letter-spacing: 0.05em;
    }

    .ebook-format-btn.active .fmt-badge {
        background: var(--accent);
        color: #ffffff;
        border-color: var(--accent);
    }

    .ebook-format-btn .fmt-name {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.25rem;
    }

    .ebook-format-btn .fmt-desc {
        font-size: 0.8rem;
        color: var(--text-secondary);
        line-height: 1.35;
    }

    .ebook-actions {
        margin-top: 0.5rem;
    }

    .conversion-result-card {
        margin-top: 1.5rem;
        background: var(--bg-card);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-lg);
        padding: 1.5rem;
    }

    .result-header {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1.25rem;
    }

    .result-icon-box.success {
        width: 44px;
        height: 44px;
        background: rgba(34, 197, 94, 0.15);
        border: 1px solid rgba(34, 197, 94, 0.3);
        border-radius: var(--radius-md);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #22c55e;
    }

    .result-icon-box.success .icon-svg {
        width: 24px;
        height: 24px;
    }

    .result-title {
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--text-primary);
        margin: 0 0 0.2rem 0;
    }

    .result-sub {
        font-size: 0.85rem;
        color: var(--text-secondary);
        margin: 0;
    }

    .result-actions {
        display: flex;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    /* 22. YouTube Playlist & Mode Switch */
    .yt-mode-tabs {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 1.25rem;
        padding: 0.25rem;
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        width: fit-content;
    }

    .yt-mode-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        background: transparent;
        border: 1px solid transparent;
        border-radius: var(--radius-sm);
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all var(--ease-out) 150ms;
    }

    .yt-mode-btn:hover {
        color: var(--text-primary);
        background: var(--bg-card);
    }

    .yt-mode-btn.active {
        background: var(--bg-card);
        border-color: var(--border-focus);
        color: var(--text-primary);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    }

    .yt-mode-btn .icon-svg {
        width: 16px;
        height: 16px;
    }

    .yt-playlist-box {
        margin-top: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .yt-playlist-header {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
    }

    .yt-playlist-icon {
        width: 44px;
        height: 44px;
        background: var(--bg-card);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-sm);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--accent);
    }

    .yt-playlist-icon .icon-svg {
        width: 22px;
        height: 22px;
    }

    .yt-playlist-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--text-primary);
        margin: 0 0 0.2rem 0;
    }

    .yt-playlist-sub {
        font-size: 0.85rem;
        color: var(--text-secondary);
        margin: 0;
    }

    .yt-playlist-items-list {
        max-height: 280px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        padding: 0.5rem;
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
    }

    .yt-playlist-item-row {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.5rem 0.75rem;
        background: var(--bg-card);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-sm);
        font-size: 0.85rem;
        color: var(--text-primary);
    }

    .yt-item-index {
        color: var(--text-muted);
        font-variant-numeric: tabular-nums;
        min-width: 24px;
    }

    .yt-item-title {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .yt-item-dur {
        font-size: 0.75rem;
        color: var(--text-secondary);
        background: var(--bg-surface);
        padding: 0.15rem 0.4rem;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border-subtle);
    }

    /* 26. YouTube Playlist Per-File Settings Block (SKILL_UI.md compliant) */
    .yt-file-settings-card {
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: 1.25rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        box-shadow: var(--shadow-sm);
    }

    .yt-file-settings-title {
        font-size: 0.92rem;
        font-weight: 700;
        color: var(--text-primary);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin: 0;
    }

    .yt-settings-row {
        width: 100%;
    }

    .yt-two-cols {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .yt-three-cols {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 1rem;
        align-items: flex-end;
    }

    .yt-input-field {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
    }

    .yt-full-col {
        width: 100%;
    }

    .yt-input-label {
        font-size: 0.82rem;
        font-weight: 600;
        color: var(--text-secondary);
    }

    .yt-song-title-col {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
    }

    .yt-static-song-title {
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 1.25rem;
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-sm);
        font-weight: 700;
        font-size: 0.9rem;
        color: var(--text-primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 320px;
        user-select: none;
    }

    @media (max-width: 640px) {
        .yt-two-cols {
            grid-template-columns: 1fr;
        }

        .yt-three-cols {
            grid-template-columns: 1fr;
        }

        .yt-song-title-col {
            order: -1;
        }

        .yt-static-song-title {
            width: 100%;
        }
    }

    /* 22. User Account Settings & Danger Zone (SKILL_UI.md Compliant) */
    .account-settings-container {
        max-width: 680px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        gap: 1.75rem;
    }

    .settings-card {
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-lg);
        padding: 1.75rem;
        box-shadow: var(--shadow-sm);
        animation: cardEnter var(--duration-normal) var(--ease-out) forwards;
    }

    .settings-card-header {
        display: flex;
        align-items: flex-start;
        gap: 0.85rem;
        margin-bottom: 1.5rem;
    }

    .settings-card-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-sm);
        color: var(--text-primary);
        flex-shrink: 0;
    }

    .settings-card-icon .icon-svg {
        width: 18px;
        height: 18px;
    }

    .settings-card-title {
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.2rem;
    }

    .settings-card-subtitle {
        font-size: 0.85rem;
        color: var(--text-secondary);
    }

    .form-row-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    @media (max-width: 600px) {
        .form-row-2 {
            grid-template-columns: 1fr;
        }
    }

    .settings-card-actions {
        display: flex;
        justify-content: flex-end;
        margin-top: 1.5rem;
    }

    /* Danger Zone - Visually distinct section with red accents */
    .danger-zone-card {
        border: 1px solid var(--border-subtle);
        background: var(--bg-surface);
        position: relative;
    }

    .danger-header .danger-icon {
        background: var(--accent-surface);
        border-color: rgba(220, 38, 38, 0.3);
        color: var(--accent);
    }

    .danger-title {
        color: var(--accent);
    }

    .danger-subtitle {
        color: var(--text-secondary);
    }

    .danger-warning-box {
        background: var(--accent-surface);
        border: 1px solid rgba(220, 38, 38, 0.25);
        border-radius: var(--radius-sm);
        padding: 0.85rem 1rem;
        margin-bottom: 1.25rem;
        font-size: 0.85rem;
        line-height: 1.5;
        color: var(--text-primary);
    }

    .danger-warning-box strong {
        color: var(--accent);
    }

    .danger-input:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 1px var(--accent);
    }

    .btn-danger {
        background: #dc2626;
        color: #ffffff;
        border: none;
        font-weight: 600;
        transition: background-color var(--duration-fast) var(--ease-out),
            transform var(--duration-fast) var(--ease-out);
    }

    .btn-danger:hover:not(:disabled) {
        background: #b91c1c;
    }

    .btn-danger:active:not(:disabled) {
        transform: scale(0.97);
    }

    [data-theme="dark"] .danger-zone-card {
        border-color: var(--border-subtle);
    }

    [data-theme="dark"] .btn-danger {
        background: #ef4444;
        color: #ffffff;
    }

    [data-theme="dark"] .btn-danger:hover:not(:disabled) {
        background: #dc2626;
    }

    /* ==========================================================================
   16. GDPR Cookie Consent Split Modal (SKILL_UI.md Compliant)
   ========================================================================== */
    .cookie-split-overlay {
        position: fixed;
        inset: 0;
        z-index: 2000;
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1.5rem;
        animation: modalBackdropEnter var(--duration-fast) var(--ease-out) forwards;
    }

    .cookie-split-card {
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-lg);
        max-width: 920px;
        width: 100%;
        display: grid;
        grid-template-columns: 1.05fr 1fr;
        box-shadow: var(--shadow-lg);
        overflow: hidden;
        max-height: 90vh;
        animation: modalScaleEnter var(--duration-normal) var(--ease-out) forwards;
    }

    /* Split Modal - Levý sloupec (Premium prezentace) */
    .cookie-split-left {
        background: var(--bg-surface-subtle);
        border-right: 1px solid var(--border-subtle);
        padding: 2.25rem;
        display: flex;
        flex-direction: column;
    }

    .split-left-title {
        font-size: 1.35rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        letter-spacing: -0.02em;
        color: var(--text-primary);
    }

    .split-left-desc {
        font-size: 0.88rem;
        color: var(--text-secondary);
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }

    .split-benefits-list {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
        flex: 1;
    }

    .split-benefit-item {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .split-benefit-icon {
        color: var(--accent);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 2px;
        flex-shrink: 0;
    }

    .split-benefit-icon .icon-svg {
        width: 18px;
        height: 18px;
    }

    .split-benefit-item strong {
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--text-primary);
        display: block;
        margin-bottom: 0.15rem;
    }

    .split-benefit-item p {
        font-size: 0.8rem;
        color: var(--text-secondary);
        line-height: 1.4;
        margin: 0;
    }

    .split-left-footer {
        display: flex;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
        margin-top: auto;
        padding-top: 1rem;
        border-top: 1px solid var(--border-subtle);
    }

    .btn-premium-split {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        background: var(--accent);
        color: var(--accent-contrast);
        border: none;
        padding: 0.65rem 1.25rem;
        border-radius: var(--radius-sm);
        font-size: 0.88rem;
        font-weight: 700;
        cursor: pointer;
        transition: background-color var(--duration-fast) var(--ease-out),
            transform var(--duration-fast) var(--ease-out);
    }

    .btn-premium-split:hover {
        background: var(--accent-hover);
    }

    .btn-premium-split:active {
        transform: scale(0.97);
    }

    .split-price-tag {
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--text-tertiary);
    }

    /* Split Modal - Pravý sloupec (GDPR Souhlas) */
    .cookie-split-right {
        padding: 2.25rem;
        display: flex;
        flex-direction: column;
    }

    .cookie-gdpr-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        color: var(--text-secondary);
        padding: 0.2rem 0.55rem;
        border-radius: var(--radius-sm);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        margin-bottom: 0.75rem;
        align-self: flex-start;
    }

    .split-right-title {
        font-size: 1.3rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        letter-spacing: -0.02em;
        color: var(--text-primary);
    }

    .split-right-text {
        font-size: 0.86rem;
        color: var(--text-secondary);
        line-height: 1.5;
        margin-bottom: 1.25rem;
    }

    .split-cookies-overview {
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
        margin-bottom: 1.5rem;
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: 0.85rem 1rem;
    }

    .cookie-type-pill {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        font-size: 0.8rem;
        color: var(--text-secondary);
    }

    .cookie-type-pill strong {
        color: var(--text-primary);
        font-weight: 600;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .cookie-pill-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--text-tertiary);
        flex-shrink: 0;
    }

    .cookie-pill-dot.active {
        background: var(--success);
    }

    .split-actions-container {
        margin-top: auto;
        display: flex;
        flex-direction: column;
        gap: 0.85rem;
    }

    .cookie-subtle-links {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        margin-top: 0.2rem;
    }

    .cookie-link-subtle {
        background: none;
        border: none;
        padding: 0;
        font-size: 0.82rem;
        color: var(--text-tertiary);
        text-decoration: underline;
        cursor: pointer;
        transition: color var(--duration-fast) var(--ease-out);
    }

    .cookie-link-subtle:hover {
        color: var(--text-primary);
    }

    .cookie-link-divider {
        color: var(--border-strong);
        font-size: 0.8rem;
    }

    /* Responzivita Split Modálu */
    @media (max-width: 768px) {
        .cookie-split-card {
            grid-template-columns: 1fr;
            overflow-y: auto;
        }

        .cookie-split-left {
            border-right: none;
            border-bottom: 1px solid var(--border-subtle);
            padding: 1.75rem;
        }

        .cookie-split-right {
            padding: 1.75rem;
        }
    }

    /* ==========================================================================
   17. Detailní nastavení cookies (CookieSettingsModal - Dle předlohy z obrázku)
   ========================================================================== */
    .cookie-settings-card {
        max-width: 680px;
        width: 100%;
        padding: 2.25rem;
    }

    .cookie-settings-header {
        margin-bottom: 1.5rem;
    }

    .cookie-settings-main-title {
        font-size: 1.55rem;
        font-weight: 700;
        letter-spacing: -0.02em;
        margin-bottom: 0.65rem;
        color: var(--text-primary);
    }

    .cookie-settings-main-desc {
        font-size: 0.93rem;
        color: var(--text-primary);
        line-height: 1.55;
        margin: 0;
    }

    /* Panel s kategoriemi cookies s jemným šedým podkladem */
    .cookie-panel-box {
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: 1.5rem;
        margin-bottom: 1.75rem;
    }

    .cookie-panel-row {
        padding: 1.15rem 0;
        border-bottom: 1px solid var(--border-subtle);
    }

    .cookie-panel-row:first-child {
        padding-top: 0;
    }

    .cookie-panel-row:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

    /* Checkbox a popis */
    .cookie-checkbox-label {
        display: inline-flex;
        align-items: center;
        gap: 0.65rem;
        cursor: pointer;
        user-select: none;
        position: relative;
    }

    .cookie-checkbox-label.disabled {
        cursor: default;
    }

    .cookie-custom-checkbox {
        position: absolute;
        opacity: 0;
        pointer-events: none;
        width: 0;
        height: 0;
    }

    .cookie-checkbox-custom {
        width: 18px;
        height: 18px;
        border-radius: 3px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        border: 1.5px solid var(--border-dropzone);
        background: var(--bg-surface);
        transition: background-color var(--duration-fast) var(--ease-out),
            border-color var(--duration-fast) var(--ease-out);
    }

    .cookie-checkbox-custom .cookie-check-icon {
        display: none;
        width: 12px;
        height: 12px;
        stroke-width: 3.5;
        stroke-linecap: round;
        stroke-linejoin: round;
        fill: none;
    }

    .cookie-checkbox-custom.checked {
        background: #2563eb;
        border-color: #2563eb;
    }

    .cookie-checkbox-custom.checked .cookie-check-icon {
        display: block;
        stroke: #ffffff;
    }

    .cookie-checkbox-custom.disabled {
        background: #e5e7eb;
        border-color: #d1d5db;
    }

    .cookie-checkbox-custom.disabled .cookie-check-icon {
        display: block;
        stroke: #9ca3af;
    }

    [data-theme="dark"] .cookie-checkbox-custom.disabled {
        background: #333333;
        border-color: #444444;
    }

    [data-theme="dark"] .cookie-checkbox-custom.disabled .cookie-check-icon {
        stroke: #666666;
    }

    [data-theme="dark"] .cookie-checkbox-custom.checked {
        background: #3b82f6;
        border-color: #3b82f6;
    }

    .cookie-checkbox-title {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-primary);
    }

    .cookie-panel-desc {
        margin: 0.45rem 0 0 28px;
        font-size: 0.88rem;
        color: var(--text-secondary);
        line-height: 1.5;
    }

    /* Akce ve spodní části modálu */
    .cookie-panel-actions {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    /* Černé tlačítko přesně dle předlohy z obrázku */
    .btn-cookie-save {
        background: #000000;
        color: #ffffff;
        font-weight: 700;
        font-size: 0.92rem;
        padding: 0.7rem 1.6rem;
        border-radius: var(--radius-sm);
        border: none;
        cursor: pointer;
        box-shadow: var(--shadow-sm);
        transition: background-color var(--duration-fast) var(--ease-out),
            transform var(--duration-fast) var(--ease-out),
            opacity var(--duration-fast) var(--ease-out);
    }

    .btn-cookie-save:hover {
        opacity: 0.9;
    }

    .btn-cookie-save:active {
        transform: scale(0.97);
    }

    [data-theme="dark"] .btn-cookie-save {
        background: #ffffff;
        color: #000000;
    }

    /* ==========================================================================
   18. Ad Banner Fallback (Ko-fi Container)
   ========================================================================== */
    .ad-fallback-kofi {
        background: var(--bg-surface);
        border: 1px dashed var(--border-dropzone);
        border-radius: var(--radius-md);
        padding: 1.25rem 1.5rem;
        max-width: 440px;
        width: 100%;
        margin: 0 auto;
        text-align: center;
        box-shadow: var(--shadow-sm);
        transition: border-color var(--duration-fast) var(--ease-out);
    }

    .ad-fallback-kofi:hover {
        border-color: var(--accent);
    }

    .ad-fallback-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
    }

    .ad-fallback-text {
        font-size: 0.92rem;
        font-weight: 500;
        color: var(--text-secondary);
        line-height: 1.5;
        margin: 0;
        text-align: center;
    }

    .ad-fallback-cookie-link {
        background: none;
        border: none;
        padding: 0;
        font-size: inherit;
        font-weight: 600;
        color: var(--accent);
        text-decoration: underline;
        cursor: pointer;
        transition: color var(--duration-fast) var(--ease-out);
    }

    .ad-fallback-cookie-link:hover {
        color: var(--accent-hover);
    }

    /* Ko-fi Button Styling (Authentic Yellow Brand Appearance) */
    .btn-kofi {
        background-color: #FFDD00;
        color: #0d0c22;
        font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
        font-weight: 700;
        font-size: 0.88rem;
        letter-spacing: -0.01em;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.55rem 1.15rem;
        border-radius: var(--radius-sm);
        text-decoration: none;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
        transition: transform var(--duration-fast) var(--ease-out),
            box-shadow var(--duration-fast) var(--ease-out),
            filter var(--duration-fast) var(--ease-out);
    }

    .btn-kofi:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
        filter: brightness(1.03);
        color: #0d0c22;
    }

    .btn-kofi:active {
        transform: scale(0.97);
    }

    .kofi-cup-icon {
        width: 18px;
        height: 18px;
        display: inline-block;
        vertical-align: middle;
    }

    /* ==========================================================================
   19. Application Footer
   ========================================================================== */
    .app-footer {
        width: 100%;
        box-sizing: border-box;
        margin-top: auto;
        border-top: 1px solid var(--border-subtle);
        background: var(--bg-surface);
        padding: 1.25rem 2rem;
    }

    .footer-container {
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .footer-left {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        font-size: 0.82rem;
        color: var(--text-tertiary);
        flex-wrap: wrap;
    }

    .footer-brand {
        font-weight: 700;
        color: var(--text-primary);
    }

    .footer-divider {
        color: var(--border-strong);
    }

    .footer-right {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .footer-link-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        background: transparent;
        border: none;
        font-size: 0.82rem;
        font-weight: 500;
        color: var(--text-secondary);
        cursor: pointer;
        padding: 0.3rem 0.55rem;
        border-radius: var(--radius-sm);
        transition: color var(--duration-fast) var(--ease-out),
            background-color var(--duration-fast) var(--ease-out);
    }

    .footer-link-btn:hover {
        color: var(--text-primary);
        background-color: var(--bg-surface-hover);
    }

    .footer-link-btn .icon-svg {
        width: 14px;
        height: 14px;
    }

    /* ==========================================================================
   20. Ad Placeholder & Cross-Promo Styling
   ========================================================================== */
    .ad-banner-responsive-wrapper {
        overflow-x: hidden;
        max-width: 100vw;
        display: flex;
        justify-content: center;
        margin: 1.5rem 0;
        width: 100%;
        box-sizing: border-box;
    }

    .ad-banner-slot {
        position: relative;
        width: 728px;
        height: 90px;
        max-width: 100%;
        min-height: 90px;
        border: 2px dashed var(--border-subtle);
        border-radius: var(--radius-md);
        background: var(--bg-surface-subtle);
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        overflow: hidden;
    }

    @media (max-width: 768px) {
        .ad-banner-slot {
            width: 320px;
            height: 50px;
            min-height: 50px;
        }
    }

    .ad-fallback-layer {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        z-index: 1;
        padding: 0.25rem 0.75rem;
        box-sizing: border-box;
        pointer-events: auto;
    }

    .ad-fallback-text {
        color: var(--text-muted);
        font-size: 0.88rem;
        font-weight: 500;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .kofi-btn-link {
        display: inline-flex;
        align-items: center;
        text-decoration: none;
        flex-shrink: 0;
        transition: transform 0.15s ease, opacity 0.15s ease;
    }

    .kofi-btn-link:hover {
        transform: scale(1.04);
        opacity: 0.95;
    }

    .kofi-btn-img {
        height: 34px;
        width: auto;
        display: block;
    }

    @media (max-width: 768px) {
        .ad-fallback-text {
            display: none;
        }
        .ad-fallback-layer {
            gap: 0.5rem;
            padding: 0.2rem 0.4rem;
        }
        .kofi-btn-img {
            height: 30px;
        }
    }

    .ad-iframe-host {
        position: absolute;
        inset: 0;
        z-index: 2;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        pointer-events: none;
    }

    .nav-brand-img {
        width: 32px;
        height: 32px;
        object-fit: contain;
        display: block;
    }

    .footer-brand-img {
        width: 20px;
        height: 20px;
        object-fit: contain;
        display: inline-block;
        vertical-align: middle;
        margin-right: 6px;
    }

    .footer-more-apps {
        max-width: 1200px;
        margin: 0 auto 1.25rem;
        padding-bottom: 1.25rem;
        border-bottom: 1px solid var(--border-subtle);
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .more-apps-title {
        font-size: 0.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-tertiary);
    }

    .more-apps-list {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .more-app-item {
        display: inline-flex;
        align-items: center;
        gap: 0.55rem;
        padding: 0.4rem 0.75rem;
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-sm);
        color: var(--text-primary);
        text-decoration: none;
        font-size: 0.84rem;
        font-weight: 500;
        transition: background-color var(--duration-fast) var(--ease-out),
            border-color var(--duration-fast) var(--ease-out),
            transform var(--duration-fast) var(--ease-out);
    }

    .more-app-item:hover {
        background: var(--bg-surface-hover);
        border-color: var(--border-focus);
        transform: translateY(-1px);
        color: var(--text-primary);
    }

    .more-app-item:active {
        transform: scale(0.97);
    }

    .more-app-icon {
        width: 22px;
        height: 22px;
        object-fit: cover;
        border-radius: var(--radius-sm);
        display: block;
    }

    .more-app-name {
        line-height: 1.2;
    }

    /* ==========================================================================
   21. Nová sekce křížového proma (Vyzkoušej další aplikace) & Patička
   ========================================================================== */
    .apps-promo-section {
        max-width: 728px;
        width: 100%;
        margin: 2rem auto 2.5rem;
        text-align: center;
    }

    .apps-promo-title {
        font-size: 1.15rem;
        font-weight: 700;
        letter-spacing: -0.01em;
        color: var(--text-primary);
        margin: 0 0 0.85rem;
    }

    .apps-promo-divider {
        border: none;
        height: 1px;
        background: var(--border-subtle);
        margin: 0 auto 1.5rem;
        width: 100%;
    }

    .apps-promo-container {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .app-promo-link {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        gap: 0.35rem;
        padding: 0.5rem 1rem;
        background: transparent;
        border: none;
        box-shadow: none;
        text-decoration: none;
        color: var(--text-primary);
        cursor: pointer;
        transition: opacity var(--duration-fast) var(--ease-out),
            transform var(--duration-fast) var(--ease-out);
    }

    .app-promo-link:hover {
        opacity: 0.85;
    }

    .app-promo-link:hover .app-promo-icon {
        transform: scale(1.05);
    }

    .app-promo-link:active {
        transform: scale(0.97);
    }

    .app-promo-icon {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: var(--radius-md);
        margin-bottom: 0.25rem;
        display: block;
        transition: transform var(--duration-fast) var(--ease-out);
    }

    .app-promo-name {
        font-size: 0.9375rem;
        font-weight: 600;
        color: var(--text-primary);
        line-height: 1.3;
        letter-spacing: -0.01em;
    }

    .app-promo-domain {
        font-size: 0.775rem;
        color: var(--text-tertiary);
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    }

    /* Úprava patičky - pouze ikona s tooltipem */
    .more-app-icon-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.35rem;
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-sm);
        transition: background-color var(--duration-fast) var(--ease-out),
            border-color var(--duration-fast) var(--ease-out),
            transform var(--duration-fast) var(--ease-out);
        text-decoration: none;
    }

    .more-app-icon-link:hover {
        background: var(--bg-surface-hover);
        border-color: var(--border-focus);
        transform: translateY(-1px);
    }

    .more-app-icon-link:active {
        transform: scale(0.95);
    }

    .more-app-icon-only {
        width: 22px;
        height: 22px;
        object-fit: cover;
        border-radius: var(--radius-sm);
        display: block;
    }

    /* 26. Image & SVG Converter Styles */
    .converter-mode-container {
        display: flex;
        align-items: center;
        margin-top: 1rem;
    }

    .converter-mode-pills {
        display: inline-flex;
        align-items: center;
        padding: 0.25rem;
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        gap: 0.25rem;
    }

    .mode-pill-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.45rem 1rem;
        background: transparent;
        border: none;
        border-radius: var(--radius-sm);
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all var(--duration-fast) var(--ease-out);
    }

    .mode-pill-btn:hover {
        color: var(--text-primary);
        background: var(--bg-surface-hover);
    }

    .mode-pill-btn.active {
        background: var(--accent);
        color: var(--accent-contrast);
        background-color: var(--theme-color);
        color: var(--theme-text-color, #ffffff);
        border-color: var(--theme-color);
        box-shadow: var(--shadow-sm);
    }

    .mode-pill-btn.active .icon-svg {
        stroke: var(--theme-text-color, #ffffff);
    }

    .mode-pill-btn.active:hover {
        background-color: var(--theme-color-hover, var(--theme-color));
        color: var(--theme-text-color, #ffffff);
    }

    .mode-pill-btn .icon-svg {
        width: 15px;
        height: 15px;
    }

    .file-dimensions-tag {
        color: var(--text-tertiary);
        font-weight: 500;
        font-size: 0.78rem;
    }

    .card-section {
        margin-top: 1.5rem;
        padding-top: 1.25rem;
        border-top: 1px solid var(--border-subtle);
    }

    .section-title {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 1rem;
    }

    .section-title .icon-svg {
        width: 18px;
        height: 18px;
        color: var(--accent);
    }

    .custom-dimension-inputs {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        margin-bottom: 0.6rem;
    }

    .dim-divider {
        font-weight: 700;
        color: var(--text-tertiary);
    }

    .clean-checkbox-label {
        display: flex;
        align-items: flex-start;
        gap: 0.6rem;
        cursor: pointer;
        user-select: none;
        font-size: 0.88rem;
        color: var(--text-primary);
    }

    .clean-checkbox-label input[type="checkbox"] {
        accent-color: var(--accent);
        width: 18px;
        height: 18px;
        margin-top: 2px;
        cursor: pointer;
    }

    .checkbox-subtext {
        font-size: 0.78rem;
        color: var(--text-tertiary);
        margin-top: 0.2rem;
        margin-bottom: 0;
        line-height: 1.35;
    }

    .edit-options-box {
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: 1rem 1.15rem;
    }

    .tolerance-slider-box {
        margin-top: 1rem;
        padding-top: 0.85rem;
        border-top: 1px dashed var(--border-subtle);
    }

    .slider-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--text-secondary);
        margin-bottom: 0.4rem;
    }

    .option-val-badge {
        background: var(--accent-surface);
        color: var(--accent);
        padding: 0.15rem 0.45rem;
        border-radius: var(--radius-sm);
        font-size: 0.75rem;
        font-weight: 700;
    }

    .clean-range {
        width: 100%;
        accent-color: var(--accent);
        cursor: pointer;
    }

    .slider-hints {
        display: flex;
        justify-content: space-between;
        font-size: 0.75rem;
        color: var(--text-tertiary);
        margin-top: 0.25rem;
    }

    .inline-warning {
        margin-top: 0.6rem;
        font-size: 0.8rem;
        color: var(--warning);
        background: var(--warning-surface);
        padding: 0.5rem 0.75rem;
        border-radius: var(--radius-sm);
        border: 1px solid rgba(245, 158, 11, 0.2);
    }

    .preview-box {
        margin-top: 0.75rem;
        background: repeating-conic-gradient(#80808020 0% 25%, transparent 0% 50%) 50% / 16px 16px;
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: 0.75rem;
        display: flex;
        justify-content: center;
        align-items: center;
        max-height: 280px;
        overflow: hidden;
    }

    .preview-img {
        max-width: 100%;
        max-height: 250px;
        object-fit: contain;
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-sm);
    }

    .rules-card {
        padding: 2rem 1.75rem;
    }

    .rules-heading {
        font-size: 1.35rem;
        font-weight: 800;
        color: var(--text-primary);
        margin-bottom: 1.5rem;
        letter-spacing: -0.02em;
    }

    .rules-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 1.25rem;
        margin-bottom: 2rem;
    }

    .rule-box {
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: 1.25rem;
        position: relative;
    }

    .rule-badge {
        display: inline-block;
        background: var(--accent);
        color: var(--accent-contrast);
        font-size: 0.75rem;
        font-weight: 700;
        padding: 0.2rem 0.5rem;
        border-radius: var(--radius-sm);
        margin-bottom: 0.65rem;
    }

    .rule-box h3 {
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.4rem;
    }

    .rule-box p {
        font-size: 0.85rem;
        color: var(--text-secondary);
        line-height: 1.45;
        margin: 0;
    }

    .rules-tips {
        background: var(--bg-surface-elevated);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: 1.25rem 1.5rem;
    }

    .rules-tips h3 {
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.75rem;
    }

    .rules-tips ul {
        margin: 0;
        padding-left: 1.25rem;
        color: var(--text-secondary);
        font-size: 0.88rem;
        line-height: 1.6;
    }

    /* ==========================================================================
   24. Legal Pages & Modals (Terms of Use, Terms and Conditions)
   ========================================================================== */
    .legal-modal-backdrop {
        z-index: 1200;
    }

    .legal-modal-card {
        max-width: 800px;
        max-height: 85vh;
        display: flex;
        flex-direction: column;
        padding: 2rem 2.25rem;
        box-sizing: border-box;
        overflow: hidden;
    }

    .legal-modal-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--border-subtle);
    }

    .legal-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.25rem 0.65rem;
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--accent);
        background: var(--bg-surface-elevated);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-full);
        margin-bottom: 0.5rem;
    }

    .legal-badge .icon-svg {
        width: 14px;
        height: 14px;
    }

    .legal-modal-title {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--text-primary);
        margin: 0.25rem 0;
        letter-spacing: -0.02em;
    }

    .legal-subtitle {
        font-size: 0.85rem;
        color: var(--text-tertiary);
        margin: 0;
    }

    .legal-content-scroll {
        overflow-y: auto;
        padding-right: 0.75rem;
        flex: 1;
        margin: 0.5rem 0 1rem;
    }

    .legal-content-scroll::-webkit-scrollbar {
        width: 6px;
    }

    .legal-content-scroll::-webkit-scrollbar-track {
        background: var(--bg-surface-subtle);
        border-radius: var(--radius-full);
    }

    .legal-content-scroll::-webkit-scrollbar-thumb {
        background: var(--border-strong);
        border-radius: var(--radius-full);
    }

    .legal-text-flow .legal-section {
        margin-bottom: 1.5rem;
    }

    .legal-text-flow h3 {
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--text-primary);
        margin: 1.5rem 0 0.5rem;
    }

    .legal-text-flow h3:first-child {
        margin-top: 0;
    }

    .legal-text-flow h4 {
        font-size: 0.98rem;
        font-weight: 600;
        color: var(--text-primary);
        margin: 1rem 0 0.4rem;
    }

    .legal-text-flow p {
        font-size: 0.9rem;
        line-height: 1.6;
        color: var(--text-secondary);
        margin: 0 0 0.75rem;
    }

    .legal-text-flow ul {
        margin: 0 0 0.75rem;
        padding-left: 1.35rem;
        color: var(--text-secondary);
        font-size: 0.88rem;
        line-height: 1.6;
    }

    .legal-text-flow ul li {
        margin-bottom: 0.35rem;
    }

    .legal-modal-actions {
        display: flex;
        gap: 0.75rem;
        align-items: center;
        justify-content: flex-end;
        padding-top: 1rem;
        border-top: 1px solid var(--border-subtle);
    }

    .legal-external-link {
        display: inline-flex;
        align-items: center;
        font-size: 0.85rem;
        text-decoration: none;
        color: var(--text-secondary);
    }

    .legal-external-link:hover {
        color: var(--text-primary);
    }

    /* Legal Standalone Page Layout */
    .legal-page-container {
        max-width: 900px;
        margin: 2rem auto 4rem;
        padding: 0 1.25rem;
    }

    .legal-page-card {
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-lg);
        padding: 2.75rem;
        box-shadow: var(--shadow-sm);
    }

    .legal-page-header {
        margin-bottom: 2rem;
    }

    .legal-back-link {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--text-secondary);
        text-decoration: none;
        margin-bottom: 1rem;
        transition: color var(--duration-fast);
    }

    .legal-back-link:hover {
        color: var(--accent);
    }

    .legal-page-title {
        font-size: 2rem;
        font-weight: 800;
        letter-spacing: -0.02em;
        color: var(--text-primary);
        margin: 0.35rem 0 0.5rem;
    }

    /* ==========================================================================
   25. Terms Agreement Checkboxes & Form Validation
   ========================================================================== */
    .terms-agreement-box {
        margin: 1.15rem 0 0.85rem;
        padding: 0.75rem 1rem;
        background: var(--bg-surface-subtle);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        transition: border-color var(--duration-fast);
    }

    .terms-agreement-box:hover {
        border-color: var(--border-strong);
    }

    .register-terms-box {
        margin: 0.75rem 0 1.25rem;
    }

    .terms-checkbox-label {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        font-size: 0.88rem;
        color: var(--text-primary);
        cursor: pointer;
        user-select: none;
    }

    .terms-checkbox {
        width: 18px;
        height: 18px;
        accent-color: var(--accent);
        cursor: pointer;
        border-radius: 4px;
        flex-shrink: 0;
    }

    .terms-link {
        color: var(--accent);
        text-decoration: underline;
        font-weight: 600;
        cursor: pointer;
        transition: opacity var(--duration-fast);
    }

    .terms-link:hover {
        opacity: 0.85;
    }

    /* Form Validation Feedback */
    .validation-error,
    .validation-message {
        display: block;
        color: var(--error);
        font-size: 0.85rem;
        line-height: 1.35;
        margin-top: 0.35rem;
        font-weight: 500;
        text-align: left;
    }

    .form-control.invalid,
    .form-control.modified.invalid,
    input.invalid {
        border-color: var(--error) !important;
    }

    .form-control.invalid:focus,
    .form-control.modified.invalid:focus,
    input.invalid:focus {
        box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2) !important;
    }

    /* Disabled payment & action button states */
    .btn-generate-qr:disabled,
    .btn-paypal:disabled,
    .btn-primary:disabled {
        opacity: 0.45 !important;
        cursor: not-allowed !important;
        pointer-events: auto !important;
        filter: grayscale(0.85);
        box-shadow: none !important;
        transform: none !important;
    }

    /* Auth loading placeholder in header */
    .auth-header-loading {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
    }

    .auth-loading-dot {
        width: 14px;
        height: 14px;
        border: 2px solid var(--border-subtle);
        border-top-color: var(--accent);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    .mobile-auth-loading {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.6rem;
        padding: 0.75rem 1rem;
        color: var(--text-secondary);
        font-size: 0.88rem;
    }

    /* Auth Route View State Cards */
    .auth-status-container {
        width: 100%;
        max-width: 520px;
        margin: 3.5rem auto;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    .auth-status-card {
        text-align: center;
        padding: 2.5rem 2rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .auth-icon-circle {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--bg-surface-elevated);
        border: 1px solid var(--border-subtle);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--theme-color, var(--accent));
        margin-bottom: 1.25rem;
    }

    .auth-icon-circle .icon-svg {
        width: 28px;
        height: 28px;
    }

    .auth-status-title {
        font-size: 1.35rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
    }

    .auth-status-desc {
        color: var(--text-secondary);
        font-size: 0.95rem;
        line-height: 1.5;
        margin: 0;
    }

    .auth-status-text {
        margin-top: 1rem;
        color: var(--text-secondary);
        font-weight: 500;
    }