/* ==========================================================================
   KICK VOD DOWNLOADER - PREMIUM DARK GLASSMORPHISM STYLESHEET
   ========================================================================== */

/* --- CSS VARIABLES & TOKENS --- */
:root {
    --bg-base: #0a0a0f;
    --bg-surface: rgba(20, 20, 30, 0.45);
    --bg-surface-hover: rgba(30, 30, 45, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-glow: rgba(83, 252, 24, 0.25);
    
    /* Harmonious Harmonized Colors */
    --kick-green: #53fc18;
    --kick-green-glow: rgba(83, 252, 24, 0.35);
    --kick-green-dark: #3ec710;
    
    --purple-primary: #7c3aed;
    --purple-glow: rgba(124, 58, 237, 0.4);
    --purple-accent: #a78bfa;
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Semantic Status Colors */
    --color-success: #10b981;
    --color-success-bg: rgba(16, 185, 129, 0.15);
    --color-success-border: rgba(16, 185, 129, 0.3);
    
    --color-warning: #f59e0b;
    --color-warning-bg: rgba(245, 158, 11, 0.15);
    --color-warning-border: rgba(245, 158, 11, 0.3);
    
    --color-danger: #ef4444;
    --color-danger-bg: rgba(239, 68, 68, 0.15);
    --color-danger-border: rgba(239, 68, 68, 0.3);
    
    --color-info: #3b82f6;
    --color-info-bg: rgba(59, 130, 246, 0.15);
    --color-info-border: rgba(59, 130, 246, 0.3);
    
    /* Shadows & Transitions */
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow: 0 0 15px rgba(83, 252, 24, 0.15);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Animated Neon/Translucent background elements */
.glass-bg {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.12) 0%, rgba(0,0,0,0) 70%);
    z-index: -2;
    pointer-events: none;
    filter: blur(80px);
}

.glass-bg-accent {
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(83, 252, 24, 0.05) 0%, rgba(0,0,0,0) 70%);
    z-index: -2;
    pointer-events: none;
    filter: blur(80px);
}

/* --- APP LAYOUT --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR NAVIGATION --- */
.sidebar {
    width: 280px;
    background: rgba(15, 15, 25, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px border-color var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.brand-logo {
    background: rgba(83, 252, 24, 0.1);
    border: 1px solid var(--kick-green);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    color: var(--kick-green);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(83, 252, 24, 0.2);
}

.brand-logo.large {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-lg);
}

.sidebar-brand h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-brand h2 span {
    color: var(--kick-green);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
    transform: translateX(4px);
}

.nav-item.active {
    color: var(--text-primary);
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.1);
}

