/**
 * Unified Components CSS
 * ======================
 * Shared styles for unified components across the admin interface.
 * This ensures visual consistency between Blade components and JS-rendered elements.
 *
 * v2.0 - Enhanced with WCAG AAA compliance and unified psychovisual design system
 */

/* ========================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   WCAG AAA Compliant Color System
   ======================================== */
:root {
    /* ========== PRIMARY COLORS (Consolidated Single Source) ========== */
    --hd-primary: #4634ff;
    --hd-primary-light: #7367f0;
    --hd-primary-dark: #3525d9;
    --hd-primary-darker: #2819b8;
    --hd-primary-rgb: 70, 52, 255;

    /* ========== STATUS COLORS (WCAG AAA - 7:1 minimum contrast) ========== */
    /* Success - Dark green for text, lighter for backgrounds */
    --hd-success: #1e7e34;
    --hd-success-light: rgba(30, 126, 52, 0.12);
    --hd-success-lighter: #28c76f;
    --hd-success-border: rgba(30, 126, 52, 0.3);

    /* Warning - Dark gold for text, lighter for backgrounds */
    --hd-warning: #856404;
    --hd-warning-light: rgba(255, 193, 7, 0.15);
    --hd-warning-lighter: #ff9f43;
    --hd-warning-border: rgba(255, 193, 7, 0.35);

    /* Danger - Dark red for text, lighter for backgrounds */
    --hd-danger: #bd2130;
    --hd-danger-light: rgba(220, 53, 69, 0.12);
    --hd-danger-lighter: #ea5455;
    --hd-danger-border: rgba(220, 53, 69, 0.3);

    /* Info - Dark teal for text, lighter for backgrounds */
    --hd-info: #0097a7;
    --hd-info-light: rgba(0, 207, 232, 0.12);
    --hd-info-lighter: #00cfe8;
    --hd-info-border: rgba(0, 207, 232, 0.3);

    /* Processing - Blue (calm, ongoing) instead of orange */
    --hd-processing: #0066cc;
    --hd-processing-light: rgba(0, 102, 204, 0.12);
    --hd-processing-border: rgba(0, 102, 204, 0.3);

    /* ========== NEUTRAL COLORS ========== */
    --hd-gray-50: #f8f9fa;
    --hd-gray-100: #f1f3f5;
    --hd-gray-200: #e9ecef;
    --hd-gray-300: #dee2e6;
    --hd-gray-400: #ced4da;
    --hd-gray-500: #adb5bd;
    --hd-gray-600: #6c757d;
    --hd-gray-700: #495057;
    --hd-gray-800: #343a40;
    --hd-gray-900: #212529;

    /* ========== TEXT COLORS (WCAG AAA Compliant) ========== */
    --hd-text-primary: #1a1a2e;     /* 14.8:1 - Maximum readability */
    --hd-text-secondary: #495057;   /* 9.2:1 - AAA for body text */
    --hd-text-muted: #5e5873;       /* 7.1:1 - AAA compliant */
    --hd-text-disabled: #adb5bd;    /* 3.2:1 - Large text only */
    --hd-text: #5e5873;
    --hd-text-light: #a8a8a8;

    /* ========== BORDER COLORS ========== */
    --hd-border: #ebe9f1;
    --hd-border-light: #f0f0f0;
    --hd-border-focus: var(--hd-primary);

    /* ========== SPACING SYSTEM (8px Grid) ========== */
    --hd-space-xs: 4px;
    --hd-space-sm: 8px;
    --hd-space-md: 16px;
    --hd-space-lg: 24px;
    --hd-space-xl: 32px;
    --hd-space-2xl: 48px;
    --hd-space-section: 28px;  /* For section separators */

    /* ========== BORDER RADIUS SYSTEM ========== */
    --hd-radius-sm: 6px;
    --hd-radius-md: 10px;
    --hd-radius-lg: 14px;
    --hd-radius-xl: 18px;
    --hd-radius-full: 9999px;

    /* ========== UNIFIED TIMING SYSTEM ========== */
    --hd-duration-instant: 0.1s;    /* Immediate feedback */
    --hd-duration-fast: 0.15s;      /* Quick transitions */
    --hd-duration-normal: 0.25s;    /* Standard interactions */
    --hd-duration-moderate: 0.35s;  /* Emphasized movements */
    --hd-duration-slow: 0.5s;       /* Complex transitions */
    --hd-duration-slower: 0.75s;    /* Dramatic effects */

    /* ========== UNIFIED EASING FUNCTIONS ========== */
    --hd-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);        /* Material standard */
    --hd-ease-decelerate: cubic-bezier(0, 0, 0.2, 1);        /* Entering screen */
    --hd-ease-accelerate: cubic-bezier(0.4, 0, 1, 1);        /* Leaving screen */
    --hd-ease-sharp: cubic-bezier(0.4, 0, 0.6, 1);           /* Quick snap */
    --hd-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);     /* Playful bounce */
    --hd-ease-spring: cubic-bezier(0.5, 1.25, 0.75, 1.25);   /* Spring physics */
    --hd-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);          /* Alias for standard */

    /* ========== SHADOW SYSTEM ========== */
    --hd-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --hd-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --hd-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --hd-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
    --hd-shadow-primary: 0 4px 16px rgba(70, 52, 255, 0.2);
    --hd-shadow-focus: 0 0 0 3px rgba(70, 52, 255, 0.15);

    /* ========== TYPOGRAPHY TOKENS ========== */
    --hd-font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --hd-font-mono: ui-monospace, 'SF Mono', 'Monaco', 'Cascadia Code', monospace;

    --hd-text-xs: 0.694rem;    /* 11.1px */
    --hd-text-sm: 0.833rem;    /* 13.3px */
    --hd-text-base: 1rem;      /* 16px */
    --hd-text-md: 1.2rem;      /* 19.2px */
    --hd-text-lg: 1.44rem;     /* 23px */
    --hd-text-xl: 1.728rem;    /* 27.6px */
    --hd-text-2xl: 2.074rem;   /* 33.2px */

    --hd-font-light: 300;
    --hd-font-normal: 400;
    --hd-font-medium: 500;
    --hd-font-semibold: 600;
    --hd-font-bold: 700;
    --hd-font-extrabold: 800;

    --hd-leading-tight: 1.25;
    --hd-leading-snug: 1.375;
    --hd-leading-normal: 1.5;
    --hd-leading-relaxed: 1.625;
}

/* ========================================
   HEALTH INDICATOR (Unified 5-Dot System)
   Compatible with:
   - x-content-health-indicator component
   - episodes-tab .ep-health class
   ======================================== */

/* Base Health Indicator */
.health-indicator,
.ep-health {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Health Dots */
.health-indicator__dot,
.ep-health__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--hd-gray-300);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Size Variants */
.health-indicator--sm .health-indicator__dot,
.ep-health--sm .ep-health__dot {
    width: 6px;
    height: 6px;
}

.health-indicator--lg .health-indicator__dot,
.ep-health--lg .ep-health__dot {
    width: 10px;
    height: 10px;
}

/* Status Colors - Unified naming */
.health-indicator__dot.health-dot--success,
.ep-health__dot.health-dot--success,
.ep-health__dot--success {
    background-color: var(--hd-success);
    box-shadow: 0 0 4px rgba(40, 199, 111, 0.4);
}

.health-indicator__dot.health-dot--processing,
.ep-health__dot.health-dot--processing,
.ep-health__dot--processing {
    background-color: var(--hd-warning);
    animation: health-dot-pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 4px rgba(255, 159, 67, 0.4);
}

.health-indicator__dot.health-dot--error,
.ep-health__dot.health-dot--error,
.ep-health__dot--error {
    background-color: var(--hd-danger);
    box-shadow: 0 0 4px rgba(234, 84, 85, 0.4);
}

.health-indicator__dot.health-dot--pending,
.ep-health__dot.health-dot--pending,
.ep-health__dot--pending {
    background-color: var(--hd-info);
    opacity: 0.7;
}

.health-indicator__dot.health-dot--empty,
.ep-health__dot.health-dot--empty,
.ep-health__dot--empty {
    background-color: var(--hd-gray-300);
    opacity: 0.5;
}

/* Hover Effect */
.health-indicator:hover .health-indicator__dot,
.ep-health:hover .ep-health__dot {
    transform: scale(1.2);
}

@keyframes health-dot-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.85);
    }
}

/* ========================================
   VIDEO STATUS BADGE (Unified)
   ======================================== */

.video-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.video-status-badge--sm {
    padding: 2px 6px;
    font-size: 0.7rem;
}

.video-status-badge--lg {
    padding: 6px 14px;
    font-size: 0.875rem;
}

.video-status--success {
    background: linear-gradient(135deg, var(--hd-success-light), rgba(40, 199, 111, 0.1));
    color: #1f9d55;
    border: 1px solid rgba(40, 199, 111, 0.3);
}

.video-status--processing {
    background: linear-gradient(135deg, var(--hd-warning-light), rgba(255, 159, 67, 0.1));
    color: #cc7a00;
    border: 1px solid rgba(255, 159, 67, 0.3);
    animation: status-pulse 2s ease-in-out infinite;
}

.video-status--pending {
    background: linear-gradient(135deg, var(--hd-info-light), rgba(0, 207, 232, 0.1));
    color: #0097a7;
    border: 1px solid rgba(0, 207, 232, 0.3);
}

.video-status--error {
    background: linear-gradient(135deg, var(--hd-danger-light), rgba(234, 84, 85, 0.1));
    color: #cc3333;
    border: 1px solid rgba(234, 84, 85, 0.3);
}

