/* =============================================
   Binge Boss - Netflix-inspired Dark Theme
   Accent: Mint Green
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- Design Tokens --- */
:root {
    --mint-100: #e0fff0;
    --mint-200: #b2f5d8;
    --mint-300: #80eabc;
    --mint-400: #4de0a0;
    --mint-500: #2dd48a;
    --mint-600: #1ab872;
    --mint-700: #139b5e;
    --mint-glow: rgba(45, 212, 138, 0.25);
    --mint-glow-strong: rgba(45, 212, 138, 0.5);

    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --bg-card: #1e1e1e;
    --bg-card-hover: #252525;
    --bg-elevated: #222222;
    --bg-input: #2a2a2a;

    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --text-inverse: #0a0a0a;

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.12);
    --border-accent: var(--mint-500);

    --danger: #e74c3c;
    --danger-glow: rgba(231, 76, 60, 0.25);
    --warning: #f39c12;
    --info: #3498db;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--mint-glow);

    --radius-sm: 4px;
    --radius-md: 4px;
    --radius-lg: 4px;
    --radius-xl: 4px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60vh;
    background: radial-gradient(ellipse at 50% 0%, var(--mint-glow) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

#app {
    position: relative;
    z-index: 1;
}

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

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

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

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

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 68px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-normal);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.navbar-brand svg {
    width: 32px;
    height: 32px;
    color: var(--mint-400);
    filter: drop-shadow(0 0 8px var(--mint-glow));
}

.navbar-brand h1 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--mint-300) 0%, var(--mint-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    background: none;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    color: var(--mint-400);
    background: rgba(45, 212, 138, 0.1);
}

.nav-link svg {
    width: 18px;
    height: 18px;
}

/* --- Region Selector --- */
.region-selector {
    position: relative;
}

.region-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-subtle);
    background: var(--bg-input);
    color: var(--text-primary);
    white-space: nowrap;
}

.region-trigger:hover {
    border-color: var(--text-muted);
    background: var(--bg-elevated);
}

.region-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.region-code {
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.region-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 500;
    padding: 8px 0;
    display: none;
    animation: fadeIn 0.15s ease;
    max-height: 400px;
    overflow-y: auto;
}

.region-dropdown.show {
    display: block;
}

.region-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition-fast);
    font-family: var(--font-family);
    border: none;
    background: none;
    width: 100%;
    text-align: start;
}

.region-option:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.region-option.active {
    color: var(--mint-400);
}

@media (max-width: 768px) {
    .region-code {
        display: none;
    }

    .region-trigger {
        padding: 6px 10px;
    }

    .region-trigger svg:last-child {
        display: none;
    }
}

/* --- Auth UI --- */
.auth-wrapper {
    position: relative;
}

.auth-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px 6px 8px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-subtle);
    background: var(--bg-input);
    color: var(--text-primary);
    white-space: nowrap;
}

.auth-trigger:hover {
    border-color: var(--text-muted);
    background: var(--bg-elevated);
}

.auth-trigger svg {
    flex-shrink: 0;
}

.auth-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--mint-500);
}

.auth-avatar-fallback {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mint-700);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.auth-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 500;
    padding: 8px 0;
    display: none;
    animation: fadeIn 0.15s ease;
}

.auth-dropdown.show {
    display: block;
}

.auth-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition-fast);
    font-family: var(--font-family);
    border: none;
    background: none;
    width: 100%;
    text-align: start;
}

.auth-dropdown button:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.auth-dropdown-danger {
    color: #ef4444 !important;
    border-top: 1px solid var(--border-subtle);
}

.auth-dropdown-danger:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}

/* --- Main Content --- */
.main-content {
    padding-top: 100px;
    padding-bottom: 60px;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
    min-height: 100vh;
}

/* --- Page Headers --- */
.page-header {
    margin-bottom: 40px;
}

.page-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
}

/* --- Search Bar --- */
.search-container {
    position: relative;
    margin-bottom: 40px;
}

