/* My Films Page Styles */
.my-films-container {
    min-height: 100vh;
    max-height: 100dvh;
    background: #000000;
    padding: 2rem 1.5rem;
    padding-top: 6rem;
    padding-bottom: 8rem;
    box-sizing: border-box;
    position: relative;
    overflow-y: auto;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 2.5rem;
    text-align: center;
    letter-spacing: -0.03em;
}

/* Search and Filters Section */
.filters-section {
    max-width: 600px;
    margin: 0 auto 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: rgba(255, 255, 255, 0.08);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.2s ease;
    outline: none;
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.filters-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.filter-select {
    flex: 9;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.filter-select:focus {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-select option {
    background: #1a1a1a;
    color: #ffffff;
}

/* Sort Button */
.sort-button {
    flex: 1;
    min-width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sort-button:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.sort-button:active {
    transform: scale(0.95);
}

/* Sort Modal */
.sort-modal-content {
    max-width: 350px;
    width: 90%;
}

.sort-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 1.5rem;
    letter-spacing: -0.02em;
    text-align: center;
}

.sort-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sort-option {
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}

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

.sort-option.selected {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.sort-option.selected i {
    color: #ffffff;
}

.sort-option:active {
    transform: scale(0.98);
}

.filter-button {
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    white-space: nowrap;
}

.filter-button:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-button.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

/* Films List Container */
.films-list-container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 300px;
}

.loading-message,
.empty-message {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    padding: 3rem 1rem;
}

.cross-year-message {
    background: rgba(255, 193, 7, 0.1);
    border: 0.5px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.cross-year-message p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
}

.cross-year-message strong {
    color: #ffffff;
    font-weight: 600;
}

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

/* Film Tile */
.film-tile {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(30px);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 1rem;
    min-height: 60px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.film-tile:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.film-tile:active {
    transform: scale(0.98);
}

.film-tile-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.film-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.film-tile-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.film-date {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    white-space: nowrap;
}

.film-chevron {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.film-tile:hover .film-chevron {
    color: rgba(255, 255, 255, 0.7);
}

/* Pagination */
.pagination-container {
    max-width: 600px;
    margin: 2rem auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1rem;
}

.pagination-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.pagination-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.pagination-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-button i {
    font-size: 1rem;
}

.pagination-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Film Detail Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 25000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1;
    cursor: pointer;
}

.film-modal-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    width: 100%;
    pointer-events: none;
}

.modal-content {
    position: relative;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(40px);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

/* External close button - positioned below modal, centered */
.film-close-external {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    align-self: center;
    pointer-events: auto;
}

.film-close-external:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.film-close-external:active {
    transform: scale(0.95);
}

#modal-film-content {
    padding: 2rem;
    flex: 1;
}

.modal-content-wrapper {
    flex: 1;
    min-width: 0;
}

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

.modal-close:active {
    transform: scale(0.95);
}

/* Main wrapper with content on left, poster on right */
.modal-main-wrapper {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.modal-content-wrapper {
    flex: 1;
    min-width: 0;
}

.modal-poster-container {
    flex-shrink: 0;
    width: 120px;
}

.modal-poster-container:empty {
    display: none;
}

.modal-poster {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    object-fit: cover;
    aspect-ratio: 2/3;
    background: rgba(255, 255, 255, 0.05);
}

.modal-film-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 1.25rem;
    letter-spacing: -0.02em;
    padding-right: 3rem;
    line-height: 1.2;
}

/* User Data Section (Primary - Stacked Vertically) */
.modal-user-data-section {
    margin-bottom: 1.75rem;
}

.modal-user-item {
    margin-bottom: 1rem;
}

.modal-user-item:last-child {
    margin-bottom: 0;
}

.modal-user-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.modal-user-value {
    font-size: 1rem;
    color: #ffffff;
    font-weight: 600;
    line-height: 1.4;
}

.modal-rating-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

/* TMDB Section (Secondary - Subtle, Full Width) */
.modal-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 2rem 0 1.5rem;
    width: 100%;
}

.modal-tmdb-section {
    opacity: 0.75;
    width: 100%;
}

.modal-tmdb-header {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.modal-tmdb-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.modal-tmdb-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.modal-tmdb-overview-container {
    margin-bottom: 1rem;
}

.modal-tmdb-overview {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.5rem;
}

.modal-read-more-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-top: 0.25rem;
    transition: color 0.2s ease;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.2);
    text-underline-offset: 3px;
}

.modal-read-more-btn:hover {
    color: rgba(255, 255, 255, 0.7);
    text-decoration-color: rgba(255, 255, 255, 0.4);
}

.modal-tmdb-details-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 0.5px solid rgba(255, 255, 255, 0.06);
}

.modal-tmdb-detail {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

.modal-tmdb-detail-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    margin-right: 0.5rem;
}

.modal-loading {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    padding: 2rem 0;
}

.modal-action-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    width: 100%;
}

.modal-edit-button,
.modal-delete-button {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-sizing: border-box;
    border: 1px solid;
}

.modal-edit-button {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.95);
}

.modal-edit-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
}

.modal-edit-button:active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(0);
}

.modal-delete-button {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
    color: rgba(255, 107, 107, 0.95);
}