.video-status--none {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.1), rgba(108, 117, 125, 0.05));
    color: var(--hd-gray-600);
    border: 1px solid rgba(108, 117, 125, 0.2);
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(0.98); }
}

/* ========================================
   PROCESSING PROGRESS (Unified)
   ======================================== */

.processing-progress {
    --progress-primary: var(--hd-primary);
    --progress-success: var(--hd-success);
    --progress-warning: var(--hd-warning);
    --progress-danger: var(--hd-danger);
    --progress-bg: var(--hd-gray-200);
}

/* Bar Progress */
.processing-progress--bar {
    width: 100%;
}

.processing-progress__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.875rem;
}

.processing-progress__info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.processing-progress__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--hd-text-muted);
}

.processing-progress__track {
    height: 6px;
    background: var(--progress-bg);
    border-radius: 3px;
    overflow: hidden;
}

.processing-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--progress-primary), var(--hd-primary-light));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.processing-progress--active .processing-progress__fill {
    background: linear-gradient(90deg, var(--progress-warning), #ffbf80);
}

.processing-progress--success .processing-progress__fill {
    background: var(--progress-success);
    width: 100% !important;
}

.processing-progress--error .processing-progress__fill {
    background: var(--progress-danger);
}

/* Spinner */
.processing-progress__spinner,
.loading-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--progress-bg);
    border-top-color: var(--progress-warning);
    border-radius: 50%;
    animation: progress-spin 0.8s linear infinite;
}

.loading-spinner--sm {
    width: 10px;
    height: 10px;
    border-width: 1.5px;
}

.loading-spinner--lg {
    width: 20px;
    height: 20px;
    border-width: 3px;
}

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

/* ========================================
   BULK ACTION TOOLBAR (Unified)
   ======================================== */

.bulk-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--hd-gray-50);
    border-radius: 8px;
    margin-bottom: 16px;
}

.bulk-toolbar__select-all {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bulk-toolbar__count {
    font-size: 0.875rem;
    color: var(--hd-text-muted);
    padding: 4px 12px;
    background: var(--hd-primary-light);
    border-radius: 16px;
    color: var(--hd-primary);
    font-weight: 600;
}

.bulk-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* ========================================
   NOTIFICATION TOAST (Unified Position)
   ======================================== */

/* Standardize toast position to top-right */
.toast-container {
    position: fixed !important;
    top: 80px !important;
    right: 20px !important;
    z-index: 1060;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.cursor-pointer { cursor: pointer; }
.cursor-move { cursor: move; }
.cursor-not-allowed { cursor: not-allowed; }

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.min-width-0 { min-width: 0; }

/* Gradient text */
.text-gradient {
    background: linear-gradient(135deg, var(--hd-primary), var(--hd-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Kbd styling for shortcuts */
.kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--hd-gray-700);
    background: var(--hd-gray-100);
    border: 1px solid var(--hd-gray-300);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Shortcut hint styling */
.shortcut-hint {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
    opacity: 0.7;
}

/* ========================================
   PHASE 2: EPISODE MANAGER POLISH
   Visual & Psychovisual Enhancements
   ======================================== */

/* ----------------------------------------
   NEW KEYFRAMES & ANIMATIONS
   ---------------------------------------- */

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

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

@keyframes slideInFromRight {
    from { opacity: 0; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

@keyframes skeletonPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

@keyframes bounceIn {
    0% { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes checkMark {
    0% { stroke-dashoffset: 24; }
    100% { stroke-dashoffset: 0; }
}

/* ----------------------------------------
   HEALTH DASHBOARD - Glassmorphism
   ---------------------------------------- */

.health-dashboard {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.9) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow:
        0 8px 32px rgba(99, 102, 241, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.health-dashboard:hover {
    box-shadow:
        0 12px 40px rgba(99, 102, 241, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    transform: translateY(-2px);
}

.health-dashboard__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.health-dashboard__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--hd-gray-700);
}

.health-dashboard__title i {
    font-size: 1.3rem;
    color: var(--hd-danger);
    animation: heartbeat 2s ease-in-out infinite;
}

.health-dashboard__score {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--hd-primary), var(--hd-success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.health-dashboard__progress {
    height: 8px;
    background: var(--hd-gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.health-dashboard__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--hd-primary), var(--hd-primary-light), var(--hd-success));
    background-size: 200% 100%;
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: progressShimmer 3s ease-in-out infinite;
}

.health-dashboard__issues {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.health-dashboard__issue {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--hd-danger-light);
    color: var(--hd-danger);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(234, 84, 85, 0.2);
    transition: all 0.2s ease;
}

.health-dashboard__issue:hover {
    background: rgba(234, 84, 85, 0.2);
    transform: translateY(-1px);
}

.health-dashboard__issue i {
    font-size: 14px;
}

.health-dashboard__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.health-dashboard__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid var(--hd-gray-300);
    background: white;
    color: var(--hd-gray-700);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.health-dashboard__btn:hover {
    background: var(--hd-gray-50);
    border-color: var(--hd-gray-400);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.health-dashboard__btn--primary {
    background: linear-gradient(135deg, var(--hd-primary), var(--hd-primary-light));
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.health-dashboard__btn--primary:hover {
    background: linear-gradient(135deg, var(--hd-primary-dark), var(--hd-primary));
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* ----------------------------------------
   STATS CARDS - P1 FIX: Reduced Visual Weight
   More subtle design to not compete with health dashboard
   ---------------------------------------- */

.episodes-stats-card {
    border-radius: 12px !important;
    border: 1px solid var(--hd-gray-200) !important;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: white !important;
}

.episodes-stats-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, transparent 100%);
    pointer-events: none;
}

.episodes-stats-card:hover {
    transform: translateY(-2px);
    border-color: var(--hd-gray-300) !important;
}

/* Subtle colored left border instead of full gradient background */
.episodes-stats-card.bg-primary {
    background: white !important;
    border-left: 4px solid var(--hd-primary) !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
    color: var(--hd-text) !important;
}

.episodes-stats-card.bg-primary:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
}

.episodes-stats-card.bg-success {
    background: white !important;
    border-left: 4px solid var(--hd-success) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
    color: var(--hd-text) !important;
}

.episodes-stats-card.bg-success:hover {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.12);
}

.episodes-stats-card.bg-info {
    background: white !important;
    border-left: 4px solid #3b82f6 !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
    color: var(--hd-text) !important;
}

.episodes-stats-card.bg-info:hover {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.12);
}

.episodes-stats-card.bg-warning {
    background: white !important;
    border-left: 4px solid var(--hd-warning) !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
    color: var(--hd-text) !important;
}

.episodes-stats-card.bg-warning:hover {
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.12);
}

.episodes-stats-card .card-body {
    position: relative;
    z-index: 1;
}

/* Icon boxes with subtle colored backgrounds */
.episodes-stats-card__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-right: 14px;
    transition: transform 0.3s ease;
}

.episodes-stats-card.bg-primary .episodes-stats-card__icon {
    background: rgba(99, 102, 241, 0.12);
    color: var(--hd-primary);
}

.episodes-stats-card.bg-success .episodes-stats-card__icon {
    background: rgba(16, 185, 129, 0.12);
    color: var(--hd-success);
}

.episodes-stats-card.bg-info .episodes-stats-card__icon {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

.episodes-stats-card.bg-warning .episodes-stats-card__icon {
    background: rgba(245, 158, 11, 0.12);
    color: var(--hd-warning);
}

.episodes-stats-card:hover .episodes-stats-card__icon {
    transform: scale(1.08);
}

.episodes-stats-card__icon i {
    font-size: 1.4rem;
}

.episodes-stats-card__number {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    margin-bottom: 2px;
    color: var(--hd-gray-800);
}

.episodes-stats-card__label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hd-gray-500);
}

/* ----------------------------------------
   TOOLBAR - Visual Grouping
   ---------------------------------------- */

.episodes-toolbar {
    background: linear-gradient(180deg, var(--hd-gray-50) 0%, white 100%);
    border: 1px solid var(--hd-gray-200);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.episodes-toolbar .card-body {
    padding: 0 !important;
}

.episodes-toolbar__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.episodes-toolbar__group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    position: relative;
}

.episodes-toolbar__group:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    width: 1px;
    background: var(--hd-gray-300);
}

.episodes-toolbar__group--primary {
    background: rgba(99, 102, 241, 0.08);
    border-radius: 10px;
    padding: 6px 14px;
}

.episodes-toolbar__group--primary::after {
    display: none;
}

.episodes-toolbar__group--selection {
    padding-left: 0;
}

.episodes-toolbar__group--utilities {
    padding-right: 0;
}

.episodes-toolbar__group--utilities::after {
    display: none;
}

/* ----------------------------------------
   SEASON CARDS - Header Polish
   ---------------------------------------- */

.season-card {
    border: 1px solid var(--hd-gray-200) !important;
    border-radius: 12px !important;
    overflow: hidden;
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.season-card:hover {
    border-color: var(--hd-primary) !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

.season-card > .card-header {
    background: linear-gradient(90deg, var(--hd-gray-50) 0%, transparent 100%) !important;
    border-bottom: 1px solid var(--hd-gray-200) !important;
    border-left: 4px solid var(--hd-primary) !important;
    padding: 14px 16px !important;
    transition: all 0.3s ease;
}

.season-card:hover > .card-header {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.06) 0%, transparent 100%) !important;
}

.season-card .season-drag-handle {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: var(--hd-gray-400);
}

.season-card .season-drag-handle:hover {
    background: var(--hd-gray-200);
    color: var(--hd-gray-600);
}

.season-card .collapse-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--hd-gray-500);
}