.search-bar {
    width: 100%;
    padding: 16px 20px 16px 52px;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-family);
    outline: none;
    transition: all var(--transition-normal);
}

.search-bar:focus {
    border-color: var(--mint-500);
    box-shadow: 0 0 0 4px var(--mint-glow), var(--shadow-md);
    background: var(--bg-tertiary);
}

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

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    pointer-events: none;
    transition: color var(--transition-fast);
}

.search-bar:focus~.search-icon {
    color: var(--mint-400);
}

/* --- Cards Grid --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

/* --- Show Card --- */
.show-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all var(--transition-normal);
    animation: fadeInUp 0.5s ease both;
}

.show-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--mint-500);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.show-card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    background: var(--bg-tertiary);
}

.show-card-info {
    padding: 16px;
    position: relative;
    transition: background var(--transition-normal);
}

.show-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.show-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.show-card-provider {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--mint-glow);
    color: var(--mint-300);
}

.show-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--mint-500);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition-normal);
}

/* Not added: show + badge on hover */
.show-card:hover .show-card-badge-add {
    opacity: 1;
    transform: scale(1);
}

/* Added: hide + badge, show - badge on hover */
.show-card.added .show-card-badge-add {
    display: none;
}

.show-card-badge-remove {
    background: #ef4444;
    display: none;
}

.show-card.added .show-card-badge-remove {
    display: flex;
}

.show-card.added:hover .show-card-badge-remove {
    opacity: 1;
    transform: scale(1);
}

.show-card-overlay {
    display: none;
}

.show-card.added .show-card-info {
    background: var(--mint-500);
}

.show-card.added .show-card-title,
.show-card.added .show-card-meta {
    color: #000;
}

.show-card.added .show-card-meta span {
    color: rgba(0, 0, 0, 0.7);
}

.show-card-added-check {
    display: none;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #000;
    font-size: 1.1rem;
    line-height: 1;
}

.show-card.added .show-card-added-check {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Confirm Remove Modal --- */
.confirm-remove-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

.confirm-remove-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 400px;
    width: 100%;
    animation: fadeInUp 0.3s ease;
}

.confirm-remove-modal h3 {
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-weight: 700;
}

.confirm-remove-show {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
}

