/* Minimal Web Design System with Steel Accents */
:root {
    /* Light mode colors */
    --bg-primary: #fff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e8e8e8;
    --bg-hover: #d0d0d0;

    --text-primary: #000;
    --text-secondary: #333;
    --text-muted: #666;

    --accent-primary: #7c8ca3;
    --accent-hover: #6a7a90;
    --accent-success: #008000;

    --border-color: #ccc;
    --border-dark: #999;

    /* Spacing */
    --spacing-xs: 2px;
    --spacing-sm: 4px;
    --spacing-md: 8px;
    --spacing-lg: 12px;
    --spacing-xl: 16px;
    --spacing-xxl: 20px;

    /* No rounded corners - pure rectangles */
    --radius: 0px;
}

/* Dark mode */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #3a3a3a;
    --bg-hover: #4a4a4a;

    --text-primary: #fff;
    --text-secondary: #ccc;
    --text-muted: #999;

    --accent-primary: #7c8ca3;
    --accent-hover: #8a9ab3;

    --border-color: #444;
    --border-dark: #666;
}

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

html, body {
    width: 100%;
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.4;
    transition: background-color 0.2s, color 0.2s;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

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

.loading-logo {
    margin-bottom: var(--spacing-md);
}

.loading-text {
    font-size: 12px;
    color: var(--text-secondary);
}

/* App Container */
.app-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

/* Header */
.header {
    padding: var(--spacing-md) var(--spacing-xxl);
    border-bottom: 1px solid var(--accent-primary);
    background: var(--bg-secondary);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.theme-toggle {
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--accent-primary);
    color: #fff;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 16px;
    font-weight: bold;
}

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

.logo-icon svg {
    display: block;
}

.logo-text {
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: var(--spacing-lg) var(--spacing-xxl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    overflow: visible;
}

/* Hero Section */
.hero-section {
    margin-bottom: var(--spacing-md);
}

.hero-content {
    position: relative;
    border: 2px dashed var(--accent-primary);
    overflow: hidden;
    background: var(--bg-secondary);
    cursor: pointer;
}

.hero-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
}

.hero-card-content {
    position: relative;
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .hero-card-content {
    background: rgba(26, 26, 26, 0.9);
}

.hero-card-content h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: var(--spacing-sm);
}

.hero-card-content p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.hero-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.hero-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--accent-primary);
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    text-decoration: none;
}

.hero-btn {
    transition: all 0.3s ease;
}

.hero-btn.primary {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.hero-btn.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.hero-btn.secondary {
    background: transparent;
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.hero-btn.secondary:hover {
    background: var(--accent-primary);
    color: #fff;
}

.hero-btn svg {
    width: 12px;
    height: 12px;
}

/* Action Row */
.action-row {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.action-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    text-decoration: none;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: var(--accent-primary);
    color: #fff;
}

.action-btn:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.action-btn svg {
    width: 14px;
    height: 14px;
}

.action-btn span {
    font-size: 12px;
}

/* Library Section */
.library-section {
    width: 100%;
    margin-bottom: var(--spacing-xxl);
    overflow: visible;
}

.section-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border-left: 2px solid var(--accent-primary);
    position: relative;
    z-index: 100;
    overflow: visible;
}

#community-recommendations-section .section-title {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.05));
    border-left: 3px solid #4CAF50;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

#community-recommendations-section .section-title svg {
    color: #4CAF50;
}

.info-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    opacity: 0.6;
    cursor: default;
    transition: opacity 0.2s ease;
}

.info-tooltip:hover {
    opacity: 1;
}

.info-tooltip svg {
    color: var(--text-secondary);
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: 50%;
    top: calc(100% + 12px);
    transform: translateX(-50%);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: normal;
    line-height: 1.5;
    white-space: normal;
    width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    z-index: 2000;
    pointer-events: none;
}

.info-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-text::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: var(--bg-secondary);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: var(--spacing-md);
    width: 100%;
}

.content-card {
    position: relative;
    cursor: pointer;
    overflow: visible;
    aspect-ratio: 2 / 3;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    outline: none;
}

.content-card-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 2px solid var(--bg-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
    z-index: 10;
    padding: 0;
}

.content-card-remove svg {
    width: 12px;
    height: 12px;
}

.content-card:hover .content-card-remove,
.content-card:focus-within .content-card-remove {
    opacity: 1;
    transform: scale(1);
}

.content-card-remove:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.content-card-remove:active {
    transform: scale(0.95);
}

.content-card:focus,
.content-card:hover {
    border-color: var(--accent-primary);
}

.content-card:hover .content-card-overlay,
.content-card:focus .content-card-overlay {
    background: rgba(124, 140, 163, 0.95);
}

.content-card {
    transition: border-color 0.3s ease;
}

.content-card-overlay {
    transition: background 0.3s ease;
}