.season-card .card-header[aria-expanded="false"] .collapse-icon,
.season-card.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.season-card .season-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--hd-gray-800);
}

.season-card .season-episode-count {
    background: linear-gradient(135deg, var(--hd-primary), var(--hd-primary-light));
    border: none;
    font-weight: 600;
    padding: 4px 10px;
    font-size: 12px;
}

/* P0 FIX: Actions always visible but subtle - improves discoverability */
.season-card__actions {
    display: flex;
    gap: 4px;
    opacity: 0.4;  /* Subtle visibility instead of hidden */
    transform: translateX(0);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.season-card .card-header:hover .season-card__actions,
.season-card:focus-within .season-card__actions {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile: Always show actions */
@media (max-width: 768px) {
    .season-card__actions {
        opacity: 1;
    }
}

.season-card__actions .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* P1 FIX: Unsorted episodes section - unified with season card styling */
#unsortedEpisodesSection {
    border: 1px solid var(--hd-gray-200) !important;
    border-radius: 12px !important;
    overflow: hidden;
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

#unsortedEpisodesSection:hover {
    border-color: var(--hd-gray-400) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

#unsortedEpisodesSection > .card-header {
    background: linear-gradient(90deg, var(--hd-gray-100) 0%, rgba(248, 249, 250, 0.5) 100%) !important;
    border-bottom: 1px solid var(--hd-gray-200) !important;
    border-left: 4px solid var(--hd-gray-400) !important;
    padding: 14px 16px !important;
    transition: all 0.3s ease;
}

#unsortedEpisodesSection:hover > .card-header {
    background: linear-gradient(90deg, rgba(108, 117, 125, 0.08) 0%, transparent 100%) !important;
    border-left-color: var(--hd-gray-500) !important;
}

/* Unsorted section icon styling */
#unsortedEpisodesSection .la-folder-open {
    color: var(--hd-gray-500);
    transition: color 0.2s ease;
}

#unsortedEpisodesSection:hover .la-folder-open {
    color: var(--hd-gray-600);
}

/* ----------------------------------------
   EPISODE ROWS - Refinements
   ---------------------------------------- */

/* P0 FIX: Enhanced episode row with pronounced left-border highlight */
.episode-item {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    position: relative;
    background: transparent;
}

/* Subtle zebra striping */
.episode-item:nth-child(even) {
    background: rgba(99, 102, 241, 0.018);
}

/* Hover state with lift effect and border highlight */
.episode-item:hover {
    background: rgba(99, 102, 241, 0.055);
    border-left-color: var(--hd-primary);
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

/* Inner glow effect on hover */
.episode-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.06) 0%, transparent 30%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.episode-item:hover::before {
    opacity: 1;
}

/* Focus state for accessibility */
.episode-item:focus {
    outline: none;
    background: rgba(99, 102, 241, 0.08);
    border-left-color: var(--hd-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) inset;
}

/* Selected state */
.episode-item[aria-selected="true"] {
    background: rgba(99, 102, 241, 0.1);
    border-left-color: var(--hd-primary);
    border-left-width: 4px;
}

/* Flash animation for feedback */
@keyframes episodeFlash {
    0% { background: rgba(99, 102, 241, 0.15); }
    100% { background: transparent; }
}

.episode-item.flash {
    animation: episodeFlash 0.6s ease-out;
}

.episode-row {
    padding: 12px 16px !important;
    min-height: 72px;
}

.episode-drag-handle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: var(--hd-gray-400);
}

.episode-drag-handle:hover {
    background: var(--hd-gray-200);
    color: var(--hd-gray-600);
    transform: scale(1.1);
}

.episode-item .form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid var(--hd-gray-300);
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.episode-item .form-check-input:hover {
    border-color: var(--hd-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.episode-item .form-check-input:checked {
    background-color: var(--hd-primary);
    border-color: var(--hd-primary);
    animation: bounceIn 0.3s ease;
}

.episode-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.episode-thumb-img {
    border: 2px solid var(--hd-gray-200);
    border-radius: 8px;
    transition: all 0.3s ease;
    object-fit: cover;
}

.episode-item:hover .episode-thumb-img {
    border-color: var(--hd-primary);
    transform: scale(1.02);
}

.episode-info {
    min-width: 0;
}

.episode-number {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--hd-gray-100);
    color: var(--hd-gray-600);
    font-variant-numeric: tabular-nums;
}

.episode-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--hd-gray-800);
    margin: 0;
    line-height: 1.4;
}

.episode-name {
    font-size: 12px;
    color: var(--hd-gray-500);
}

.episode-status .form-switch {
    padding-left: 2.5em;
}

.episode-status .form-check-input {
    width: 40px;
    height: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.episode-status .form-check-input:checked {
    background-color: var(--hd-success);
    border-color: var(--hd-success);
}

/* P0 FIX: Episode actions always visible but subtle */
.episode-actions {
    opacity: 0.35;
    transform: translateX(0);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    gap: 4px;
}

.episode-item:hover .episode-actions,
.episode-item:focus .episode-actions,
.episode-item:focus-within .episode-actions {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile: Always show actions at full opacity */
@media (max-width: 768px) {
    .episode-actions {
        opacity: 1;
    }
}

.episode-actions .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.episode-actions .btn:hover {
    transform: scale(1.1);
}

/* ----------------------------------------
   MODALS - Consistency
   ---------------------------------------- */

.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--hd-primary), var(--hd-primary-light));
    border-bottom: none;
    padding: 18px 24px;
    color: white;
}

.modal-header .modal-title {
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header .modal-title i {
    font-size: 1.25rem;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--hd-gray-200);
    padding: 16px 24px;
    background: var(--hd-gray-50);
}

/* Delete modals - danger header */
#deleteSeasonModal .modal-header,
#deleteEpisodeModal .modal-header {
    background: linear-gradient(135deg, var(--hd-danger), #f87171);
}

/* ----------------------------------------
   ACCORDION SECTIONS - Enhanced
   ---------------------------------------- */

.ep-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ep-accordion__section {
    border: 1px solid var(--hd-gray-200);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ep-accordion__section:hover {
    border-color: var(--hd-gray-300);
}

.ep-accordion__section.expanded {
    border-color: var(--hd-primary);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

.ep-accordion__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(90deg, var(--hd-gray-50) 0%, white 100%);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.ep-accordion__header:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.06) 0%, white 100%);
}

.ep-accordion__header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ep-accordion__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    color: var(--hd-primary);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.ep-accordion__section.expanded .ep-accordion__icon {
    background: var(--hd-primary);
    color: white;
}

.ep-accordion__section[data-section="essential"] .ep-accordion__icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--hd-success);
}

.ep-accordion__section[data-section="essential"].expanded .ep-accordion__icon {
    background: var(--hd-success);
    color: white;
}

.ep-accordion__section[data-section="content"] .ep-accordion__icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.ep-accordion__section[data-section="content"].expanded .ep-accordion__icon {
    background: #3b82f6;
    color: white;
}

.ep-accordion__section[data-section="media"] .ep-accordion__icon {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.ep-accordion__section[data-section="media"].expanded .ep-accordion__icon {
    background: #a855f7;
    color: white;
}

.ep-accordion__section[data-section="ai"] .ep-accordion__icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--hd-warning);
}

.ep-accordion__section[data-section="ai"].expanded .ep-accordion__icon {
    background: var(--hd-warning);
    color: white;
}

.ep-accordion__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--hd-gray-800);
}

.ep-accordion__subtitle {
    font-size: 12px;
    color: var(--hd-gray-500);
    margin-left: 4px;
}

/* P1 FIX: Enhanced accordion badges with completion indicators */
.ep-accordion__badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.ep-accordion__badge--success {
    background: var(--hd-success-light);
    color: #059669;
}

.ep-accordion__badge--warning {
    background: var(--hd-warning-light);
    color: #b45309;
}

.ep-accordion__badge--info {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

/* Completion counter badge */
.ep-accordion__completion {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    background: var(--hd-gray-100);
    color: var(--hd-gray-600);
    margin-left: 8px;
    transition: all 0.3s ease;
}

.ep-accordion__completion--complete {
    background: var(--hd-success-light);
    color: #059669;
}

.ep-accordion__completion--partial {
    background: var(--hd-warning-light);
    color: #b45309;
}

.ep-accordion__completion--empty {
    background: var(--hd-gray-100);
    color: var(--hd-gray-500);
}

/* Progress dots for section completion */
.ep-accordion__progress {
    display: flex;
    gap: 3px;
    margin-left: 8px;
}

.ep-accordion__progress-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hd-gray-300);
    transition: all 0.2s ease;
}

.ep-accordion__progress-dot--filled {
    background: var(--hd-success);
    box-shadow: 0 0 4px rgba(40, 199, 111, 0.4);
}

.ep-accordion__progress-dot--partial {
    background: var(--hd-warning);
}