.confirm-remove-poster {
    width: 60px;
    height: 90px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.confirm-remove-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.confirm-remove-title {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.confirm-remove-meta {
    display: flex;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.confirm-remove-watched {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--mint-400);
    margin-top: 4px;
}

.confirm-remove-watched svg {
    width: 14px;
    height: 14px;
}

.confirm-remove-warning {
    font-size: 0.85rem;
    color: #ef4444;
    margin: 0 0 16px;
}

.confirm-remove-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.btn-danger:hover {
    background: #dc2626;
}

/* --- Detail Modal --- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease;
    overflow-y: auto;
}

.modal-content {
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-hero {
    position: relative;
    aspect-ratio: 16/7;
    overflow: hidden;
}

.modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-secondary) 0%, rgba(20, 20, 20, 0.4) 50%, transparent 100%);
}

.modal-hero-content {
    position: absolute;
    bottom: 24px;
    left: 32px;
    right: 32px;
}

.modal-close {
    position: sticky;
    top: 12px;
    float: right;
    margin-right: 12px;
    margin-bottom: -48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.modal-body {
    padding: 32px;
}

.modal-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.modal-subtitle {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.modal-subtitle .provider-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
}

.provider-netflix {
    background: #e50914;
    color: white;
}

.provider-hbo {
    background: #8b5cf6;
    color: white;
}

.provider-disney {
    background: #1a73e8;
    color: white;
}

.provider-amazon {
    background: #00a8e1;
    color: white;
}

.provider-apple {
    background: #555;
    color: white;
}

.provider-svt {
    background: #3a8744;
    color: white;
}

.provider-viaplay {
    background: #ff6b00;
    color: white;
}

.provider-skyshowtime {
    background: #6b3fa0;
    color: white;
}

.provider-tv4 {
    background: #ff2d2d;
    color: white;
}

.provider-crunchyroll {
    background: #f47521;
    color: white;
}

.provider-default {
    background: var(--mint-600);
    color: white;
}

.imdb-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    background: #f5c518;
    color: #000;
    font-size: 0.75rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: opacity var(--transition-fast);
}

.imdb-link:hover {
    opacity: 0.8;
}

.modal-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    border: none;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: linear-gradient(135deg, var(--mint-500) 0%, var(--mint-600) 100%);
    color: var(--text-inverse);
    box-shadow: 0 4px 14px var(--mint-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--mint-glow-strong);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--text-muted);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 4px 14px var(--danger-glow);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

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

/* --- Season Section --- */
.season-section {
    margin-bottom: 24px;
}

.season-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.season-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.season-progress {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.season-actions {
    display: flex;
    gap: 8px;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
}

.episode-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.episode-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
}

.episode-item.watched {
    background: rgba(45, 212, 138, 0.06);
    border-color: rgba(45, 212, 138, 0.15);
}

.episode-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.episode-item.watched .episode-checkbox {
    background: var(--mint-500);
    border-color: var(--mint-500);
    color: var(--text-inverse);
}

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

.episode-number {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.episode-name {
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.episode-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.episode-date.upcoming {
    color: var(--warning);
    font-weight: 600;
}

/* --- Library Page --- */
.library-empty {
    text-align: center;
    padding: 80px 24px;
}

.library-empty svg {
    width: 80px;
    height: 80px;
    color: var(--text-muted);
    margin-bottom: 24px;
    opacity: 0.5;
}

.library-empty h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.library-empty p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* --- Progress Bar --- */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mint-500), var(--mint-300));
    border-radius: 3px;
    transition: width var(--transition-slow);
}

/* --- Planner View --- */
.planner-section {
    margin-bottom: 48px;
}

.planner-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 24px;
}

.planner-section-title svg {
    width: 24px;
    height: 24px;
    color: var(--mint-400);
}

/* Vertical Timeline */
.v-timeline-container {
    position: relative;
    padding-left: 40px;
}

.v-timeline-container::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--mint-500), var(--mint-glow), transparent);
}

.v-timeline-year {
    margin-bottom: 8px;
}

.v-timeline-year-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--mint-400);
    cursor: pointer;
    padding: 12px 0;
    margin-left: -40px;
    padding-left: 40px;
    user-select: none;
    transition: color var(--transition-fast);
}

.v-timeline-year-header::before {
    content: '';
    position: absolute;
    left: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--mint-500);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 10px var(--mint-glow);
}

.v-timeline-year-header:hover {
    color: var(--mint-300);
}

.v-timeline-year-content {
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}

.v-timeline-year.collapsed .v-timeline-year-content {
    max-height: 0;
    opacity: 0;
}

.v-timeline-toggle {
    display: inline-block;
    font-size: 0.7rem;
    transition: transform var(--transition-fast);
    line-height: 1;
}

.v-timeline-year.collapsed .v-timeline-year-header .v-timeline-toggle {
    transform: rotate(-90deg);
}

.v-timeline-month {
    position: relative;
    display: flex;
    gap: 16px;
    padding-bottom: 24px;
    animation: fadeInUp 0.4s ease both;
}

.v-timeline-month::before {
    content: '';
    position: absolute;
    left: -33px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mint-600);
    border: 2px solid var(--bg-primary);
}

.v-timeline-month-empty::before {
    background: var(--bg-elevated);
    box-shadow: none;
}

.v-timeline-month-label {
    flex-shrink: 0;
    width: 44px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding-top: 2px;
}

.v-timeline-month:not(.v-timeline-month-empty) .v-timeline-month-label {
    color: var(--text-secondary);
}

.v-timeline-month-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 20px;
}

