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

:root {
    --primary-color: #0088FF;
    --text-color: #001C33;
    --text-muted: #6c757d;
    --bg-color: #fff;
    --card-bg: #fff;
    --border-color: #001C33;
    --success-color: #4caf50;
    --error-color: #f44336;

    /* Theme variables */
    --header-bg: #fff;
    --header-text: #001C33;
    --page-bg: #fff;
    --header-btn-bg: #0088FF;
    --header-btn-border: #0088FF;
    --header-btn-icon: #fff;
    --search-border: #0088FF;
    --search-icon: #0088FF;
    --filter-default-border: #0088FF;
    --filter-default-text: #0088FF;
    --filter-active-bg: #DCEFFF;
    --filter-active-border: #DCEFFF;
    --filter-active-text: #0088FF;
    --title-link: #0088FF;
    --pill-bg: #DCEFFF;
    --pill-text: #001C33;
    --content-text: #001C33;
}

/* Barbie Theme */
.theme-barbie {
    --header-bg: #FFCAE5;
    --page-bg: #FFFDED;
    --header-btn-bg: #30BFFA;
    --header-btn-border: #30BFFA;
    --header-btn-icon: #FFFDED;
    --search-border: #30BFFA;
    --search-icon: #30BFFA;
    --filter-default-border: #FE00BD;
    --filter-default-text: #FE00BD;
    --filter-active-bg: #FFCAE5;
    --filter-active-border: #FFCAE5;
    --filter-active-text: #001C33;
    --title-link: #FE00BD;
    --pill-bg: #FFCAE5;
    --pill-text: #001C33;
    --content-text: #001C33;
}

/* Snow White Theme */
.theme-snow-white {
    --header-bg: #E6131A;
    --header-text: #FFFFFF;
    --page-bg: #FFFFFF;
    --header-btn-bg: #F9E123;
    --header-btn-border: #F9E123;
    --header-btn-icon: #001C33;
    --search-border: #F9E123;
    --search-icon: #001C33;
    --filter-default-border: #001C33;
    --filter-default-text: #001C33;
    --filter-active-bg: #F9E123;
    --filter-active-border: #F9E123;
    --filter-active-text: #001C33;
    --title-link: #E6131A;
    --pill-bg: #F9E123;
    --pill-text: #001C33;
    --content-text: #001C33;
}

/* Alien Theme */
.theme-alien {
    --header-bg: #000000;
    --header-text: #12B150;
    --page-bg: #000000;
    --header-btn-bg: #12B150;
    --header-btn-border: #12B150;
    --header-btn-icon: #000000;
    --search-border: #12B150;
    --search-icon: #12B150;
    --filter-default-border: #12B150;
    --filter-default-text: #12B150;
    --filter-active-bg: #FBFF91;
    --filter-active-border: #FBFF91;
    --filter-active-text: #000000;
    --title-link: #12B150;
    --pill-bg: #FBFF91;
    --pill-text: #000000;
    --content-text: #FBFF91;
}