.ep-accordion__chevron {
    color: var(--hd-gray-400);
    font-size: 1.1rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ep-accordion__section.expanded .ep-accordion__chevron {
    transform: rotate(180deg);
}

.ep-accordion__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ep-accordion__section.expanded .ep-accordion__body {
    max-height: 2000px;
}

.ep-accordion__content {
    padding: 20px 24px;
    border-top: 1px solid var(--hd-gray-200);
    animation: fadeInUp 0.3s ease;
}

/* ----------------------------------------
   MICRO-INTERACTIONS
   ---------------------------------------- */

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.btn-ripple:active::after {
    animation: ripple 0.6s ease-out;
}

/* Toggle switch animation */
.form-switch .form-check-input {
    transition: background-color 0.2s ease, border-color 0.2s ease, background-position 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--hd-gray-200) 25%, var(--hd-gray-100) 50%, var(--hd-gray-200) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 20px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-thumbnail {
    width: 80px;
    height: 45px;
    border-radius: 8px;
}

/* ----------------------------------------
   P2 FIX: EMPTY STATES - Enhanced Design
   ---------------------------------------- */

#noContentMessage {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.02) 0%, white 100%);
    border: 2px dashed var(--hd-gray-300);
    border-radius: 20px;
    padding: 56px 40px !important;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle background pattern */
#noContentMessage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(40, 199, 111, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

#noContentMessage > * {
    position: relative;
    z-index: 1;
}

#noContentMessage i.la-film {
    font-size: 5rem;
    background: linear-gradient(135deg, var(--hd-primary), var(--hd-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    display: block;
    opacity: 0.7;
}

#noContentMessage h5 {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--hd-gray-800);
    margin-bottom: 12px;
}

#noContentMessage p {
    color: var(--hd-gray-500);
    max-width: 420px;
    margin: 0 auto 28px;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Empty state CTA buttons enhancement */
#noContentMessage .btn {
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#noContentMessage .btn:hover {
    transform: translateY(-2px);
}

/* Empty state keyboard hint */
.empty-state__hint {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--hd-gray-200);
}

.empty-state__hint small {
    color: var(--hd-gray-400);
    font-size: 0.8rem;
}

/* Season empty message enhancement */
.season-empty-message {
    padding: 32px 24px;
    text-align: center;
    background: linear-gradient(180deg, var(--hd-gray-50) 0%, white 100%);
    border-radius: 12px;
    margin: 16px;
    border: 1px dashed var(--hd-gray-200);
}

.season-empty-message i {
    color: var(--hd-gray-300);
    transition: color 0.2s ease;
}

.season-card:hover .season-empty-message i {
    color: var(--hd-primary);
    opacity: 0.5;
}

/* ----------------------------------------
   AI TOOLS SECTION - Polish
   ---------------------------------------- */

.ai-progress {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.02) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.ai-progress__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ai-progress__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--hd-gray-800);
}

.ai-progress__title i {
    color: var(--hd-warning);
}

.ai-progress__cancel {
    font-size: 12px;
    color: var(--hd-gray-500);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ai-progress__cancel:hover {
    color: var(--hd-danger);
}

.ai-progress__bar {
    height: 6px;
    background: var(--hd-gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.ai-progress__bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--hd-warning), #fbbf24);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.ai-progress__bar-fill--animated {
    background-size: 200% 100%;
    animation: progressShimmer 2s ease-in-out infinite;
}

.ai-progress__info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--hd-gray-600);
}

.ai-progress__eta {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ----------------------------------------
   LOADING OVERLAY - Enhanced
   ---------------------------------------- */

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: inherit;
}

.loading-overlay__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--hd-gray-200);
    border-top-color: var(--hd-primary);
    border-radius: 50%;
    animation: progress-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

.loading-overlay__content {
    text-align: center;
}

.loading-overlay__message {
    font-weight: 600;
    color: var(--hd-gray-800);
    margin-bottom: 4px;
}

.loading-overlay__submessage {
    font-size: 13px;
    color: var(--hd-gray-500);
}

.loading-overlay__cancel {
    margin-top: 16px;
    padding: 8px 20px;
    font-size: 13px;
    background: white;
    border: 1px solid var(--hd-gray-300);
    border-radius: 8px;
    color: var(--hd-gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.loading-overlay__cancel:hover {
    background: var(--hd-gray-50);
    border-color: var(--hd-danger);
    color: var(--hd-danger);
}

/* ----------------------------------------
   KEYBOARD SHORTCUTS MODAL - Polish
   ---------------------------------------- */

.shortcuts-modal__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.shortcuts-modal__section {
    background: var(--hd-gray-50);
    border-radius: 12px;
    padding: 16px;
}

.shortcuts-modal__section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hd-gray-500);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hd-gray-200);
}

.shortcuts-modal__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.shortcuts-modal__action {
    font-size: 14px;
    color: var(--hd-gray-700);
}

.shortcuts-modal__keys {
    display: flex;
    gap: 4px;
}

/* ----------------------------------------
   RESPONSIVE ADJUSTMENTS
   ---------------------------------------- */

@media (max-width: 768px) {
    .health-dashboard {
        padding: 16px;
    }

    .health-dashboard__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .episodes-toolbar__container {
        flex-direction: column;
        align-items: stretch;
    }

    .episodes-toolbar__group {
        padding: 8px 0;
        justify-content: center;
    }

    .episodes-toolbar__group::after {
        display: none;
    }

    .episode-row {
        flex-wrap: wrap;
        gap: 8px !important;
    }

    .episode-actions {
        opacity: 1;
        transform: none;
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
    }

    .shortcuts-modal__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .episodes-stats-card .card-body {
        padding: 12px !important;
    }

    .episodes-stats-card__number {
        font-size: 1.5rem;
    }

    .episode-thumb {
        width: 60px !important;
        min-width: 60px !important;
    }

    .episode-thumb-img {
        width: 60px !important;
        height: 34px !important;
    }
}

/* ========================================
   P3 FIX: MICRO-INTERACTION POLISH
   Enhanced feedback loops and visual polish
   ======================================== */

/* --- Enhanced Button Interactions --- */
.btn--primary {
    position: relative;
    overflow: hidden;
}

/* Shimmer sweep effect on primary buttons */
.btn--primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transition: left 0.5s ease;
}

.btn--primary:hover::before {
    left: 100%;
}

/* Button active press effect */
.btn:active:not(:disabled) {
    transform: scale(0.97);
}

/* --- Input Focus Enhancement --- */
.form-control:focus,
.form-select:focus {
    border-color: var(--hd-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    transition: border-color var(--hd-duration-fast) ease,
                box-shadow var(--hd-duration-normal) ease;
}

/* Input field valid state */
.form-control.is-valid {
    border-color: var(--hd-success);
    background-image: none;
}

.form-control.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(40, 199, 111, 0.12);
}

/* --- Success Feedback Animation --- */
@keyframes successPop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes successCheck {
    0% { stroke-dashoffset: 24; }
    100% { stroke-dashoffset: 0; }
}

.success-feedback {
    animation: successPop 0.4s var(--hd-ease-bounce);
}

/* --- Toast Notification Enhancement --- */
.toast {
    border-radius: var(--hd-radius-lg);
    box-shadow: var(--hd-shadow-lg);
    border: none;
    backdrop-filter: blur(8px);
}

.toast-success {
    background: linear-gradient(135deg, rgba(40, 199, 111, 0.95), rgba(16, 185, 129, 0.95));
    color: white;
}

.toast-error {
    background: linear-gradient(135deg, rgba(234, 84, 85, 0.95), rgba(239, 68, 68, 0.95));
    color: white;
}

/* --- Status Toggle Feedback --- */
.form-switch .form-check-input {
    transition: background-color var(--hd-duration-normal) ease,
                border-color var(--hd-duration-normal) ease,
                background-position var(--hd-duration-normal) var(--hd-ease-smooth);
}

.form-switch .form-check-input:checked {
    animation: toggleOn 0.3s var(--hd-ease-bounce);
}

@keyframes toggleOn {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* --- Selection Highlight --- */
.selection-highlight {
    animation: selectionPulse 0.4s ease;
}

@keyframes selectionPulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* --- Card Hover Lift --- */
.card-lift {
    transition: transform var(--hd-duration-normal) var(--hd-ease-smooth),
                box-shadow var(--hd-duration-normal) var(--hd-ease-smooth);
}

.card-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--hd-shadow-lg);
}

/* --- Drag State Enhancement --- */
.dragging {
    opacity: 0.8;
    transform: scale(1.02);
    box-shadow: var(--hd-shadow-lg);
    z-index: 1000;
}

.drop-target {
    border: 2px dashed var(--hd-primary) !important;
    background: rgba(99, 102, 241, 0.05) !important;
}

/* --- Badge Count Animation --- */
.badge-animate {
    animation: badgePop 0.3s var(--hd-ease-bounce);
}

@keyframes badgePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* --- Loading State Skeleton --- */
.skeleton-row {
    display: flex;
    align-items: center;
    gap: var(--hd-space-md);
    padding: var(--hd-space-md);
}