.v-timeline-empty-dot {
    height: 2px;
}

.h-timeline-period-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--mint-500);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all var(--transition-normal);
}

.h-timeline-period-card:hover {
    border-color: var(--mint-700);
    border-left-color: inherit;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.h-timeline-period-provider {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.h-timeline-free-badge {
    font-size: 0.7rem;
    color: var(--mint-400);
    font-weight: 600;
    margin-left: 4px;
}

.h-timeline-period-range {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--mint-400);
    margin-bottom: 8px;
}

.h-timeline-months-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    background: var(--mint-glow);
    font-size: 0.7rem;
    color: var(--mint-300);
    font-weight: 600;
    margin-left: 4px;
}

.h-timeline-period-shows {
    list-style: none;
    margin-bottom: 8px;
}

.h-timeline-period-shows li {
    padding: 3px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.h-timeline-period-shows li::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--mint-500);
    flex-shrink: 0;
}

.h-timeline-period-cost {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    padding-top: 6px;
    border-top: 1px solid var(--border-subtle);
}

.v-timeline-span-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px dashed var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

@media (max-width: 768px) {
    .v-timeline-container {
        padding-left: 32px;
    }

    .v-timeline-month-label {
        width: 36px;
        font-size: 0.75rem;
    }

    .h-timeline-period-card {
        padding: 12px;
    }
}

/* Summary Cards */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition-normal);
}

.summary-card:hover {
    border-color: var(--mint-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.summary-card-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.summary-card-value {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--mint-300), var(--mint-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-card-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Planner empty */
.planner-empty {
    text-align: center;
    padding: 80px 24px;
}

.planner-empty svg {
    width: 80px;
    height: 80px;
    color: var(--text-muted);
    margin-bottom: 24px;
    opacity: 0.5;
}

.planner-empty h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.planner-empty p {
    color: var(--text-secondary);
}

/* --- Toast Notification --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 24px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.35s ease, fadeOut 0.3s ease 2.5s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success {
    border-color: var(--mint-500);
    background: rgba(45, 212, 138, 0.1);
}

.toast.error {
    border-color: var(--danger);
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

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

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

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

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

@keyframes pulse {

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

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

/* --- Responsive --- */
@media (max-width: 768px) {
    .navbar {
        padding: 0 16px;
    }

    .nav-link span {
        display: none;
    }

    .main-content {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 84px;
    }

    .page-header h2 {
        font-size: 1.6rem;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .modal-content {
        border-radius: var(--radius-lg);
    }

    .modal-body {
        padding: 20px;
    }

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

    .auth-name {
        display: none;
    }

    .auth-trigger svg:last-child {
        display: none;
    }
}

/* --- Filter Bar --- */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.filter-divider {
    width: 1px;
    height: 24px;
    background: var(--border-subtle);
    flex-shrink: 0;
}

.sort-bar-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-group {
    position: relative;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
    white-space: nowrap;
}

.filter-chip:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.filter-chip.active {
    background: var(--mint-glow);
    color: var(--mint-300);
    border-color: var(--mint-500);
}

.filter-chip.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.filter-chip .chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--mint-500);
    color: var(--text-inverse);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.filter-chip .chip-arrow {
    font-size: 0.65rem;
    transition: transform var(--transition-fast);
}

.filter-chip.open .chip-arrow {
    transform: rotate(180deg);
}

.filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 500;
    padding: 8px 0;
    display: none;
    animation: fadeIn 0.15s ease;
}

.filter-dropdown.show {
    display: block;
}

.filter-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition-fast);
    font-family: var(--font-family);
    border: none;
    background: none;
    width: 100%;
    text-align: start;
}

.filter-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.filter-dropdown-item.selected {
    color: var(--mint-300);
}