body {
    font-family: 'Work Sans', sans-serif;
    color: var(--text-color);
    background-color: var(--page-bg);
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-overlay.hidden {
    display: none;
}

.login-box {
    width: 90%;
    max-width: 320px;
    text-align: center;
}

.login-box h2 {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-box input {
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

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

.login-box .btn {
    margin-top: 0.5rem;
}

.login-error {
    color: var(--error-color);
    font-size: 0.875rem;
    min-height: 1.25rem;
    margin: 0;
}

/* Header Outer Container */
.header-outer {
    width: 100%;
    border-bottom: 0.0625rem solid var(--border-color);
    padding: 6.25rem 1.25rem 1.25rem 1.25rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.header-outer.hidden {
    transform: translateY(-100%);
}

.header-content {
    max-width: 51.25rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

h1 {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--header-text);
    transition: color 0.3s ease;
}

.movie-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--header-text);
    transition: color 0.3s ease;
}

.header-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--header-btn-border);
    border-radius: 0.25rem;
    background: var(--header-btn-bg);
    color: var(--header-btn-icon);
    font-size: 1.125rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.icon-btn:hover {
    filter: brightness(0.9);
}

/* Search Container */
.search-container {
    display: none;
    position: relative;
    width: 22.0625rem;
}

.search-input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 2.5rem;
    border: 1px solid var(--search-border);
    border-radius: 0.25rem;
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

/* Hide native search input clear button */
.search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.search-icon {
    position: absolute;
    left: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.125rem;
    color: var(--search-icon);
    pointer-events: none;
    transition: color 0.3s ease;
}

.search-clear {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.125rem;
    color: #001C33;
    cursor: pointer;
    display: block;
}

.search-clear.visible {
    display: block;
}

.search-btn {
    display: flex;
}

/* Mobile search active state */
.header-content.search-active {
    position: relative;
}

.header-content.search-active .header-title,
.header-content.search-active .search-btn,
.header-content.search-active .settings-btn,
.header-content.search-active .add-btn,
.header-content.search-active .help-choose-btn,
.header-content.search-active .director-btn {
    display: none;
}

.header-content.search-active .search-container {
    display: block;
    width: 100%;
    flex: 1;
}

/* Main Content */
.main-content {
    padding: 11.5rem 1.25rem 0 1.25rem;
    position: relative;
    z-index: 1;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 2.5rem;
}

.loading.hidden {
    display: none;
}

.loading-icon {
    display: inline-block;
    transition: opacity 0.2s ease;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
    gap: 1.25rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-top: 0.625rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 0.0625rem solid #001C33;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-separator {
    width: 1px;
    align-self: stretch;
    background: #D9D9D9;
    flex-shrink: 0;
}

.filter-bar {
    max-width: none;
}

/* Sort button container (fixed left in filter bar) */
.sort-button-container {
    position: sticky;
    left: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    background: var(--page-bg);
    padding-right: 0.75rem;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

/* Pipe separator on right side */
.sort-button-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #D9D9D9;
}

/* Sort button always active style */
.sort-button-container .filter-btn,
.sort-button-container .filter-btn:hover {
    background-color: var(--filter-active-bg);
    border: 1px solid var(--filter-active-border);
    color: var(--filter-active-text);
}

/* Sort popover */
.sort-popover-container {
    position: relative;
}

.sort-popover {
    display: none;
    position: fixed;
    background: #fff;
    border: 0.0625rem solid #D9D9D9;
    border-radius: 0.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
}

.sort-popover.visible {
    display: flex;
}

.sort-popover .filter-btn {
    justify-content: flex-start;
    white-space: nowrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    background-color: transparent;
    border: 1px solid var(--filter-default-border);
    color: var(--filter-default-text);
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 1.6875rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.filter-btn i {
    font-size: 0.75rem;
}

.filter-btn:hover {
    background-color: var(--filter-active-bg);
}

.filter-btn.active {
    background-color: var(--filter-active-bg);
    border: 1px solid var(--filter-active-border);
    color: var(--filter-active-text);
}

/* Movie Cards */
.movie-card {
    display: flex;
    gap: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 0.0625rem solid #001C33;
}

.movie-poster {
    width: 7.875rem;
    aspect-ratio: 2/3;
    background-color: #D9D9D9;
    flex-shrink: 0;
    object-fit: cover;
}

.movie-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.movie-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.movie-title a {
    color: var(--title-link);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.watched-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--pill-bg);
    padding: 0.4375rem 0.3125rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
    color: var(--pill-text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.watched-badge i {
    font-size: 0.75rem;
}

.movie-icons {
    display: flex;
    gap: 1rem;
    font-size: 1rem;
    color: var(--content-text);
    transition: color 0.3s ease;
}

.movie-notes {
    font-size: 0.6875rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--content-text);
    transition: color 0.3s ease;
}

.edit-link {
    font-size: 0.6875rem;
    font-weight: 400;
    color: var(--title-link);
    text-decoration: underline;
    margin-top: auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: fit-content;
    transition: color 0.3s ease;
}

.edit-link:hover {
    filter: brightness(0.8);
}

/* Overflow Menu - hidden by default */
.overflow-btn {
    display: none;
}

.overflow-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
    background: #fff;
    padding: 6.25rem 1.25rem 1.25rem 1.25rem;
    z-index: 1001;
}

.overflow-menu.active {
    display: flex;
}

/* Small Breakpoint - below 820px */
@media (max-width: 51.1875rem) {
    .header-actions {
        position: relative;
    }

    .header-actions .search-btn,
    .header-actions .help-choose-btn,
    .header-actions .director-btn,
    .header-actions .add-btn {
        display: none;
    }

    .overflow-btn {
        display: flex;
    }

    /* When search is active, hide overflow and show search */
    .header-content.search-active .overflow-btn {
        display: none;
    }
}

/* Large Breakpoint - 820px */
@media (min-width: 51.25rem) {
    .header-outer {
        padding: 6.25rem 1.25rem 1.25rem 1.25rem;
    }

    .header-content {
        max-width: none;
    }

    .search-btn {
        display: none;
    }

    .search-container {
        display: block;
    }
}

/* Edit mode title input */
.movie-title input {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    width: 100%;
}

/* Done button */
.done-btn {
    background: var(--primary-color);
    border: none;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.done-btn:hover {
    background: #0077e6;
}

/* Edit mode form fields */
.edit-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.edit-field label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.edit-field input[type="text"],
.edit-field input[type="date"] {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
}

.edit-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 136, 255, 0.2);
}