.skeleton-thumb {
    width: 80px;
    height: 45px;
    border-radius: var(--hd-radius-sm);
    background: linear-gradient(90deg, var(--hd-gray-200) 25%, var(--hd-gray-100) 50%, var(--hd-gray-200) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--hd-gray-200) 25%, var(--hd-gray-100) 50%, var(--hd-gray-200) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-line--short {
    width: 40%;
}

.skeleton-line--medium {
    width: 65%;
}

.skeleton-line--long {
    width: 85%;
}

/* --- Subtle Hover Glow --- */
.hover-glow {
    transition: box-shadow var(--hd-duration-normal) ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* --- Save Success Indicator --- */
.save-success {
    position: relative;
}

.save-success::after {
    content: '✓';
    position: absolute;
    right: -24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hd-success);
    font-weight: bold;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-50%) scale(0.5); }
    20% { opacity: 1; transform: translateY(-50%) scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* --- Tooltip Enhancement --- */
[data-bs-toggle="tooltip"] {
    cursor: help;
}

/* --- Focus Ring for Accessibility --- */
*:focus-visible {
    outline: 2px solid var(--hd-primary);
    outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--hd-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

/* --- Smooth Page Transitions --- */
.fade-enter {
    opacity: 0;
    transform: translateY(10px);
}

.fade-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity var(--hd-duration-normal) ease,
                transform var(--hd-duration-normal) var(--hd-ease-smooth);
}

/* ========================================
   UX RECOMMENDATIONS IMPLEMENTATION
   6 psychovisual improvements
   ======================================== */

/* ----------------------------------------
   REC #1: ENHANCED 5-DOT HEALTH TOOLTIP
   Clearer labeling and visual feedback
   ---------------------------------------- */

/* Health indicator with enhanced tooltip */
.ep-health[data-bs-toggle="tooltip"],
.health-indicator[data-bs-toggle="tooltip"] {
    cursor: pointer;
    padding: 4px;
    margin: -4px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.ep-health:hover,
.health-indicator:hover {
    background: rgba(99, 102, 241, 0.08);
}

/* Health tooltip custom styling */
.tooltip-health .tooltip-inner {
    max-width: 280px;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    line-height: 1.6;
    background: linear-gradient(135deg, #1e293b, #334155);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.tooltip-health .tooltip-arrow::before {
    border-top-color: #1e293b;
}

/* Health tooltip content layout */
.health-tooltip-grid {
    display: grid;
    gap: 6px;
}

.health-tooltip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.health-tooltip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.health-tooltip-dot--success { background: var(--hd-success); box-shadow: 0 0 6px rgba(40, 199, 111, 0.5); }
.health-tooltip-dot--processing { background: var(--hd-warning); animation: health-dot-pulse 1.5s infinite; }
.health-tooltip-dot--error { background: var(--hd-danger); }
.health-tooltip-dot--pending { background: var(--hd-info); opacity: 0.7; }
.health-tooltip-dot--empty { background: var(--hd-gray-400); opacity: 0.5; }

.health-tooltip-label {
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.health-tooltip-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.health-tooltip-status--ok {
    background: rgba(40, 199, 111, 0.2);
    color: #4ade80;
}

.health-tooltip-status--missing {
    background: rgba(234, 84, 85, 0.2);
    color: #f87171;
}

.health-tooltip-status--processing {
    background: rgba(255, 159, 67, 0.2);
    color: #fbbf24;
}

/* ----------------------------------------
   REC #2: RESPONSIVE TOOLBAR COLLAPSE
   Mobile hamburger menu with offcanvas
   ---------------------------------------- */

/* Mobile toolbar toggle button */
.episodes-toolbar__mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--hd-gray-300);
    border-radius: 8px;
    background: white;
    color: var(--hd-gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.episodes-toolbar__mobile-toggle:hover {
    background: var(--hd-gray-50);
    border-color: var(--hd-primary);
    color: var(--hd-primary);
}

.episodes-toolbar__mobile-toggle i {
    font-size: 1.25rem;
}

/* Toolbar actions always visible on desktop */
.episodes-toolbar__primary-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Mobile offcanvas menu */
.toolbar-offcanvas {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.toolbar-offcanvas.show {
    right: 0;
}

.toolbar-offcanvas__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1049;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.toolbar-offcanvas__backdrop.show {
    opacity: 1;
    visibility: visible;
}

.toolbar-offcanvas__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--hd-gray-200);
    background: linear-gradient(135deg, var(--hd-primary), var(--hd-primary-light));
    color: white;
}

.toolbar-offcanvas__title {
    font-weight: 600;
    font-size: 15px;
}

.toolbar-offcanvas__close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

.toolbar-offcanvas__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.toolbar-offcanvas__body {
    padding: 20px;
}

.toolbar-offcanvas__section {
    margin-bottom: 24px;
}

.toolbar-offcanvas__section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hd-gray-500);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hd-gray-200);
}

.toolbar-offcanvas__btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: var(--hd-gray-50);
    border: 1px solid var(--hd-gray-200);
    border-radius: 10px;
    color: var(--hd-gray-700);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-offcanvas__btn:hover {
    background: white;
    border-color: var(--hd-primary);
    color: var(--hd-primary);
    transform: translateX(4px);
}

.toolbar-offcanvas__btn i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.toolbar-offcanvas__btn--primary {
    background: linear-gradient(135deg, var(--hd-primary), var(--hd-primary-light));
    border: none;
    color: white;
}

.toolbar-offcanvas__btn--primary:hover {
    background: linear-gradient(135deg, var(--hd-primary-dark), var(--hd-primary));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Mobile responsive breakpoint */
@media (max-width: 991px) {
    .episodes-toolbar__mobile-toggle {
        display: flex;
    }

    .episodes-toolbar__group:not(.episodes-toolbar__group--selection):not(.episodes-toolbar__primary-actions) {
        display: none;
    }

    .episodes-toolbar__container {
        justify-content: space-between;
    }

    /* Keep Add Episode visible on mobile */
    .episodes-toolbar__group--primary {
        display: flex !important;
    }

    .episodes-toolbar__group--primary .btn:not(#addEpisodeBtn) {
        display: none;
    }
}

/* ----------------------------------------
   REC #3: SMART VERSION DEFAULT
   Visual indicator for remembered preference
   ---------------------------------------- */

.version-remembered-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--hd-success);
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.version-remembered-indicator.show {
    opacity: 1;
}

.version-remembered-indicator i {
    font-size: 12px;
}

/* ----------------------------------------
   REC #4: ONBOARDING OVERLAY TOUR
   First-time user guidance
   ---------------------------------------- */

/* Tour overlay */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.onboarding-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Tour spotlight */
.onboarding-spotlight {
    position: absolute;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.onboarding-spotlight::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 3px solid var(--hd-primary);
    border-radius: 16px;
    animation: spotlightPulse 2s ease-in-out infinite;
}

@keyframes spotlightPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.02); }
}

/* Tour tooltip card */
.onboarding-tooltip {
    position: absolute;
    width: 320px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1101;
    overflow: hidden;
    animation: tooltipSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tooltipSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.onboarding-tooltip__header {
    padding: 20px 24px 16px;
    background: linear-gradient(135deg, var(--hd-primary), var(--hd-primary-light));
    color: white;
}

.onboarding-tooltip__step {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 6px;
}

.onboarding-tooltip__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.onboarding-tooltip__body {
    padding: 20px 24px;
}

.onboarding-tooltip__description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--hd-gray-600);
    margin: 0;
}

.onboarding-tooltip__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--hd-gray-50);
    border-top: 1px solid var(--hd-gray-200);
}

.onboarding-tooltip__dots {
    display: flex;
    gap: 6px;
}

.onboarding-tooltip__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hd-gray-300);
    transition: all 0.3s ease;
}

.onboarding-tooltip__dot.active {
    background: var(--hd-primary);
    width: 24px;
    border-radius: 4px;
}

.onboarding-tooltip__actions {
    display: flex;
    gap: 8px;
}

.onboarding-tooltip__btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.onboarding-tooltip__btn--skip {
    background: transparent;
    border: none;
    color: var(--hd-gray-500);
}

.onboarding-tooltip__btn--skip:hover {
    color: var(--hd-gray-700);
}

.onboarding-tooltip__btn--next {
    background: var(--hd-primary);
    border: none;
    color: white;
}

.onboarding-tooltip__btn--next:hover {
    background: var(--hd-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Tour trigger button */
.tour-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    color: var(--hd-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tour-trigger-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--hd-primary);
}

.tour-trigger-btn i {
    font-size: 14px;
}

/* ----------------------------------------
   REC #5: AI READY BADGE (Pulsing)
   Promotes AI section when video is ready
   ---------------------------------------- */

.ai-ready-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--hd-warning), #fbbf24);
    color: #78350f;
    border-radius: 20px;
    animation: aiReadyPulse 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

@keyframes aiReadyPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5);
    }
}

.ai-ready-badge i {
    font-size: 12px;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* AI section promotion glow */
.ep-accordion__section[data-section="ai"].ai-promoted {
    border-color: var(--hd-warning);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.ep-accordion__section[data-section="ai"].ai-promoted .ep-accordion__header {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.08) 0%, white 100%);
}

/* ----------------------------------------
   REC #6: TRANSLATIONS QUICK-FILL FAB
   Floating action button prominence
   ---------------------------------------- */

/* Floating action group */
.translation-fab-group {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin: -20px -24px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.02) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px 12px 0 0;
}

.translation-fab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border: none;
    border-radius: 24px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.translation-fab:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.translation-fab:active {
    transform: translateY(0) scale(0.98);
}

.translation-fab i {
    font-size: 16px;
}

.translation-fab--success {
    background: linear-gradient(135deg, var(--hd-success), #4ade80);
    box-shadow: 0 4px 14px rgba(40, 199, 111, 0.35);
    animation: fabSuccess 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fabSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Language completion indicators */
.lang-status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
}

.lang-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.lang-status-pill--complete {
    background: var(--hd-success-light);
    color: #059669;
}

.lang-status-pill--complete i {
    color: var(--hd-success);
}

.lang-status-pill--empty {
    background: var(--hd-gray-100);
    color: var(--hd-gray-500);
    border: 1px dashed var(--hd-gray-300);
}

.lang-status-pill--partial {
    background: var(--hd-warning-light);
    color: #b45309;
}

/* Copy animation feedback */
.copy-feedback {
    position: relative;
}

.copy-feedback::after {
    content: 'Copied!';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    background: var(--hd-success);
    color: white;
    border-radius: 6px;
    opacity: 0;
    animation: copyFeedback 1.5s ease;
    pointer-events: none;
}

@keyframes copyFeedback {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ========================================
   VISUAL POLISH ENHANCEMENTS v2.0
   Comprehensive UI refinements for
   professional, polished appearance
   ======================================== */

/* ----------------------------------------
   1. POLISHED DROPDOWN MENUS
   Bootstrap override with unified styling
   ---------------------------------------- */

.dropdown-menu {
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--hd-radius-lg);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    padding: 8px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.98);
    animation: dropdownSlideIn 0.25s var(--hd-ease-smooth);
    overflow: hidden;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-item {
    padding: 10px 14px;
    border-radius: var(--hd-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--hd-gray-700);
    transition: all 0.2s var(--hd-ease-smooth);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--hd-primary);
    transform: scaleY(0);
    transition: transform 0.2s var(--hd-ease-smooth);
    border-radius: 0 2px 2px 0;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: linear-gradient(90deg,
        rgba(99, 102, 241, 0.1) 0%,
        rgba(99, 102, 241, 0.03) 100%
    );
    color: var(--hd-primary);
    transform: translateX(4px);
    text-decoration: none;
}

