/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   PT Daily Digest â€” Design System & Styles
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* â”€â”€ Tokens â”€â”€ */
:root {
    --bg-base: #0a0a1a;
    --bg-surface: rgba(255, 255, 255, 0.04);
    --bg-surface-hover: rgba(255, 255, 255, 0.08);
    --bg-card: rgba(255, 255, 255, 0.06);
    --bg-glass: rgba(255, 255, 255, 0.06);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(124, 110, 240, 0.4);
    --text-primary: #f0f0f5;
    --text-secondary: #9a9ab0;
    --text-muted: #6b6b80;
    --accent: #7c6ef0;
    --accent-light: #a78bfa;
    --accent-glow: rgba(124, 110, 240, 0.25);
    --green: #22c55e;
    --green-soft: rgba(34, 197, 94, 0.15);
    --blue: #3b82f6;
    --blue-soft: rgba(59, 130, 246, 0.15);
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.15);
    --red: #ef4444;
    --red-soft: rgba(239, 68, 68, 0.15);
    --pink: #ec4899;
    --pink-soft: rgba(236, 72, 153, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --sidebar-width: 240px;
    --sidebar-collapsed: 68px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* â”€â”€ Reset & Base â”€â”€ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(124, 110, 240, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--accent-light);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* â”€â”€ Login Screen â”€â”€ */
.login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    z-index: 1000;
}

.login-card {
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 48px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

.login-logo {
    font-size: 56px;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 20px rgba(124, 110, 240, 0.3));
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 14px;
}

.login-error {
    color: var(--red);
    font-size: 14px;
    margin-top: 16px;
    display: none;
}

/* â”€â”€ App Layout â”€â”€ */
.app {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* â”€â”€ Sidebar â”€â”€ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition), transform var(--transition);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo {
    font-size: 28px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    margin-left: auto;
    padding: 4px;
}

.nav-list {
    list-style: none;
    padding: 12px 8px;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.nav-link.active {
    background: var(--accent-glow);
    color: var(--accent-light);
    border: 1px solid var(--border-accent);
}

.nav-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-subtle);
}

/* â”€â”€ Main Content â”€â”€ */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 32px;
    min-width: 0;
    transition: margin-left var(--transition);
}

/* â”€â”€ Page Header â”€â”€ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

/* â”€â”€ Stats Grid â”€â”€ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: transform var(--transition), border-color var(--transition);
}

/* â”€â”€ Dashboard Console â”€â”€ */
.dash-console {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    margin-bottom: 32px;
    background: var(--bg-glass);
    border: 1px solid var(--border-medium);
}

.console-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.console-info .page-title {
    font-size: 24px;
    margin-bottom: 2px;
}

.dash-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.console-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.mini-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.mini-stat-icon {
    font-size: 16px;
}

.mini-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.console-controls {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}

.console-input-wrap {
    flex: 1;
    min-width: 180px;
}

.console-input-wrap label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.console-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    transition: all var(--transition);
}

.console-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

@media (max-width: 1024px) {
    .console-main {
        flex-direction: column;
        align-items: flex-start;
    }
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-medium);
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-new .stat-number {
    color: var(--green);
}

.stat-watched .stat-number {
    color: var(--blue);
}

.stat-fav .stat-number {
    color: var(--amber);
}

.stat-total .stat-number {
    color: var(--accent-light);
}

/* â”€â”€ Section â”€â”€ */
.section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.category-section {
    margin-bottom: 40px;
}

.category-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

/* â”€â”€ Video Grid â”€â”€ */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* â”€â”€ Video Card â”€â”€ */
.video-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: 0 12px 40px rgba(124, 110, 240, 0.1);
}

.video-thumb-wrap {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumb {
    transform: scale(1.05);
}

.video-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 12px;
    opacity: 0;
    transition: opacity var(--transition);
}

.video-card:hover .video-thumb-overlay {
    opacity: 1;
}

.play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(124, 110, 240, 0.5);
}

.video-card:hover .play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-source-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-youtube {
    background: rgba(255, 0, 0, 0.15);
    color: #ff4444;
    border: 1px solid rgba(255, 0, 0, 0.25);
}

.badge-redbook {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
    border: 1px solid rgba(236, 72, 153, 0.25);
}

.badge-bilibili {
    background: rgba(0, 174, 236, 0.15);
    color: #00aeec;
    border: 1px solid rgba(0, 174, 236, 0.25);
}