/* Toggle and chooser buttons in edit mode */
.edit-toggle-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.edit-toggle-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    width: 100%;
    margin-bottom: 0.25rem;
}

.toggle-btn {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
    color: var(--text-muted);
}

.toggle-btn:hover {
    border-color: var(--primary-color);
}

.toggle-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Delete button in edit mode */
.delete-btn {
    background: none;
    border: none;
    color: var(--error-color);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.delete-btn:hover {
    text-decoration: underline;
}

/* Card footer for edit mode */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

/* Toast notification */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
}

.toast {
    background: #333;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background: var(--success-color);
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#addFormContainer,
#editFormContainer,
#filterFormContainer {
    overflow-y: auto;
    flex: 1;
}

.modal-content .card-footer {
    flex-shrink: 0;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    margin-top: 0.5rem;
}

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

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-muted);
    padding: 0.25rem;
}

.modal-close:hover {
    color: var(--text-color);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 136, 255, 0.2);
}

/* Status toggle in modal */
.status-toggle {
    display: flex;
    gap: 0.5rem;
}

.status-toggle .toggle-btn {
    flex: 1;
    justify-content: center;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #0077e6;
}

.btn-secondary {
    background: white;
    color: var(--text-color);
    border: 1px solid #ccc;
}

.btn-secondary:hover {
    background: #f5f5f5;
}

/* Tags */
.tags-input-row {
    display: flex;
    gap: 0.5rem;
}

.tags-input-row input {
    flex: 1;
}

.tags-input-row button {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    background: #D9D9D9;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-chip-remove {
    cursor: pointer;
    font-size: 0.625rem;
    color: #001C33;
}

.tag-chip-remove:hover {
    color: var(--error-color);
}

/* Error state */
.error {
    text-align: center;
    padding: 2rem;
    color: var(--error-color);
    background-color: #ffebee;
    border-radius: 8px;
    margin: 1rem;
}

/* Director Modal */
.director-modal-content {
    max-width: 500px;
    max-height: 80vh;
}

.director-search {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.director-search input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

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

#directorResults {
    overflow-y: auto;
    max-height: calc(80vh - 180px);
}

.director-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.director-movie-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.director-movie-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border: 1px solid #eee;
    border-radius: 4px;
}

.director-movie-item.existing {
    opacity: 0.5;
    background: #f5f5f5;
}

.director-movie-poster {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 2px;
    background: #D9D9D9;
    flex-shrink: 0;
}

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

.director-movie-title {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.director-movie-year {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.director-movie-status {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-style: italic;
}

.director-movie-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.director-movie-actions .toggle-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.director-movie-actions .toggle-btn i {
    font-size: 0.75rem;
}

.director-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.director-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.director-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

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

/* Title Typeahead */
.title-typeahead-container {
    position: relative;
}

.typeahead-results {
    display: none;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.typeahead-results.visible {
    display: block;
}

.typeahead-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.typeahead-items {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.typeahead-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.15s;
}

.typeahead-item:hover {
    background: #eee;
}

.typeahead-poster {
    width: 50px;
    height: 75px;
    background: #ddd;
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typeahead-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.typeahead-poster .no-poster {
    color: var(--text-muted);
    font-size: 1rem;
}

.typeahead-title {
    font-size: 0.625rem;
    text-align: center;
    margin-top: 0.25rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* Help Me Choose Modal */
.help-choose-modal-content {
    max-width: 350px;
    text-align: center;
}

.help-choose-body {
    padding: 1rem 0;
}

.help-choose-movie {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.help-choose-poster {
    width: 150px;
    height: 225px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.help-choose-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.help-choose-poster .no-poster {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
}

.help-choose-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.help-choose-title a {
    color: inherit;
    text-decoration: none;
}

.help-choose-title a:hover {
    text-decoration: underline;
}

.help-choose-director {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.help-choose-year {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.help-choose-empty {
    padding: 2rem;
    color: var(--text-muted);
}

.help-choose-footer {
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Poster Picker */
.poster-field-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.poster-field-row input {
    flex: 1;
}

.poster-search-btn {
    padding: 0.5rem 0.75rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    flex-shrink: 0;
}

.poster-search-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.poster-picker-container {
    position: relative;
}

.poster-picker-popover {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    padding: 0.75rem;
}

.poster-picker-popover.visible {
    display: block;
}

.poster-picker-grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.poster-picker-option {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.poster-picker-option:hover {
    border-color: var(--primary-color);
}

.poster-picker-option img {
    width: 60px;
    height: 90px;
    object-fit: cover;
    display: block;
}

.poster-picker-option .poster-option-info {
    font-size: 0.625rem;
    padding: 0.25rem;
    background: #f5f5f5;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
}

.poster-picker-loading {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.poster-picker-empty {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}