.dropdown-item:hover::before {
    transform: scaleY(1);
}

.dropdown-item:hover i {
    transform: scale(1.15);
}

.dropdown-item:active {
    background: rgba(99, 102, 241, 0.15);
    transform: translateX(4px) scale(0.98);
}

/* Danger variant */
.dropdown-item.text-danger:hover,
.dropdown-item.text-danger:focus {
    background: linear-gradient(90deg,
        rgba(234, 84, 85, 0.1) 0%,
        rgba(234, 84, 85, 0.03) 100%
    );
    color: var(--hd-danger);
}

.dropdown-item.text-danger::before {
    background: var(--hd-danger);
}

/* Success variant */
.dropdown-item .text-success + span,
.dropdown-item i.text-success {
    color: var(--hd-success);
}

.dropdown-item:hover .text-success {
    color: var(--hd-success);
}

/* Dropdown header */
.dropdown-header {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--hd-gray-400);
    padding: 12px 14px 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--hd-gray-200), transparent);
}

/* Dropdown divider */
.dropdown-divider {
    margin: 8px 0;
    border-color: var(--hd-gray-100);
    opacity: 1;
}

/* Dropdown item text (helper text) */
.dropdown-item-text {
    padding: 6px 14px;
    font-size: 12px;
    color: var(--hd-gray-500);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ----------------------------------------
   2. ENHANCED ACTION BUTTON VISIBILITY
   Improved discoverability
   ---------------------------------------- */

.episode-actions {
    opacity: 0.55;
    transform: translateX(0);
    transition: all 0.25s var(--hd-ease-smooth);
    display: flex;
    gap: 6px;
}

.season-card__actions {
    opacity: 0.5;
    transform: translateX(0);
    transition: all 0.25s var(--hd-ease-smooth);
}

/* Subtle hint on idle */
.episode-actions .btn,
.season-card__actions .btn {
    position: relative;
    overflow: hidden;
}

.episode-actions .btn::after,
.season-card__actions .btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center,
        rgba(99, 102, 241, 0.15) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.episode-actions .btn:hover::after,
.season-card__actions .btn:hover::after {
    opacity: 1;
}

/* ----------------------------------------
   3. ENHANCED MICRO-INTERACTIONS
   Thumbnail, badges, cards
   ---------------------------------------- */

/* Thumbnail hover zoom with shadow */
.episode-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    transition: box-shadow 0.3s var(--hd-ease-smooth);
}

.episode-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 60%,
        rgba(0, 0, 0, 0.3) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 10px;
}

.episode-item:hover .episode-thumb {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.episode-item:hover .episode-thumb::after {
    opacity: 1;
}

.episode-thumb-img {
    transition:
        transform 0.4s var(--hd-ease-smooth),
        border-color 0.2s ease;
}

.episode-item:hover .episode-thumb-img {
    transform: scale(1.1);
    border-color: var(--hd-primary);
}

/* Video status badge glow effects */
.video-status-badge {
    position: relative;
    transition: all 0.25s var(--hd-ease-smooth);
}

.video-status--success {
    box-shadow:
        0 2px 8px rgba(40, 199, 111, 0.25),
        0 0 0 1px rgba(40, 199, 111, 0.1) inset;
}

.video-status--success:hover {
    box-shadow:
        0 4px 16px rgba(40, 199, 111, 0.35),
        0 0 0 1px rgba(40, 199, 111, 0.2) inset;
    transform: translateY(-1px);
}

.video-status--processing {
    box-shadow:
        0 2px 8px rgba(255, 159, 67, 0.25),
        0 0 0 1px rgba(255, 159, 67, 0.1) inset;
}

.video-status--error {
    box-shadow:
        0 2px 8px rgba(234, 84, 85, 0.25),
        0 0 0 1px rgba(234, 84, 85, 0.1) inset;
}

/* Card hover lift effect */
.card {
    transition:
        transform 0.3s var(--hd-ease-smooth),
        box-shadow 0.3s var(--hd-ease-smooth);
}

.season-card:hover,
.episodes-stats-card:hover {
    transform: translateY(-3px);
}

/* Badge pulse on update */
@keyframes badgeUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.badge-updated {
    animation: badgeUpdate 0.4s var(--hd-ease-bounce);
}

/* Health indicator interactive enhancement */
.ep-health,
.health-indicator {
    padding: 4px 6px;
    margin: -4px -6px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ep-health:hover,
.health-indicator:hover {
    background: rgba(99, 102, 241, 0.08);
}

.ep-health__dot,
.health-indicator__dot {
    transition:
        transform 0.2s var(--hd-ease-bounce),
        box-shadow 0.2s ease;
}

.ep-health:hover .ep-health__dot,
.health-indicator:hover .health-indicator__dot {
    transform: scale(1.3);
}

/* ----------------------------------------
   4. ENHANCED TOUR OVERLAY
   More polished onboarding experience
   ---------------------------------------- */

.onboarding-overlay {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.onboarding-overlay.active {
    animation: overlayFadeIn 0.4s ease;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

.onboarding-tooltip {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.onboarding-tooltip__header {
    position: relative;
    overflow: hidden;
}

.onboarding-tooltip__header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 60%
    );
    pointer-events: none;
}

.onboarding-tooltip__step {
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 10px;
}

.onboarding-tooltip__title {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.onboarding-tooltip__body {
    position: relative;
}

.onboarding-tooltip__description {
    line-height: 1.7;
}

/* Tour progress dots enhancement */
.onboarding-tooltip__dot {
    transition: all 0.3s var(--hd-ease-bounce);
    cursor: pointer;
}

.onboarding-tooltip__dot:hover:not(.active) {
    background: var(--hd-gray-400);
    transform: scale(1.2);
}

.onboarding-tooltip__dot.active {
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

.onboarding-tooltip__dot.completed {
    background: var(--hd-success);
}

/* Tour buttons enhancement */
.onboarding-tooltip__btn--next {
    position: relative;
    overflow: hidden;
}

.onboarding-tooltip__btn--next::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.onboarding-tooltip__btn--next:hover::before {
    left: 100%;
}

/* ----------------------------------------
   5. POLISHED FORM CONTROLS
   Refined inputs and selects
   ---------------------------------------- */

.form-control,
.form-select {
    border-radius: var(--hd-radius-sm);
    border: 1.5px solid var(--hd-gray-300);
    padding: 10px 14px;
    font-size: 14px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.form-control:hover:not(:focus):not(:disabled),
.form-select:hover:not(:focus):not(:disabled) {
    border-color: var(--hd-gray-400);
    background-color: var(--hd-gray-50);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--hd-primary);
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.12),
        0 2px 8px rgba(99, 102, 241, 0.08);
    background-color: white;
}

.form-control::placeholder {
    color: var(--hd-gray-400);
    transition: color 0.2s ease;
}

.form-control:focus::placeholder {
    color: var(--hd-gray-300);
}

/* Form label enhancement */
.form-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--hd-gray-700);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label .required {
    color: var(--hd-danger);
    font-size: 16px;
    line-height: 1;
}

/* Input group polish */
.input-group {
    border-radius: var(--hd-radius-sm);
    overflow: hidden;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-top-left-radius: var(--hd-radius-sm);
    border-bottom-left-radius: var(--hd-radius-sm);
}

.input-group .form-control:last-child {
    border-top-right-radius: var(--hd-radius-sm);
    border-bottom-right-radius: var(--hd-radius-sm);
}

.input-group-text {
    background: var(--hd-gray-50);
    border-color: var(--hd-gray-300);
    color: var(--hd-gray-600);
    font-size: 14px;
}

/* Toggle switch enhancement */
.form-switch .form-check-input {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background-color: var(--hd-gray-300);
    border: none;
    cursor: pointer;
    transition:
        background-color 0.25s ease,
        box-shadow 0.25s ease;
}

.form-switch .form-check-input:hover {
    box-shadow: 0 0 0 4px rgba(108, 117, 125, 0.15);
}

.form-switch .form-check-input:checked {
    background-color: var(--hd-success);
}

.form-switch .form-check-input:checked:hover {
    box-shadow: 0 0 0 4px rgba(40, 199, 111, 0.2);
}

.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

/* ----------------------------------------
   6. ENTRANCE ANIMATIONS
   Smooth component reveals
   ---------------------------------------- */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInStagger {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Health dashboard entrance */
.health-dashboard {
    animation: slideInUp 0.5s var(--hd-ease-smooth);
}

/* Stats cards staggered entrance */
.episodes-stats-card {
    animation: fadeInStagger 0.4s var(--hd-ease-smooth) backwards;
}

.episodes-stats-card:nth-child(1) { animation-delay: 0.05s; }
.episodes-stats-card:nth-child(2) { animation-delay: 0.1s; }
.episodes-stats-card:nth-child(3) { animation-delay: 0.15s; }
.episodes-stats-card:nth-child(4) { animation-delay: 0.2s; }

/* Toolbar entrance */
.episodes-toolbar {
    animation: slideInUp 0.4s var(--hd-ease-smooth) 0.1s backwards;
}

/* Season cards staggered entrance */
.season-card {
    animation: fadeInStagger 0.4s var(--hd-ease-smooth) backwards;
}

.season-card:nth-child(1) { animation-delay: 0.15s; }
.season-card:nth-child(2) { animation-delay: 0.2s; }
.season-card:nth-child(3) { animation-delay: 0.25s; }
.season-card:nth-child(4) { animation-delay: 0.3s; }
.season-card:nth-child(5) { animation-delay: 0.35s; }

/* Episode rows staggered entrance */
.episode-item {
    animation: fadeInStagger 0.3s var(--hd-ease-smooth) backwards;
}

.episode-item:nth-child(1) { animation-delay: 0.05s; }
.episode-item:nth-child(2) { animation-delay: 0.08s; }
.episode-item:nth-child(3) { animation-delay: 0.11s; }
.episode-item:nth-child(4) { animation-delay: 0.14s; }
.episode-item:nth-child(5) { animation-delay: 0.17s; }
.episode-item:nth-child(n+6) { animation-delay: 0.2s; }

/* Modal entrance enhancement */
.modal.show .modal-dialog {
    animation: modalSlideIn 0.35s var(--hd-ease-smooth);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ----------------------------------------
   7. ENHANCED EMPTY STATES
   More engaging placeholder content
   ---------------------------------------- */

#noContentMessage {
    position: relative;
}

#noContentMessage::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 80%;
    height: 60%;
    background: radial-gradient(
        ellipse at center,
        rgba(99, 102, 241, 0.08) 0%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

#noContentMessage > * {
    position: relative;
    z-index: 1;
}

#noContentMessage i.la-film {
    animation: emptyIconFloat 3s ease-in-out infinite;
}

@keyframes emptyIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.season-empty-message {
    position: relative;
    overflow: hidden;
}

.season-empty-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(99, 102, 241, 0.03),
        transparent
    );
    animation: emptyShimmer 3s ease-in-out infinite;
}

@keyframes emptyShimmer {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

/* ----------------------------------------
   8. BUTTON POLISH
   Enhanced button styles
   ---------------------------------------- */

.btn {
    font-weight: 600;
    transition: all 0.25s var(--hd-ease-smooth);
    position: relative;
    overflow: hidden;
}

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

/* Primary button glow */
.btn--primary,
.btn-primary {
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

.btn--primary:hover,
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    transform: translateY(-2px);
}

/* Success button glow */
.btn-outline--success:hover,
.btn-success:hover {
    box-shadow: 0 4px 14px rgba(40, 199, 111, 0.3);
}

/* Danger button glow */
.btn-outline--danger:hover,
.btn-danger:hover {
    box-shadow: 0 4px 14px rgba(234, 84, 85, 0.3);
}

/* Info button glow */
.btn-outline--info:hover,
.btn-info:hover {
    box-shadow: 0 4px 14px rgba(0, 207, 232, 0.3);
}

/* Icon buttons */
.btn i {
    transition: transform 0.2s var(--hd-ease-bounce);
}

.btn:hover i {
    transform: scale(1.1);
}

/* ----------------------------------------
   9. TOOLTIP ENHANCEMENT
   Richer tooltip styling
   ---------------------------------------- */

.tooltip {
    font-family: inherit;
}

.tooltip-inner {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--hd-radius-sm);
    background: linear-gradient(135deg, #1e293b, #334155);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    max-width: 280px;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #1e293b;
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: #334155;
}

/* ----------------------------------------
   10. GLOBAL PROCESSING MONITOR POLISH
   Enhanced FAB styling
   ---------------------------------------- */

.gpm__badge {
    box-shadow:
        0 4px 20px rgba(99, 102, 241, 0.4),
        0 0 0 4px rgba(99, 102, 241, 0.1);
}

.gpm__badge:hover {
    box-shadow:
        0 6px 28px rgba(99, 102, 241, 0.5),
        0 0 0 6px rgba(99, 102, 241, 0.15);
}

.gpm__panel {
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.gpm__job {
    border-radius: var(--hd-radius-sm);
    margin: 0 8px;
}

.gpm__job:hover {
    background: linear-gradient(90deg,
        rgba(99, 102, 241, 0.08) 0%,
        transparent 100%
    );
}

/* ----------------------------------------
   11. SCROLL & SELECTION POLISH
   Refined scrollbars and selection
   ---------------------------------------- */

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

::-webkit-scrollbar-track {
    background: var(--hd-gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--hd-gray-300);
    border-radius: 4px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--hd-gray-400);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--hd-gray-300) var(--hd-gray-100);
}

/* Text selection */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: inherit;
}