.content-card-poster {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.content-card-overlay {
    width: 100%;
    padding: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .content-card-overlay {
    background: rgba(0, 0, 0, 0.9);
}

.play-icon {
    display: none;
}

.content-card-title {
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 2px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    max-height: 2.6em;
}

.content-card-meta {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 3px;
}

.content-card-meta svg {
    flex-shrink: 0;
    vertical-align: middle;
}

/* Empty State */
.empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.empty-state-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-xl);
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
}

.empty-state-icon {
    font-size: 32px;
}

.empty-state-content h2 {
    font-size: 16px;
    font-weight: bold;
}

.empty-state-content p {
    font-size: 12px;
    color: var(--text-secondary);
    max-width: 400px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--bg-primary);
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid var(--accent-primary);
    width: 90%;
}

.modal-header {
    padding: var(--spacing-md);
    border-bottom: 2px solid var(--border-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
}

.modal-header h2 {
    font-size: 14px;
    font-weight: bold;
}

.modal-close {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-tertiary);
}

.modal-close svg {
    width: 16px;
    height: 16px;
}

.modal-body {
    flex: 1;
    padding: var(--spacing-md);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Search Modal */
.search-input-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-primary);
}

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

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--bg-primary);
}

.search-result-item {
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border: none;
    cursor: pointer;
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    outline: none;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    transition: all 0.3s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-secondary);
}

.search-result-item:focus {
    background: var(--accent-primary);
    color: #fff;
    outline: none;
}

.search-result-item:focus .search-result-info h3,
.search-result-item:focus .search-result-meta,
.search-result-item:focus .search-result-year {
    color: #fff;
}

.search-result-poster {
    width: 40px;
    height: 60px;
    object-fit: cover;
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-hover) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.search-result-poster[src*="tmdb"] {
    animation: none;
    background: var(--bg-secondary);
}

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

.search-result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--spacing-xs);
}

.search-result-info h3 {
    font-size: 12px;
    font-weight: bold;
    margin: 0;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: var(--text-primary);
}

.search-result-meta {
    display: flex;
    gap: var(--spacing-sm);
    font-size: 10px;
    color: var(--text-muted);
    align-items: center;
    flex-wrap: wrap;
}

.search-result-year {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
}

.media-type-badge {
    background: var(--accent-primary);
    color: #fff;
    padding: 2px 4px;
    font-size: 9px;
    font-weight: bold;
    border: none;
}

.search-result-item:focus .media-type-badge {
    background: #fff;
    color: var(--accent-primary);
}

/* Video Player */
.video-player-container {
    position: relative;
    background: var(--bg-primary);
    overflow: hidden;
    width: 95vw;
    max-width: 1200px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--border-dark);
}

.video-player-container.theater-mode {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border: none;
}

.video-player-header {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.video-player-header h3 {
    font-size: 12px;
    font-weight: bold;
}

.video-header-buttons {
    display: flex;
    gap: var(--spacing-xs);
}

.video-header-btn {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
}

.video-header-btn:hover {
    background: var(--bg-tertiary);
}

.video-header-btn svg {
    width: 14px;
    height: 14px;
}

/* Season Controls */
.season-controls {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.season-controls.hidden {
    display: none;
}

.season-picker {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.season-picker label {
    font-size: 11px;
    font-weight: bold;
    color: var(--text-primary);
    white-space: nowrap;
}

.select-input {
    padding: 2px 4px;
    background: var(--bg-primary);
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
    font-size: 11px;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    transition: all 0.3s ease;
}

.select-input:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}

.select-input option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.random-episode-btn {
    padding: 2px var(--spacing-md);
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
    height: 19px;
    box-sizing: border-box;
}

.random-episode-btn:hover {
    background: var(--accent-primary);
    color: #fff;
}

.random-episode-btn svg {
    width: 14px;
    height: 14px;
}

/* Video Container */
.video-container {
    position: relative;
    flex: 1;
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    z-index: 100;
}

.video-loading.hidden {
    display: none;
}

.video-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-secondary);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.video-loading-text {
    color: var(--accent-primary);
    font-size: 13px;
    font-weight: bold;
}

#video-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    min-height: 500px;
    cursor: auto !important;
    pointer-events: auto;
}

.theater-mode .video-container {
    height: 100%;
}

.theater-mode #video-frame {
    min-height: 0;
    height: 100%;
}

/* Video Footer Controls */
.video-footer {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-dark);
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.video-control-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-primary);
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 11px;
    font-weight: normal;
    font-family: Arial, Helvetica, sans-serif;
    transition: all 0.3s ease;
}

.video-control-btn:hover {
    background: var(--bg-hover);
}

.video-control-btn:active {
    background: var(--bg-tertiary);
}

.video-control-btn span {
    display: inline;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    z-index: 2000;
    pointer-events: none;
}

.toast {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border: 2px solid var(--border-dark);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: bold;
    pointer-events: auto;
}

.toast.success {
    border-color: var(--accent-success);
    background: #e6ffe6;
    color: #006600;
}