.filter-dropdown-item .item-check {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.filter-dropdown-item.selected .item-check {
    background: var(--mint-500);
    border-color: var(--mint-500);
    color: var(--text-inverse);
}

.filter-dropdown-item .item-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.filter-dropdown-item.selected .item-radio {
    border-color: var(--mint-500);
}

.filter-dropdown-item.selected .item-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mint-500);
}

.clear-filters-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}

.clear-filters-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.filter-disabled-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 0 4px;
}

.hide-added-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-left: auto;
    user-select: none;
}

.hide-added-toggle input {
    display: none;
}

.hide-added-slider {
    width: 36px;
    height: 20px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    position: relative;
    transition: background var(--transition-fast);
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.hide-added-slider::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-secondary);
    top: 2px;
    left: 2px;
    transition: all var(--transition-fast);
}

.hide-added-toggle input:checked + .hide-added-slider {
    background: var(--mint-500);
    border-color: var(--mint-500);
}

.hide-added-toggle input:checked + .hide-added-slider::after {
    background: white;
    left: 18px;
}

.hide-added-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .filter-bar {
        gap: 8px;
    }

    .filter-chip {
        padding: 6px 14px;
        font-size: 0.78rem;
    }

    .filter-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        min-width: 100%;
        max-height: 50vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        animation: slideUp 0.25s ease;
    }
}

/* --- Filter Chips --- */
.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.chip {
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chip:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.chip.active {
    background: var(--mint-glow);
    color: var(--mint-300);
    border-color: var(--mint-500);
}

/* --- Page Hidden --- */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* --- Library Show Card (Horizontal) --- */
.library-card {
    display: flex;
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    animation: fadeInUp 0.5s ease both;
}

.library-card:hover {
    border-color: var(--mint-700);
    box-shadow: var(--shadow-md);
}

.library-card-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast), background var(--transition-fast);
    z-index: 1;
}

.library-card:hover .library-card-remove {
    opacity: 1;
}

.library-card-remove:hover {
    background: var(--danger);
}

.library-card-poster {
    width: 80px;
    min-height: 110px;
    object-fit: cover;
    flex-shrink: 0;
}

.library-card-body {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.library-card-title {
    font-size: 0.95rem;
    font-weight: 700;
}

.library-card-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.library-card-progress {
    margin-top: auto;
}

.library-card-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* --- Library Toolbar --- */
.library-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.library-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    user-select: none;
}

.library-select-all input {
    accent-color: var(--mint-500);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.library-delete-selected:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- Library Card Checkbox --- */
.library-card-checkbox {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    accent-color: var(--mint-500);
    cursor: pointer;
    z-index: 2;
    flex-shrink: 0;
}

.library-card {
    padding-left: 34px;
}

.library-card.selected {
    border-color: var(--mint-500);
    box-shadow: 0 0 0 1px var(--mint-500), var(--shadow-sm);
}

/* --- Confirm Dialog --- */
.confirm-dialog {
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.confirm-dialog h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.confirm-dialog p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.confirm-dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.library-cards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- Loading Skeleton --- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-card-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

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

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

/* Spinner */
.spin-container {
    display: inline-block;
}

.spin-container svg {
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    color: var(--mint-400);
}

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

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

/* --- Tab Underline --- */
.section-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-subtle);
    margin-bottom: 32px;
}

.section-tab {
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}

.section-tab:hover {
    color: var(--text-primary);
}

.section-tab.active {
    color: var(--mint-400);
    border-bottom-color: var(--mint-500);
}

/* --- Footer --- */
.app-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 24px 0;
    margin-top: 60px;
}

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

.footer-tmdb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tmdb-logo {
    height: 14px;
    opacity: 0.6;
}

.footer-links {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

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

/* --- Consent Banner --- */
.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3000;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-medium);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease;
}

.consent-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.consent-content p {
    flex: 1;
    min-width: 200px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.consent-content a {
    color: var(--mint-400);
    text-decoration: underline;
}

.consent-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.consent-btn {
    white-space: nowrap;
    padding: 8px 18px !important;
    font-size: 0.85rem !important;
}