.nav-item.active svg {
    color: var(--kick-green);
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--purple-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.user-details .username {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-details .role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.btn-logout:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* --- MAIN CONTENT CONTAINER --- */
.main-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 2.5rem;
    min-height: 100vh;
}

.main-content.full-width {
    margin-left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- HEADER ACTIONS --- */
.dashboard-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.welcome-section h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.welcome-section p {
    color: var(--text-secondary);
}

.badge-channel {
    background: rgba(83, 252, 24, 0.1);
    color: var(--kick-green);
    border: 1px solid var(--border-color-glow);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- PREMIUM UI GLASS PANELS --- */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

/* --- STATS CARD GRID --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    gap: 1.25rem;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.purple {
    background: rgba(124, 58, 237, 0.15);
    color: var(--purple-accent);
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.stat-icon.red {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.stat-details h3 {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
}

.stat-details p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* --- BANNER ALERTS --- */
.alert-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.warning-banner {
    background: var(--color-warning-bg);
    border: 1px solid var(--color-warning-border);
    color: #fbbf24;
}

.banner-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.banner-text h4 {
    font-weight: 600;
    margin-bottom: 0.15rem;
    font-size: 1.05rem;
}

.banner-text p {
    font-size: 0.88rem;
    opacity: 0.85;
}

.btn-banner-action {
    background: #fbbf24;
    color: #000;
    text-decoration: none;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.88rem;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
}

.btn-banner-action:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

/* --- TABLE & RECORDINGS CARD --- */
.recordings-card {
    padding: 2rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.card-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Search bar design */
.search-box {
    position: relative;
    width: 320px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.search-box input:focus {
    outline: none;
    border-color: var(--purple-primary);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
}

/* Table styling */
.table-responsive {
    overflow-x: auto;
}

.recordings-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.recordings-table th {
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.recordings-table td {
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.recording-row {
    transition: var(--transition-smooth);
}

.recording-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.date-cell .date {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

.date-cell .time {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.title-cell {
    max-width: 320px;
}

.title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.vod-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.channel-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- BADGES --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}

.badge-pending {
    background: var(--color-warning-bg);
    color: #fbbf24;
    border-color: var(--color-warning-border);
}

.badge-downloading {
    background: var(--color-info-bg);
    color: #60a5fa;
    border-color: var(--color-info-border);
}

.badge-completed {
    background: var(--color-success-bg);
    color: #34d399;
    border-color: var(--color-success-border);
}

.badge-failed {
    background: var(--color-danger-bg);
    color: #f87171;
    border-color: var(--color-danger-border);
}

.badge-deleted {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.cursor-pointer {
    cursor: pointer;
}

/* --- BUTTONS --- */
.btn-primary {
    background: var(--purple-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--purple-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

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

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.btn-icon:hover {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
    transform: translateY(-2px);
}

.btn-download:hover {
    color: var(--kick-green);
    border-color: var(--border-color-glow);
    box-shadow: 0 0 10px rgba(83, 252, 24, 0.15);
}

.btn-rename:hover {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.4);
}

.btn-delete:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(239, 68, 68, 0.1);
}

.btn-action-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-retry {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.3);
    color: var(--purple-accent);
}

.btn-retry:hover {
    background: var(--purple-primary);
    color: white;
    transform: translateY(-1px);
}

/* YouTube Button styles */
.btn-yt-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 50px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-yt-status:hover {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.05);
    color: #f87171;
}

.btn-yt-status.uploaded {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.btn-yt-status.uploaded:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
}

.yt-icon {
    display: flex;
    align-items: center;
}

/* --- CALENDAR INTERACTIVE VIEW --- */
.calendar-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-surface);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.nav-btn {
    padding: 0.5rem 1rem !important;
}

.current-month-display {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 160px;
    text-align: center;
}

.calendar-card {
    padding: 1.5rem;
}

.calendar-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.weekday-name {
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-grid-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calendar-week-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day-cell {
    min-height: 120px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.calendar-day-cell:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.15);
}

.other-month-day {
    opacity: 0.3;
}

.today-day-cell {
    border-color: var(--purple-primary);
    background: rgba(124, 58, 237, 0.04);
}

.day-number-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.day-number-header .num {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.today-number {
    background: var(--purple-primary);
    color: white !important;
    font-weight: 700;
}

.day-recordings-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-grow: 1;
    overflow-y: auto;
    max-height: 110px;
}

/* Tiny stream block inside calendar cells */
.calendar-rec-block {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--text-muted);
    border-radius: 4px;
    padding: 0.3rem 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.72rem;
    transition: var(--transition-smooth);
}

.calendar-rec-block:hover {
    transform: translateY(-1px);
    filter: brightness(1.15);
}

.rec-block-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.25rem;
}

.rec-title-txt {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.rec-time-badge {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
}

.rec-action-link {
    color: var(--text-secondary);
    text-decoration: none;
    line-height: 1;
}

.rec-action-link:hover {
    color: white;
}

/* Color blocks by status */
.status-completed {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: var(--color-success);
}
.status-completed .rec-title-txt {
    color: #a7f3d0;
}

.status-downloading {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: var(--color-info);
}
.status-downloading .rec-title-txt {
    color: #bfdbfe;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: var(--color-warning);
}
.status-pending .rec-title-txt {
    color: #fef3c7;
}

.status-failed {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--color-danger);
}
.status-failed .rec-title-txt {
    color: #fca5a5;
}

.status-deleted {
    background: rgba(255, 255, 255, 0.02);
    border-left-color: var(--text-muted);
    opacity: 0.65;
}

/* --- SETTINGS GRID VIEW --- */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.settings-card {
    padding: 2.25rem;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    color: var(--purple-accent);
}

.settings-card-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Form controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.input-wrapper {
    display: flex;
    position: relative;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.input-wrapper:focus-within {
    border-color: var(--purple-primary);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0.85rem 1rem;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
}

.input-wrapper input:focus {
    outline: none;
}

.input-wrapper .input-addon {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.85rem 1.25rem;
    color: var(--text-secondary);
    font-weight: 600;
    border-right: 1px solid var(--border-color);
}

.input-wrapper input + .input-addon {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

.login-form .input-wrapper input {
    padding-left: 2.75rem;
}

.input-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* File uploading styles */
.file-upload-wrapper {
    border: 2px dashed var(--border-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.file-upload-wrapper:hover {
    border-color: var(--purple-primary);
}

.file-upload-wrapper input[type="file"] {
    width: 100%;
    color: var(--text-secondary);
    font-family: inherit;
}

/* Cookies badges */
.cookies-status-container {
    margin-bottom: 1.5rem;
}

.cookies-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    border: 1px solid transparent;
}

.badge-active {
    background: rgba(83, 252, 24, 0.1);
    color: var(--kick-green);
    border-color: rgba(83, 252, 24, 0.25);
}

.badge-active .badge-dot {
    background: var(--kick-green);
    box-shadow: 0 0 8px var(--kick-green);
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.25);
}

.badge-inactive .badge-dot {
    background: #ef4444;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.cookies-explanation {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.cookies-danger-zone {
    margin-top: 1.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.btn-danger-outline {
    background: transparent;
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

/* --- LOGIN SCREEN STYLING --- */
.login-wrapper {
    width: 100%;
    max-width: 440px;
    padding: 1.5rem;
}

.login-card {
    padding: 3rem 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

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

.btn-submit {
    width: 100%;
    background: var(--purple-primary);
    color: white;
    border: none;
    padding: 0.85rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--purple-glow);
}

/* --- TOASTS / FLASH MESSAGES --- */
.flash-messages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.flash-alert {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    animation: slideDown 0.3s ease-out;
}

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

.alert-success {
    background: var(--color-success-bg);
    border-color: var(--color-success-border);
    color: #34d399;
}

.alert-danger {
    background: var(--color-danger-bg);
    border-color: var(--color-danger-border);
    color: #f87171;
}

.alert-warning {
    background: var(--color-warning-bg);
    border-color: var(--color-warning-border);
    color: #fbbf24;
}

.alert-info {
    background: var(--color-info-bg);
    border-color: var(--color-info-border);
    color: #60a5fa;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-icon {
    display: flex;
    align-items: center;
}

.alert-text {
    font-weight: 500;
    font-size: 0.9rem;
}

.alert-close {
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.alert-close:hover {
    opacity: 1;
}

/* --- MODAL WINDOW STYLING --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    width: 100%;
    max-width: 520px;
    padding: 2.25rem;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: white;
}

.modal-body {
    margin-bottom: 2rem;
}

.modal-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 0.85rem;
    border-radius: var(--radius-md);
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    transition: var(--transition-smooth);
}

.modal-input:focus {
    outline: none;
    border-color: var(--purple-primary);
}

.modal-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Error details terminal style box */
.error-block-header h4 {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.error-console-box {
    background: #000;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    overflow-x: auto;
    max-height: 220px;
}

.error-console-box pre {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.82rem;
    color: #f87171;
    white-space: pre-wrap;
    line-height: 1.4;
}

.text-red {
    color: #ef4444;
}

/* --- DOTS LOADING INDICATOR --- */
.loader-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0.5rem;
}

.loader-dots .dot {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: loaderDots 1.2s infinite ease-in-out both;
}

.loader-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.loader-dots .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loaderDots {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* --- ANIMATIONS AND TRANSITIONS --- */
.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.spin-icon {
    animation: spin 3s linear infinite;
}

.inline-icon {
    display: inline-block;
    margin-right: 0.2rem;
}

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

/* --- RESPONSIVE ADAPTATIONS --- */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 2rem 0.5rem;
        align-items: center;
    }
    .sidebar-brand h2, .sidebar-footer .user-details, .sidebar-footer span, .sidebar-nav span {
        display: none;
    }
    .sidebar-brand {
        margin-bottom: 2rem;
        justify-content: center;
    }
    .nav-item {
        justify-content: center;
        padding: 0.85rem;
    }
    .sidebar-footer {
        align-items: center;
    }
    .btn-logout {
        width: 44px;
        height: 44px;
        padding: 0;
    }
    .main-content {
        margin-left: 80px;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .dashboard-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .search-box {
        width: 100%;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .calendar-grid-header {
        display: none; /* Hide weekday names on mobile, style day cells differently */
    }
    .calendar-week-row {
        grid-template-columns: 1fr;
    }
    .calendar-day-cell {
        min-height: auto;
    }
    .day-number-header {
        justify-content: flex-start;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 0.25rem;
        margin-bottom: 0.5rem;
    }
}

/* --- STREAM THUMBNAILS & PREVIEWS --- */
.thumbnail-preview-container {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.stream-thumbnail-round {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stream-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* Play Button Accent */
.btn-play {
    color: var(--kick-green) !important;
    border-color: rgba(83, 252, 24, 0.3) !important;
}
.btn-play:hover {
    background: rgba(83, 252, 24, 0.1) !important;
    box-shadow: 0 0 10px rgba(83, 252, 24, 0.2) !important;
}

/* --- HTML5 VIDEO PLAYER MODAL --- */
.video-player-card {
    max-width: 900px !important;
    width: 95% !important;
}

.video-player-body {
    padding: 0 !important;
    background: #000;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    background: black;
}

.video-container video {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
}

/* --- CALENDAR HOVER THUMBNAIL POPOVER --- */
.calendar-rec-block {
    position: relative; /* Essential to anchor popover absolute positioning */
}

.calendar-rec-popover {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(124, 58, 237, 0.1);
    z-index: 99;
    pointer-events: none;
    transition: opacity 0.2s ease-out;
}

.calendar-rec-block:hover .calendar-rec-popover {
    display: block;
}

.popover-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.popover-info {
    padding: 2px 4px;
}

.popover-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popover-channel {
    font-size: 0.68rem;
    color: var(--kick-green);
    font-weight: 500;
}

.popover-duration {
    font-size: 0.68rem;
    color: var(--text-secondary);
}

/* --- ANALYTICS STYLING --- */
.analytics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-container-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
    margin-top: 1rem;
}

.channel-badge-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.channel-avatar {
    width: 32px;
    height: 32px;
    background: var(--purple-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.channel-name-txt {
    font-weight: 600;
    font-size: 0.95rem;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.premium-table th {
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--border-color);
}

.premium-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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