.toast.error {
    border-color: #ff4444;
    background: #ff4444;
    color: #ffffff;
}

.toast.warning {
    border-color: #ff9900;
    background: #ff9900;
    color: #ffffff;
}

/* Dark mode toast adjustments */
[data-theme="dark"] .toast.success {
    background: #004400;
    color: #99ff99;
    border-color: #66cc66;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: var(--spacing-sm);
    }

    .header {
        padding: var(--spacing-md);
    }

    .main-content {
        padding: var(--spacing-md);
    }

    .action-row {
        flex-wrap: wrap;
    }

    .hero-card-content h3 {
        font-size: 16px;
    }

    .section-title {
        font-size: 13px;
    }
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-dark);
    margin-bottom: var(--spacing-lg);
    background: var(--bg-secondary);
}

.tab-btn {
    padding: var(--spacing-md) var(--spacing-xl);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
    position: relative;
}

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

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

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    background: var(--bg-primary);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
    overflow: visible;
}

.tab-content.active {
    display: block;
}

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

/* Video Player Section (inline) */
.video-player-section {
    width: 100%;
}

.video-player-container-inline {
    background: var(--bg-primary);
    border: 2px solid var(--border-dark);
    display: flex;
    flex-direction: column;
}

.video-container-inline {
    position: relative;
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

#video-frame-inline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.video-player-container-inline.theater-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    border: none;
}

.video-player-container-inline.theater-mode .video-container-inline,
.video-player-container-inline.theater-mode #video-frame-inline {
    min-height: 0;
    height: 100%;
}

/* Watchlist Search Bar */
.watchlist-search-bar {
    margin-bottom: var(--spacing-lg);
}

.watchlist-search-bar input {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    transition: all 0.3s ease;
}

.watchlist-search-bar input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-primary);
}

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

/* Inline Search Results Section */
.search-results-section {
    margin-bottom: var(--spacing-lg);
    border: 2px solid var(--accent-primary);
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

.search-results-section.hidden {
    display: none;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.search-results-header h3 {
    font-size: 14px;
    font-weight: bold;
    margin: 0;
}

.close-search-btn {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid var(--border-dark);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
}

.close-search-btn:hover {
    background: var(--bg-tertiary);
}

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

.search-results-list {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    /* Better scrolling for TV remotes */
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

/* Watchlist Grid - matches recommendation card style */
.watchlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: var(--spacing-md);
    width: 100%;
}

.watchlist-card {
    position: relative;
    cursor: pointer;
    overflow: visible;
    aspect-ratio: 2 / 3;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    outline: none;
    transition: border-color 0.3s ease;
}

.watchlist-card:focus,
.watchlist-card:hover {
    border-color: var(--accent-primary);
}

.watchlist-card:hover .watchlist-card-overlay,
.watchlist-card:focus .watchlist-card-overlay {
    background: rgba(124, 140, 163, 0.95);
}

.watchlist-card-poster {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.watchlist-card-overlay {
    width: 100%;
    padding: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

[data-theme="dark"] .watchlist-card-overlay {
    background: rgba(0, 0, 0, 0.9);
}

.watchlist-card-title {
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 2px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    max-height: 2.6em;
}

.watchlist-card-progress {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.watchlist-card-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 2px solid var(--bg-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
    z-index: 10;
    padding: 0;
}

.watchlist-card-remove svg {
    width: 12px;
    height: 12px;
}

.watchlist-card:hover .watchlist-card-remove,
.watchlist-card:focus-within .watchlist-card-remove {
    opacity: 1;
    transform: scale(1);
}

.watchlist-card-remove:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.watchlist-card-remove:active {
    transform: scale(0.95);
}

.watchlist-card-recommend {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #4CAF50;
    border: 2px solid var(--bg-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
    z-index: 10;
    padding: 0;
}

.watchlist-card-recommend svg {
    width: 12px;
    height: 12px;
}

.watchlist-card:hover .watchlist-card-recommend,
.watchlist-card:focus-within .watchlist-card-recommend {
    opacity: 1;
    transform: scale(1);
}

.watchlist-card-recommend:hover {
    background: #45a049;
    transform: scale(1.1);
}

.watchlist-card-recommend:active {
    transform: scale(0.95);
}

/* Community recommendation badge */
.community-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(76, 175, 80, 0.95);
    color: #fff;
    padding: 6px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.content-card.community-recommendation {
    border: 2px solid rgba(76, 175, 80, 0.5);
}

.content-card.community-recommendation:hover {
    border-color: rgba(76, 175, 80, 0.8);
    box-shadow: 0 8px 16px rgba(76, 175, 80, 0.15);
}

/* Community loading indicator */
.community-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 14px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(76, 175, 80, 0.2);
    border-top-color: #4CAF50;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Utility classes */
.hidden {
    display: none !important;
}

/* Footer */
.app-footer {
    padding: 1rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.app-footer .version {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.6;
}