/* ----------------------------------------
   12. LOADING STATES ENHANCEMENT
   Better visual feedback during loads
   ---------------------------------------- */

.loading-overlay {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.loading-overlay__spinner {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Inline loading state for buttons */
.btn.is-loading {
    pointer-events: none;
    position: relative;
    color: transparent !important;
}

.btn.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: progress-spin 0.8s linear infinite;
}

.btn-outline--secondary.is-loading::after,
.btn-outline--primary.is-loading::after {
    border-color: rgba(99, 102, 241, 0.3);
    border-top-color: var(--hd-primary);
}

/* ----------------------------------------
   13. RESPONSIVE POLISH
   Mobile-specific refinements
   ---------------------------------------- */

@media (max-width: 768px) {
    /* Disable entrance animations on mobile for performance */
    .health-dashboard,
    .episodes-stats-card,
    .episodes-toolbar,
    .season-card,
    .episode-item {
        animation: none;
    }

    /* Simpler shadows on mobile */
    .dropdown-menu {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    /* Full-width dropdowns on mobile */
    .dropdown-menu {
        width: calc(100vw - 32px);
        max-width: 320px;
    }

    /* Larger touch targets */
    .dropdown-item {
        padding: 14px 16px;
    }

    .btn {
        min-height: 44px;
    }
}

/* ----------------------------------------
   14. PRINT STYLES
   Clean print output
   ---------------------------------------- */

@media print {
    .gpm,
    .episodes-toolbar,
    .episode-actions,
    .season-card__actions,
    .onboarding-overlay {
        display: none !important;
    }

    .health-dashboard,
    .episodes-stats-card,
    .season-card,
    .episode-item {
        animation: none !important;
        box-shadow: none !important;
    }

    .card {
        border: 1px solid #ddd !important;
    }
}

/* ========================================
   15. PSYCHOVISUAL ENHANCEMENT SYSTEM v2.0
   Stats Dashboard, Enhanced Tables, Motion
   ======================================== */

/* ========== STATS DASHBOARD GRID ========== */
.hd-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--hd-space-md);
    margin-bottom: var(--hd-space-section);
    padding-bottom: var(--hd-space-lg);
    border-bottom: 1px solid var(--hd-border);
}

.hd-stat-card {
    background: white;
    border-radius: var(--hd-radius-lg);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--hd-shadow-sm), 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform var(--hd-duration-normal) var(--hd-ease-standard),
                box-shadow var(--hd-duration-normal) var(--hd-ease-standard),
                border-color var(--hd-duration-normal) var(--hd-ease-standard);
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
}

.hd-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: all var(--hd-duration-normal) var(--hd-ease-standard);
}

.hd-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hd-shadow-md), 0 16px 32px rgba(0, 0, 0, 0.06);
}

.hd-stat-card:hover .hd-stat-icon {
    transform: scale(1.08) rotate(-2deg);
}

.hd-stat-card.active {
    border-color: var(--hd-primary);
    background: linear-gradient(135deg, rgba(70, 52, 255, 0.04) 0%, rgba(99, 102, 241, 0.08) 100%);
}

.hd-stat-card.active::before {
    background: linear-gradient(90deg, var(--hd-primary) 0%, var(--hd-primary-light) 100%);
}

.hd-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
    transition: transform var(--hd-duration-normal) var(--hd-ease-standard);
}

.hd-stat-icon.primary {
    background: linear-gradient(135deg, rgba(70, 52, 255, 0.12), rgba(99, 102, 241, 0.08));
    color: var(--hd-primary);
}

.hd-stat-icon.success {
    background: linear-gradient(135deg, var(--hd-success-light), rgba(32, 201, 151, 0.08));
    color: var(--hd-success);
}

.hd-stat-icon.warning {
    background: linear-gradient(135deg, var(--hd-warning-light), rgba(230, 167, 0, 0.1));
    color: var(--hd-warning);
}

.hd-stat-icon.danger {
    background: linear-gradient(135deg, var(--hd-danger-light), rgba(232, 62, 140, 0.08));
    color: var(--hd-danger);
}

.hd-stat-icon.info {
    background: linear-gradient(135deg, var(--hd-info-light), rgba(32, 201, 151, 0.08));
    color: var(--hd-info);
}

.hd-stat-icon.secondary {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.12), rgba(73, 80, 87, 0.08));
    color: var(--hd-gray-600);
}

.hd-stat-content {
    flex: 1;
    min-width: 0;
}

.hd-stat-value {
    font-size: var(--hd-text-xl);
    font-weight: var(--hd-font-extrabold);
    line-height: var(--hd-leading-tight);
    color: var(--hd-text-primary);
    letter-spacing: -0.5px;
}