.video-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.badge-new {
    background: var(--green-soft);
    color: var(--green);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-watched {
    background: var(--blue-soft);
    color: var(--blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-favorited {
    background: var(--amber-soft);
    color: var(--amber);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.video-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-topic-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: var(--accent-glow);
    color: var(--accent-light);
    border: 1px solid var(--border-accent);
    letter-spacing: 0.3px;
    transition: all var(--transition);
}

.tag-clickable {
    cursor: pointer;
    position: relative;
}

.tag-clickable:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 4px 16px var(--accent-glow), 0 0 12px rgba(124, 110, 240, 0.3);
    border-color: var(--accent);
}

.tag-clickable::after {
    content: '\uD83D\uDD0D';
    margin-left: 4px;
    font-size: 9px;
    opacity: 0;
    transition: opacity var(--transition);
}

.tag-clickable:hover::after {
    opacity: 1;
}

.video-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.video-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.video-channel {
    font-size: 12px;
    color: var(--accent-light);
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.video-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-synopsis {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.video-card.is-expanded .video-synopsis {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    max-height: none;
    overflow: visible;
}

.video-actions {
    display: flex;
    gap: 6px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 12px;
    flex-wrap: wrap;
}

.video-actions .btn {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

.video-date {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* â”€â”€ Buttons â”€â”€ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #a855f7);
    color: #fff;
    border-color: transparent;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: var(--radius-sm);
}

.btn-full {
    width: 100%;
}

.btn-icon {
    font-size: 14px;
}

.btn-watch {
    background: var(--green-soft);
    color: var(--green);
    border-color: rgba(34, 197, 94, 0.2);
}

.btn-watch:hover {
    background: rgba(34, 197, 94, 0.25);
}

.btn-fav {
    background: var(--amber-soft);
    color: var(--amber);
    border-color: rgba(245, 158, 11, 0.2);
}

.btn-fav:hover {
    background: rgba(245, 158, 11, 0.25);
}

.btn-archive {
    background: var(--bg-surface);
    color: var(--text-muted);
    border-color: var(--border-subtle);
}

.btn-archive:hover {
    color: var(--text-secondary);
}

.btn-danger {
    background: var(--red-soft);
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* â”€â”€ Forms â”€â”€ */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239a9ab0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

.form-select option {
    background: #1a1a2e;
    color: var(--text-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 60px;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-hint a {
    color: var(--accent-light);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* â”€â”€ Cards â”€â”€ */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.form-card {
    margin-bottom: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* â”€â”€ Filters Bar â”€â”€ */
.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-search {
    max-width: 320px;
}

.filters-bar .form-select {
    width: auto;
    min-width: 150px;
}

/* â”€â”€ Settings â”€â”€ */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.settings-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.test-status,
.save-status {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 12px;
}

/* â”€â”€ Pagination â”€â”€ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
}

.pagination .btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}


/* â”€â”€ Modal (Orphaned - can be removed or kept for generic use) â”€â”€ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.modal-footer {
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* â”€â”€ Toast â”€â”€ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease-out;
    max-width: 360px;
}

.toast-success {
    border-left: 3px solid var(--green);
}

.toast-error {
    border-left: 3px solid var(--red);
}

.toast-info {
    border-left: 3px solid var(--blue);
}

/* â”€â”€ Loading â”€â”€ */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
    grid-column: 1 / -1;
}

.loading::before {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    margin: 0 auto 12px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 15px;
}

/* â”€â”€ Animations â”€â”€ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fade-in {
    animation: fadeInUp 0.4s ease-out;
}

/* â”€â”€ Responsive â”€â”€ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        flex-direction: column;
    }

    .filter-search {
        max-width: 100%;
    }

    .page-title {
        font-size: 22px;
    }

    .page-header {
        flex-direction: column;
        gap: 12px;
    }

    .mobile-header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px;
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-subtle);
        position: sticky;
        top: 0;
        z-index: 50;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-number {
        font-size: 28px;
    }

    .video-actions {
        flex-direction: column;
    }

    .video-actions .btn {
        flex: unset;
    }
}

/* â”€â”€ Checkboxes â”€â”€ */
.checkbox-group {
    margin: 15px 0;
}

.checkbox-container {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    user-select: none;
    transition: color 0.2s ease;
}

.checkbox-container:hover {
    color: var(--text-primary);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-container:hover input~.checkbox-checkmark {
    border-color: var(--accent-gradient-start);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.checkbox-container input:checked~.checkbox-checkmark {
    background: var(--accent-gradient);
    border-color: transparent;
}

.checkbox-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkbox-checkmark:after {
    display: block;
}

.checkbox-container .checkbox-checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container.dashboard-toggle {
    margin-bottom: 0;
    padding-left: 28px;
    font-size: 13px;
    white-space: nowrap;
}

.checkbox-container.dashboard-toggle .checkbox-checkmark {
    height: 18px;
    width: 18px;
    top: -1px;
}

.checkbox-container.dashboard-toggle .checkbox-checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
}

/* â”€â”€ Scrollbar â”€â”€ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
.video-duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    pointer-events: none;
    letter-spacing: 0.5px;
}