.modal-delete-button:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.5);
    color: #ff6b6b;
    transform: translateY(-1px);
}

.modal-delete-button:active {
    background: rgba(255, 107, 107, 0.25);
    transform: translateY(0);
}

.modal-delete-button i {
    font-size: 1rem;
}

/* Delete Confirmation Modal */
#delete-confirm-modal {
    z-index: 26000; /* Higher than film modal (25000) to appear on top */
}

.confirm-modal-content {
    text-align: center;
    max-width: 400px;
    padding: 2.5rem 2rem;
    position: relative;
    z-index: 2; /* Ensure it appears above the overlay */
}

.confirm-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 1.5rem;
    letter-spacing: -0.02em;
}

.confirm-modal-message {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 2.5rem;
    line-height: 1.6;
    padding: 0 0.5rem;
}

.confirm-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirm-button {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    min-width: 100px;
}

.confirm-no {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.confirm-no:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.confirm-yes {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
}

.confirm-yes:hover {
    background: rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.5);
    color: #ff6b6b;
}

.confirm-button:active {
    transform: scale(0.98);
}

/* Edit Film Modal */
.edit-modal-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    width: 100%;
    pointer-events: none;
}

.edit-modal-content {
    max-width: 450px;
    padding: 0;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.edit-modal-content .modal-header {
    padding: 1.5rem 2rem 1rem;
    justify-content: space-between;
    align-items: center;
}

.edit-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.02em;
}

.edit-modal-body {
    padding: 1.5rem 2rem;
    flex: 1;
}

.edit-field {
    margin-bottom: 2.5rem;
}

.edit-field:last-child {
    margin-bottom: 0;
}

.edit-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* External close button - positioned below modal, centered */
.edit-close-external {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    align-self: center;
    pointer-events: auto;
}

.edit-close-external:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.edit-close-external:active {
    transform: scale(0.95);
}

/* Rating Slider */
.rating-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.rating-display-input {
    font-size: 4rem;
    font-weight: 700;
    color: #ffffff;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    text-align: center;
    width: auto;
    min-width: 120px;
    transition: all 0.3s ease;
    letter-spacing: -0.05em;
    line-height: 1;
    font-family: inherit;
    outline: none;
    cursor: text;
}

.rating-display-input:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.rating-display-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.rating-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rating-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.rating-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rating-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Segmented Control */
.segmented-control {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.25rem;
    position: relative;
}

.segmented-control::before {
    content: '';
    position: absolute;
    top: 0.25rem;
    bottom: 0.25rem;
    left: 0.25rem;
    width: calc(50% - 0.375rem);
    background: rgba(144, 238, 144, 0.4); /* Pastel green for First Time */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    pointer-events: none;
    opacity: 0; /* Hidden by default - only show when a button is selected */
}

.segmented-control.has-selection::before {
    opacity: 1; /* Show indicator when a button is selected */
}

.segmented-control.selected-right::before {
    transform: translateX(calc(100% + 0.5rem));
    background: rgba(255, 255, 255, 0.2); /* Grey for Rewatch */
}

.segmented-control-button {
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    position: relative;
    z-index: 1;
}

.segmented-control-button:hover {
    color: rgba(255, 255, 255, 0.9);
}

.segmented-control-button.selected {
    color: #ffffff;
}

/* First Time button gets pastel green when selected */
.segmented-control-button#edit-rewatch-no.selected {
    color: #90ee90; /* Pastel green text */
}

/* Rewatch button stays white when selected */
.segmented-control-button#edit-rewatch-yes.selected {
    color: #ffffff;
}

.edit-modal-buttons {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    border: 1px solid;
}

.edit-save {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.edit-save:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.edit-button:active {
    transform: scale(0.98);
}

@media (max-width: 480px) {
    .edit-modal-content .modal-header {
        padding: 1.25rem 1.5rem 0.875rem;
    }
    
    .edit-modal-body {
        padding: 1.25rem 1.5rem;
    }
    
    .edit-modal-buttons {
        padding: 1.25rem 1.5rem;
    }
    
    .edit-close-external {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }
    
    .rating-display-input {
        font-size: 2.5rem;
        min-width: 100px;
    }
    
    .segmented-control-button {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .my-films-container {
        padding: 1.5rem 1rem;
        padding-top: 5rem;
        padding-bottom: 8rem;
    }

    .page-title {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }


    .film-tile {
        padding: 0.875rem 1rem;
    }

    .film-title {
        font-size: 1rem;
    }

    .film-date {
        font-size: 0.875rem;
    }

    .modal-content {
        width: 95%;
        max-height: 70vh;
    }
    
    .film-close-external {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }
    
    #modal-film-content {
        padding: 1.5rem;
    }
    
    .modal-main-wrapper {
        gap: 1rem;
    }
    
    .modal-poster-container {
        width: 100px;
    }
    
    .modal-poster-container:empty {
        display: none;
    }

    .modal-film-title {
        font-size: 1.5rem;
        padding-right: 2.5rem;
    }

    .pagination-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination-button {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }
}

@media (min-width: 768px) {
    .page-title {
        font-size: 4rem;
        margin-bottom: 3rem;
    }

    .films-list {
        gap: 1rem;
    }

    .film-tile {
        padding: 1.25rem 1.5rem;
    }
}