.hd-stat-label {
    font-size: var(--hd-text-xs);
    color: var(--hd-text-secondary);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: var(--hd-font-medium);
    letter-spacing: 0.2px;
}

/* ========== ENHANCED TABLE SYSTEM ========== */
.hd-table {
    margin-bottom: 0;
    width: 100%;
}

.hd-table thead {
    position: sticky;
    top: 0;
    z-index: 15;
    background: linear-gradient(to bottom, var(--hd-gray-50) 0%, var(--hd-gray-100) 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.hd-table thead th {
    background: transparent;
    border-bottom: 2px solid var(--hd-gray-300);
    padding: 14px 12px;
    font-size: var(--hd-text-xs);
    font-weight: var(--hd-font-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hd-text-secondary);
    vertical-align: middle;
}

.hd-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
    font-size: var(--hd-text-sm);
    border-bottom: 1px solid var(--hd-border-light);
}

.hd-table tbody tr {
    transition: background var(--hd-duration-fast) var(--hd-ease-standard),
                box-shadow var(--hd-duration-fast) var(--hd-ease-standard);
    position: relative;
}

.hd-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(70, 52, 255, 0.03) 0%, var(--hd-gray-50) 100%);
}

.hd-table tbody tr:focus-within {
    background: rgba(70, 52, 255, 0.04);
    box-shadow: inset 0 0 0 2px rgba(70, 52, 255, 0.12);
}

.hd-table tbody tr.selected {
    background: linear-gradient(90deg, rgba(70, 52, 255, 0.08) 0%, rgba(99, 102, 241, 0.04) 100%);
    box-shadow: inset 3px 0 0 var(--hd-primary);
}

.hd-table tbody tr.selected:hover {
    background: linear-gradient(90deg, rgba(70, 52, 255, 0.12) 0%, rgba(99, 102, 241, 0.06) 100%);
}

/* ========== MOTION ANIMATIONS ========== */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes checkboxSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.motion-fade-up {
    animation: fadeSlideUp var(--hd-duration-normal) var(--hd-ease-decelerate);
}

.motion-fade-in {
    animation: fadeSlideIn var(--hd-duration-normal) var(--hd-ease-decelerate);
}

.motion-scale-in {
    animation: scaleIn var(--hd-duration-normal) var(--hd-ease-bounce);
}

/* Staggered list animation */
.motion-stagger > *:nth-child(1) { animation-delay: 0ms; }
.motion-stagger > *:nth-child(2) { animation-delay: 50ms; }
.motion-stagger > *:nth-child(3) { animation-delay: 100ms; }
.motion-stagger > *:nth-child(4) { animation-delay: 150ms; }
.motion-stagger > *:nth-child(5) { animation-delay: 200ms; }
.motion-stagger > *:nth-child(6) { animation-delay: 250ms; }

/* ========== ENHANCED FORM CONTROLS ========== */
.form-check-input:checked {
    animation: checkboxSuccess var(--hd-duration-normal) var(--hd-ease-bounce);
    background-color: var(--hd-primary);
    border-color: var(--hd-primary);
    box-shadow: var(--hd-shadow-focus);
}

.form-check-input:focus {
    box-shadow: var(--hd-shadow-focus);
    border-color: var(--hd-primary);
}

/* ========== BUTTON ENHANCEMENTS ========== */
.btn {
    transition: transform var(--hd-duration-fast) var(--hd-ease-sharp),
                background-color var(--hd-duration-fast) var(--hd-ease-standard),
                box-shadow var(--hd-duration-normal) var(--hd-ease-standard),
                border-color var(--hd-duration-fast) var(--hd-ease-standard);
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
    transition-duration: var(--hd-duration-instant);
}

.btn--primary {
    box-shadow: 0 2px 4px rgba(70, 52, 255, 0.2);
}

.btn--primary:hover {
    box-shadow: 0 4px 8px rgba(70, 52, 255, 0.3);
}

/* ========== COLOR-BLIND FRIENDLY STATUS INDICATORS ========== */
.video-status--success::before,
.status-badge--success::before {
    content: '\2713';  /* Checkmark */
    margin-right: 4px;
    font-weight: bold;
}

.video-status--error::before,
.status-badge--error::before {
    content: '\2717';  /* X mark */
    margin-right: 4px;
    font-weight: bold;
}

.video-status--processing::before,
.status-badge--processing::before {
    content: '\21BB';  /* Circular arrow */
    margin-right: 4px;
    display: inline-block;
    animation: rotate 1s linear infinite;
}

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

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: high) {
    .health-indicator__dot,
    .ep-health__dot {
        border: 2px solid currentColor;
    }

    .video-status-badge,
    .hd-badge {
        border: 2px solid currentColor;
        font-weight: var(--hd-font-bold);
    }

    .hd-stat-card {
        border: 2px solid var(--hd-gray-400);
    }

    .hd-stat-card.active {
        border: 3px solid var(--hd-primary);
    }
}

/* ========== SUCCESS TOAST NOTIFICATION ========== */
.success-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    border-radius: var(--hd-radius-lg);
    box-shadow: var(--hd-shadow-xl);
    padding: var(--hd-space-md);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 420px;
    z-index: 9998;
    border-left: 4px solid var(--hd-success);
    animation: successSlideIn var(--hd-duration-moderate) var(--hd-ease-bounce);
}

.success-toast__icon {
    width: 40px;
    height: 40px;
    background: var(--hd-success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.success-toast__icon i {
    font-size: 1.5rem;
    color: var(--hd-success);
    animation: successIconPop var(--hd-duration-slow) var(--hd-ease-bounce) 0.2s backwards;
}

.success-toast__content {
    flex: 1;
}

.success-toast__title {
    font-weight: var(--hd-font-semibold);
    color: var(--hd-text-primary);
    margin-bottom: 4px;
}

.success-toast__message {
    font-size: var(--hd-text-sm);
    color: var(--hd-text-muted);
}

.success-toast__close {
    background: none;
    border: none;
    color: var(--hd-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--hd-duration-fast) var(--hd-ease-standard);
}

.success-toast__close:hover {
    background: var(--hd-gray-100);
    color: var(--hd-text-primary);
}

.success-toast--exit {
    animation: successSlideOut var(--hd-duration-normal) var(--hd-ease-accelerate) forwards;
}

@keyframes successSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes successSlideOut {
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
}

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

/* ========== ENHANCED EMPTY STATE ========== */
.empty-state {
    padding: var(--hd-space-2xl) var(--hd-space-lg);
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.empty-state__icon {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--hd-space-lg);
    background: linear-gradient(135deg, var(--hd-primary-light), var(--hd-primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--hd-shadow-primary);
    animation: emptyStateFloat 3s ease-in-out infinite;
}

.empty-state__icon i {
    font-size: 3.5rem;
    color: white;
}

.empty-state--playful .empty-state__icon {
    animation: emptyStateBounce 2s ease-in-out infinite;
}

@keyframes emptyStateFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes emptyStateBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.empty-state__title {
    font-size: var(--hd-text-lg);
    font-weight: var(--hd-font-semibold);
    color: var(--hd-text-primary);
    margin-bottom: var(--hd-space-sm);
}

.empty-state__subtitle {
    font-size: var(--hd-text-sm);
    color: var(--hd-text-muted);
    margin-bottom: 0;
}

.empty-state__action {
    margin-top: var(--hd-space-lg);
}

/* ========== GRADIENT TEXT (WITH FALLBACK) ========== */
.text-gradient {
    background: linear-gradient(135deg, var(--hd-primary), var(--hd-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--hd-primary); /* Fallback for non-webkit */
}

/* ========== QUICK FILTER CHIPS ========== */
.hd-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: var(--hd-space-md);
    padding-bottom: var(--hd-space-md);
}

.hd-quick-chip {
    padding: 8px 16px;
    border-radius: var(--hd-radius-full);
    font-size: var(--hd-text-sm);
    font-weight: var(--hd-font-semibold);
    border: 1.5px solid var(--hd-gray-300);
    background: white;
    color: var(--hd-text-secondary);
    cursor: pointer;
    transition: all var(--hd-duration-normal) var(--hd-ease-standard);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    letter-spacing: 0.2px;
    box-shadow: var(--hd-shadow-sm);
}

.hd-quick-chip:hover {
    background: rgba(70, 52, 255, 0.04);
    border-color: var(--hd-primary);
    color: var(--hd-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(70, 52, 255, 0.12);
}

.hd-quick-chip.active {
    background: linear-gradient(135deg, var(--hd-primary) 0%, var(--hd-primary-light) 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(70, 52, 255, 0.3);
}

.hd-quick-chip .chip-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: var(--hd-text-xs);
    font-weight: var(--hd-font-bold);
    min-width: 24px;
    text-align: center;
}

.hd-quick-chip.active .chip-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* ========== SKELETON LOADING ========== */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--hd-gray-200) 0%,
        var(--hd-gray-100) 20%,
        var(--hd-gray-200) 40%,
        var(--hd-gray-200) 100%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: var(--hd-radius-sm);
    pointer-events: none;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    border-radius: 4px;
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--hd-radius-md);
}

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

/* ========== TOUCH-FRIENDLY OPTIMIZATIONS ========== */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .hd-quick-chip {
        min-height: 44px;
        min-width: 44px;
        padding: 10px 16px;
    }

    .hd-stat-card:hover,
    .hd-quick-chip:hover {
        transform: none;
        box-shadow: inherit;
    }

    .hd-stat-card:active,
    .hd-quick-chip:active {
        transform: scale(0.98);
    }
}
