/* Fișier: app/static/css/style.css */

body {
    font-family: "Montserrat", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #f0f0f0;
}

/* ======================================================= */
/* NAVIGARE */
/* ======================================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1f1f1f;
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    position: relative; /* Important pentru z-index */
    z-index: 1000;
}

.navbar-logo-img {
    height: 40px; 
    width: auto;  
    object-fit: contain;
    margin-right: 15px; /* Spațiu între logo și text */
}

.logo {
    display: flex;
    align-items: center;
    font-family: 'Bebas Neue', sans-serif; 
    font-size: 1.8em; 
    letter-spacing: 1px;
    font-weight: bold;
    color: #DC3551; 
    text-decoration: none;
    flex: 1;
}

/* Containerul de link-uri din navbar (dreapta) */
.nav-links {
    display: flex; 
    align-items: center;
    gap: 10px; /* Spațiu între elemente */
}

/* Stilul general pentru link-uri simple (Login/Register) */
.nav-links a:not(.nav-btn):not(.dropdown-item) {
    color: #f0f0f0;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}
.nav-links a:not(.nav-btn):not(.dropdown-item):hover {
    background-color: #333;
}

/* ======================================================= */
/* BARA DE CĂUTARE MODERNĂ & AUTOCOMPLETE */
/* ======================================================= */

/* Containerul principal pentru poziționare */
.search-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    margin-right: 20px; /* Spațiu față de butoanele din dreapta */
    z-index: 1001; /* Peste meniu */
}

/* Capsula de căutare (Formularul) */
.search-box {
    display: flex;
    align-items: center;
    background-color: #2a2a2a; /* Fundal gri închis */
    border: 1px solid #444;    /* Bordură subtilă */
    border-radius: 50px;       /* Formă rotundă */
    padding: 5px 15px;         /* Spațiu interior */
    width: 500px;              /* Lățime fixă */
    transition: all 0.3s ease;
}

/* Efect când utilizatorul scrie (Focus) */
.search-box:focus-within {
    border-color: #DC3551; /* Se face ROȘU la activare */
    box-shadow: 0 0 10px rgba(220, 53, 81, 0.3); /* Strălucire roșie */
    background-color: #333;
}

/* Câmpul de text */
.search-input {
    background: transparent;
    border: none;
    color: #f0f0f0;
    width: 100%;
    outline: none; /* Scoate conturul default albastru */
    font-size: 0.95em;
    font-family: 'Montserrat', sans-serif;
}

/* Placeholder-ul (textul "Caută filme...") */
.search-input::placeholder {
    color: #888;
}

/* Butonul cu Lupă */
.search-btn {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 0 0 0 10px; /* Spațiu mic la stânga */
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.search-btn:hover {
    color: #DC3551; /* Lupa se face roșie la hover */
    transform: scale(1.1); /* Mic efect de mărire */
}

/* LISTA DE REZULTATE (Sugestii) */
.autocomplete-results {
    position: absolute;
    top: 115%; /* Imediat sub bara de căutare */
    left: 0;
    width: 100%; /* Aceeași lățime ca bara */
    background-color: #1f1f1f;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    z-index: 9999; /* Să fie peste tot */
    display: none; /* Ascuns implicit */
    max-height: 300px;
    overflow-y: auto;
}

/* Stiluri pentru lista din interior */
.autocomplete-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.autocomplete-results li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #ccc;
    border-bottom: 1px solid #333;
    transition: background-color 0.2s;
}

.autocomplete-results li a:hover {
    background-color: #DC3551;
    color: white;
}

/* ======================================================= */
/* BUTOANE NAVBAR (Catalog & Watchlist) */
/* ======================================================= */

/* Stilul comun de bază */
.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px; 
    padding: 6px 16px;
    margin-right: 10px;
    background-color: transparent; 
    border: 1px solid #666;        
    color: #ccc;                   
    border-radius: 50px;           
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95em;
    transition: all 0.3s ease;     
}

/* Butonul CATALOG (ROȘU la hover) */
.nav-btn.btn-catalog:hover {
    background-color: #DC3551; 
    border-color: #DC3551;
    color: #f7cdd0; 
    box-shadow: 0 0 10px rgba(220, 53, 81, 0.4);
    transform: translateY(-2px);
}

/* Butonul WATCHLIST (GALBEN la hover) */
.nav-btn.btn-watchlist:hover {
    background-color: #DC3551; 
    border-color: #DC3551;
    color: #f7cdd0; 
    box-shadow: 0 0 10px rgba(220, 53, 81, 0.4);
    transform: translateY(-2px);
}

.nav-btn.btn-login:hover {
    background-color: #DC3551; 
    border-color: #DC3551;
    color: #f7cdd0; 
    box-shadow: 0 0 10px rgba(220, 53, 81, 0.4);
    transform: translateY(-2px);
}

.nav-btn.btn-register:hover {
    background-color: #DC3551; 
    border-color: #DC3551;
    color: #f7cdd0; 
    box-shadow: 0 0 10px rgba(220, 53, 81, 0.4);
    transform: translateY(-2px);
}

/* DROPDOWN PROFIL */
.user-dropdown {
    position: relative; 
}

.dropdown-toggle {
    display: flex;
    align-items: center; 
    justify-content: center;
    gap: 8px; 
    background-color: transparent; 
    border: 1px solid #666;    
    color: #ccc;
    cursor: pointer;
    padding: 6px 16px; 
    border-radius: 50px; 
    font-size: 0.95em;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* Profil (ALBASTRU la hover) */
.dropdown-toggle:hover {
    background-color: #DC3551; /* Sau #007bff pt albastru */
    border-color: #DC3551;
    color: #f7cdd0;
    box-shadow: 0 0 10px rgba(220, 53, 81, 0.4);
    transform: translateY(-2px);
}

.profile-icon {
    font-size: 1.3em;
    color: inherit;
}

.arrow-icon {
    font-size: 0.8em;
    color: #999;
    margin-left: 5px;
}

/* Meniul Dropdown */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 120%; /* Puțin mai jos */
    right: 0;
    min-width: 220px;
    background-color: #1f1f1f; 
    border: 1px solid #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    padding: 10px 0;
    border-radius: 8px;
}
.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    color: #ccc;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 0.95em;
}
.dropdown-item:hover {
    background-color: #333;
    color: white;
}
.dropdown-divider {
    height: 1px;
    margin: 5px 0;
    background-color: #444;
}

/* ======================================================= */
/* STILURI GENERALE & UTILITIES */
/* ======================================================= */
.container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    font-family: 'Bebas Neue', sans-serif; 
    font-size: 4.5rem; 
    color: #DC3551; 
    margin-top: 20px;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border-bottom: none; /* Scoate linia default */
    text-align: center;
}

h2, h3 {
    color: #f0f0f0;
    padding-bottom: 5px;
}

/* Mesaje Flash */
.alert {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-weight: bold;
}
.alert-success { background-color: #4CAF50; color: white; }
.alert-danger { background-color: #f44336; color: white; }
.alert-warning { background-color: #ff9800; color: #333; }
.alert-info { background-color: #2196F3; color: white; }

/* Butoane Standard */
.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-right: 10px;
    transition: all 0.3s ease; 
}
.btn-primary { background-color: #f7cdd0; color: #1a1a1a; }
.btn-secondary { background-color: #555; color: white; }
.btn-success { background-color: #f7cdd0; color: #1a1a1a; }

.btn:hover {
    background-color: #DC3551; 
    border-color: #DC3551;
    color: #f7cdd0; 
    box-shadow: 0 0 10px rgba(220, 53, 81, 0.4);
    transform: translateY(-2px);
}

/* ======================================================= */
/* GRID CATALOG (Carduri Verticale) */
/* ======================================================= */
.movie-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.movie-card {
    background-color: #1f1f1f;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    transition: transform 0.2s;
    height: 100%;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.8);
}

.movie-poster-wrapper {
    width: 100%;
    height: 350px;
    background-color: #000;
    overflow: hidden;
    display: block;
}

.card-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}
.card-poster:hover { opacity: 0.9; }

.card-poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #333;
    color: #555;
    font-size: 3em;
}

.movie-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.movie-card h3 {
    font-size: 1.1em;
    margin-top: 0;
    margin-bottom: 10px;
    border: none;
    line-height: 1.3;
}

.year-badge {
    font-size: 0.8em;
    color: #999;
    font-weight: normal;
}

.genres-row { margin-bottom: 10px; }

.description {
    font-size: 0.9em;
    color: #ccc;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* ======================================================= */
/* HOMEPAGE (CARUSEL & TITLU) */
/* ======================================================= */

/* 1. Titlul PARALLAX Centrat */
.parallax-title {
    font-family: 'Bebas Neue', sans-serif; 
    font-size: 10rem; 
    font-weight: 400; 
    letter-spacing: 5px;
    color: #DC3551;
    text-transform: uppercase;
    text-shadow: 0 5px 15px rgba(0,0,0,0.8);

    margin-bottom: 10px;
    border-bottom: none; 
    display: inline-block; 
    padding: 20px 40px; 
    background-color: #1a1a1a; 
    border-radius: 10px; 
    border: 1px solid #333; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.5); 

    margin-bottom: 30px; 
    text-align: center;
}

/* 2. Containerul Caruselului */
.carousel-container {
    position: relative; 
    padding: 0 50px; 
}

/* 3. Scroll Container (Scrollbar ascuns) */
.horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 20px 0;
    scroll-behavior: smooth;
    
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE/Edge */
}
.horizontal-scroll-container::-webkit-scrollbar { display: none; } /* Chrome/Safari */

/* 4. Carduri Orizontale */
.movie-card-horizontal {
    flex: 0 0 auto;
    width: 200px;
    transition: transform 0.3s ease;
    background-color: #1f1f1f;
    border-radius: 8px;
    overflow: hidden;
}

.movie-card-horizontal:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 8px 16px rgba(0,0,0,0.7);
}

.horizontal-poster-wrapper {
    display: block;
    width: 100%;
    height: 300px;
    background-color: #000;
}
.horizontal-poster-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.horizontal-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333;
    color: #555;
    font-size: 2em;
}

.horizontal-card-body {
    padding: 10px;
    text-align: center; /* Text centrat */
}

.horizontal-card-body h6 {
    margin: 5px 0;
    font-size: 1em;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

/* 1. Pentru Caruselul de pe Homepage (Orizontal) */
.horizontal-card-body h6 a {
    color: #f7cdd0 !important; /* Alb (text normal) */
    text-decoration: none;     /* Fără subliniere */
    transition: color 0.2s ease;
}

.horizontal-card-body h6 a:hover {
    color: #DC3551 !important; /* Roșu la hover */
    text-decoration: none;
}

/* 2. Pentru Catalog (Grid-ul vertical) */
.movie-card-content h3 a {
    color: #f7cdd0 !important; /* Alb */
    text-decoration: none;
    transition: color 0.2s ease;
    align-items: center;
    text-align: center;
}

.movie-card-content h3 a:hover {
    color: #DC3551 !important; /* Roșu la hover */
}

/* 5. Butoanele Săgeți */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 20;
    transition: background-color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-btn:hover {
    color: black;
    background-color: #f7cdd0;
    transform: translateY(-50%) scale(1.1);
}
.btn-left { left: 0; }
.btn-right { right: 0; }

/* ======================================================= */
/* BUTON HOMEPAGE CENTRAT (Explorează Catalog) */
/* ======================================================= */

.centered-action-container {
    display: flex !important;
    justify-content: center !important; 
    align-items: center !important;
    width: 100% !important;
    margin-top: 40px;
    margin-bottom: 60px;
    padding-top: 20px;
}

.home-explore-btn {
    background-color: #DC3551 !important; 
    border: none !important;
    font-size: 1.5rem !important;
    padding: 15px 50px !important;
    border-radius: 50px !important;
    color: #f7cdd0 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

.home-explore-btn:hover {
    transform: scale(1.1) !important; 
    background-color: #DC3551 !important; 
    box-shadow: 0 15px 30px rgba(220, 53, 81, 0.5) !important; 
}


/* ======================================================= */
/* DETALII FILM (Butoane Acțiune) */
/* ======================================================= */
.user-actions-panel { width: 100%; }
.w-100 { width: 100% !important; }

/* Asigură că butoanele sunt centrate în div-ul lor părinte */
.settings-page .form-group.text-center {
    text-align: center;
}

/* Stil pentru butoanele de acțiune mici */
.btn-settings {
    /* Mărimi */
    width: 200px; /* Lățime fixă mai mică */
    padding: 10px 15px;
    font-size: 1em;
    font-weight: bold;
    
    /* Culori și aspect */
    background-color: #f7cdd0; /* Roșu de accent */
    color: #1a1a1a;
    border: none;
    border-radius: 8px; 
    
    /* Centrare (asigură că funcționează dacă părintele nu e text-center) */
    display: block; 
    margin: 15px auto 10px auto;
    margin-bottom: 100px;
    
    /* Efect Hover/Focus */
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.btn-settings:hover {
    background-color: #DC3551; 
    border-color: #DC3551;
    color: #f7cdd0; 
    box-shadow: 0 0 10px rgba(220, 53, 81, 0.4);
    transform: translateY(-2px);
}

/* Buton Watchlist */
.btn-warning {
    background-color: #DC3551; 
    border-color: #DC3551;
    color: #1a1a1a;
    font-weight: bold;
    border-radius: 8px;
}
.btn-warning:hover {
    background-color: #DC3551; 
    border-color: #DC3551;
    color: #1a1a1a;
}
.btn-warning-checked {
    background-color: #DC3551; 
    border-color: #DC3551;
    color: #1a1a1a;
}
.btn-warning-checked:hover { background-color: #DC3551; }
/* Buton Văzut */
.btn-info {
    background-color: #333; 
    color: #7ab8ff; 
    border: 1px solid #7ab8ff;
    font-weight: bold;
    border-radius: 8px;
}
.btn-info:hover { background-color: #444; }

.btn-outline-secondary {
    border: 1px solid #999;
    color: #ccc;
    background-color: transparent;
    border-radius: 8px;
    text-align: center;
}
.btn-outline-secondary:hover { background-color: #333; color: white; }

#ratingSection {
    background-color: #2a2a2a;
    border: 1px solid #444 !important;
}

/* FILTRE (Catalog) */
.filter-heading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 30px 0; 
}

.filter-heading {
    font-size: 1.5rem;          
    font-weight: 700px;         
    color: #f7cdd0;           
    padding: 0 20px;          
    text-transform: none;     
    margin: 0;                
    white-space: nowrap;
    text-decoration: none !important;
    border-bottom: none !important;
}

.filter-heading-container::before,
.filter-heading-container::after {
    content: "";
    flex-grow: 1;             
    height: 1px;              
    background-color: #f7cdd0;   
    opacity: 0.5;             
}

.genre-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.btn-tag {
    cursor: pointer;
    border: 1px solid #555;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    transition: background-color 0.2s, color 0.2s;
}
.btn-tag-default { background-color: #333; color: #ccc; }
.btn-tag-default:hover { background-color: #555; }
.btn-tag-selected {
    background-color: #DC3551;
    color: #1a1a1a;
    border-color: #DC3551;
    font-weight: bold;
}
.btn-clear-filter {
    color: #999;
    text-decoration: underline;
    border: none;
}
.form-control, .form-select {
    background-color: #333;
    color: white;
    border: 1px solid #555;
}

/* Auth Forms */
.form-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 25px;
    background-color: #1f1f1f;
    border-radius: 8px;
    text-align: center;
    color: #f7cdd0
}
.form-group { margin-bottom: 20px; color: #f7cdd0;}
.form-group label { display: block; margin-bottom: 7px; font-weight: bold; }
.form-group input:not([type="submit"]):not([type="reset"]):not([type="button"]) {
    margin-top: 10px;
    margin-bottom: 10px;
    width: 100%;
    height: 50px;
    padding: 10px;
    background-color: #2a2a2a;
    border: 1px solid #DC3551;
    color: #f0f0f0;
    border-radius: 4px;
    box-sizing: border-box;
}
.checkbox-group {
    margin-top: 10px;
    display: flex;
    align-items: center;
    text-align: center;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-full-width { width: 100%; margin-top: 10px; padding: 12px; font-size: 1.1em; }
.auth-footer { margin-top: 20px; padding-top: 15px; border-top: 1px solid #333; }
.auth-footer a { color: #DC3551; }

/* --- Titlu Centrat între Linii (Homepage) --- */
.recommendation-heading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 30px 0; 
}

.recommendation-heading {
    font-size: 2rem;          
    font-weight: 700;         
    color: #f7cdd0;           
    padding: 0 20px;          
    text-transform: none;     
    margin: 0;                
    white-space: nowrap;
    text-decoration: none !important;
    border-bottom: none !important;   
}

.recommendation-heading-container::before,
.recommendation-heading-container::after {
    content: "";
    flex-grow: 1;             
    height: 1px;              
    background-color: #f7cdd0;   
    opacity: 0.5;             
}

/* Genuri (Butoane) */
.genre-tags-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.btn-clear-accent {
    /* Stil implicit: Chenar roșu, fundal transparent */
    background-color: transparent !important;
    border: 1px solid #DC3551 !important;
    color: #DC3551 !important;
    font-weight: bold;
    text-decoration: none;
    padding: 6px 12px;
    transition: all 0.2s ease;
}

.btn-clear-accent:hover {
    /* Stil la hover: Fundal roșu complet */
    background-color: #DC3551 !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(220, 53, 81, 0.4);
    transform: translateY(-1px); /* Mic efect de ridicare */
}

.btn-tag {
    background-color: #1f1f1f; 
    color: #ccc;
    border: 1px solid #333;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-tag:hover {
    background-color: #DC3551;
    color: white;
    border-color: #DC3551;
    transform: translateY(-2px);
}

.btn-tag-selected {
    background-color: #DC3551;
    border-color: #DC3551;
    color: white;
    box-shadow: 0 0 10px rgba(220, 53, 81, 0.4);
}

/* Zona Controalelor (Year & Sort) */
.controls-wrapper {
    background-color: #1a1a1a; 
    padding: 15px 30px;
    border-radius: 15px;
    border: 1px solid #2a2a2a;
    width: 100%;
    max-width: 900px;
    display: flex; /* CRITIC */
    justify-content: space-between; /* CRITIC: Împinge la capete */
    align-items: center;
    font-weight: bold;
}

/* Butonul Apply */
.btn-apply {
    background-color: #DC3551;
    border: none;
    font-weight: bold;
}
.btn-apply:hover {
    background-color: #b02a40;
}

/* Stiluri pentru input-uri și select-uri */
.dark-input {
    background-color: #1f1f1f;
    border: 1px solid #333;
    color: white;
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: bold;
}


/* Catalog Pagination */

.custom-pagination {
    list-style: none; 
    padding-left: 0;
    margin-bottom: 0;
    text-align: center;
}

.custom-pagination .page-item {
    margin: 0 4px; 
    display: inline-block; 
}



.custom-pagination .page-link {
    background-color: #1a1a1a; 
    border: 1px solid #333; 
    color: #f0f0f0; 
    border-radius: 8px; 
    transition: all 0.2s ease;
    padding: 8px 15px;
    display: block;
    /* Scoate orice decorație implicită */
    text-decoration: none; 
}

.custom-pagination .page-link:hover {
    background-color: #333;
    border-color: #DC3551;
    color: white;
}

/* Stil pentru pagina activă (Roșu) */
.custom-pagination .page-item.active .page-link {
    background-color: #DC3551; 
    border-color: #DC3551;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(220, 53, 81, 0.4);
}

/* Stil pentru butonul dezactivat (Previous/Next) */
.custom-pagination .page-item.disabled .page-link {
    background-color: #222;
    border-color: #333;
    color: #666;
    cursor: not-allowed;
}

/* Ajustare margine stânga/dreapta pentru a arăta ca un bloc */
.custom-pagination .page-item:first-child .page-link {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}
.custom-pagination .page-item:last-child .page-link {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Aplică stilul Butonului Principal pentru Previous/Next */
.custom-pagination .page-item:first-child .page-link,
.custom-pagination .page-item:last-child .page-link {
    background-color: #2a2a2a; /* Ceva mai deschis pentru butoanele mari */
    border-color: #444;
}

.custom-pagination .page-item:first-child .page-link:hover,
.custom-pagination .page-item:last-child .page-link:hover {
    background-color: #DC3551;
    border-color: #DC3551;
    color: white;
}

.custom-pagination .page-item.disabled .page-link {
    /* Stilurile de bază pentru disabled (din răspunsul anterior) */
    background-color: #222;
    border-color: #333;
    color: #666;
    cursor: not-allowed;
    
    /* CRITIC: Anulează efectele de hover */
    pointer-events: none; /* Previne orice interacțiune cu mouse-ul */
    text-decoration: none;
}

/* Asigură-te că nu există nicio schimbare de culoare la hover pentru elementele .disabled */
.custom-pagination .page-item.disabled .page-link:hover,
.custom-pagination .page-item.disabled .page-link:focus {
    background-color: #222; /* Fundalul rămâne la culoarea dezactivată */
    border-color: #333;
    color: #666;
}

/* 1. Stilul de bază al butonului */
.btn-details-3d {
    /* Setări de bază */
    padding: 12px 15px;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    display: block; 
    text-align: center;

    /* Colțuri rotunjite (CERC) */
    border-radius: 50px !important;
    
    /* Culori și fundal */
    background-color: #333333; 
    color: #f0f0f0;
    border: none;
}

.btn-details-3d:hover {
    background-color: #DC3551; 
    color: white;
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.5),     
        -2px -2px 4px rgba(64, 64, 64, 0.4); 
    transform: scale(0.98); 
}

/* 3. Ajustări pentru a centra butonul în card */
/* Vom folosi o margine orizontală automată pentru a-l centra */
.movie-card-content {
    padding: 15px;
    
    display: flex; /* Activează Flexbox */
    flex-direction: column; 
    
    align-items: center; /* CRITIC: Centrează toate elementele pe orizontală (inclusiv butonul) */
    text-align: center; /* Centrează textul în interiorul elementelor */
    
    flex-grow: 1;
}

/* Stil pentru Titlu (Asigură că se aliniază la centru) */
.movie-card h3 {
    text-align: center; /* Asigură că titlul în sine este centrat */
    /* ... (alte stiluri H3 rămân la fel) ... */
    flex-direction: column;
    height: 100%;
}

/* Stil pentru rândul de Genuri (Pentru a le centra ca bloc) */
.genres-row { 
    margin-bottom: 10px; 
    display: flex;
    justify-content: center; /* Centrează tag-urile de genuri */
    flex-wrap: wrap; 
}

/* Stil pentru Descriere */
.description {
    text-align: center;
    /* ... (alte stiluri description rămân la fel) ... */
}

.movie-card .btn-details-3d {
    margin-top: 15px;
    margin-bottom: 5px; 
    
    /* Setăm o lățime vizuală (poți ajusta asta) */
    width: 70%; 
    
    /* Deoarece părintele are align-items: center, margin: auto nu mai este necesar.
       Dar îl lăsăm pentru a preveni alte conflicte. */
    margin-left: auto;
    margin-right: auto;
    
    display: block; 
    border-radius: 50px !important;
    
    /* Reaplică umbrele 3D */
    box-shadow: 
        6px 6px 12px rgba(0, 0, 0, 0.5);
}

/* ======================================================= */
/* STILURI PAGINĂ PROFIL (Profile/user_profile.html) */
/* ======================================================= */

/* Titlu Principal (Ex: "PROFILUL UTILIZATORULUI: ALE14") */
.profile-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    color: #DC3551;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 30px;
    letter-spacing: 2px;
    padding-bottom: 10px;
    text-transform: uppercase;
}

/* Sub-titluri (Ex: "Codul QR al Profilului", "Liste Mele") */

.profile-section-heading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 30px 0; 
}

.profile-section-heading {
    font-size: 2rem;          
    font-weight: 700;         
    color: #f7cdd0;           
    padding: 0 20px;          
    text-transform: none;     
    margin: 0;                
    white-space: nowrap;
    text-decoration: none !important;
    border-bottom: none !important;   
}

.profile-section-heading-container::before,
.profile-section-heading-container::after {
    content: "";
    flex-grow: 1;             
    height: 1px;              
    background-color: #f7cdd0;   
    opacity: 0.5;             
}

/* Informații generale (Email) */
.profile-info {
    font-size: 3rem;
    font-weight: 700; 
    color: #f7cdd0;
    margin-bottom: 20px;
    text-align: center;
}
.profile-info span {
    font-weight: bold;
    color: #f0f0f0;
}

/* Container pentru QR Code */
.qr-container {
    padding: 20px;
    background-color: #1f1f1f;
    border: 1px solid #333;
    border-radius: 8px;
    /* STILURI CRITICE PENTRU CENTRARE: */
    display: block; /* 1. Asigură-te că este un element de tip bloc */
    width: fit-content; /* 2. Asigură că lățimea se ajustează la conținut (la QR code) */
    margin-left: auto; /* 3. Centrează pe orizontală */
    margin-right: auto;
    /* Sfârșitul stilurilor de centrare */
    
    margin-top: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.export-buttons-container {
    display: flex !important;
    justify-content: center !important; /* Asigură că spațiul dintre ele este gestionat */
    margin: 20px 0 !important; 
    padding: 0 !important;
    
    /* Păstrează spațiul dintre butoane */
    gap: 15px; 
    
    /* Asigură că nu plutesc și nu sunt influențate de alinierea textului */
    float: none !important;
}

/* Stil pentru Butoanele de Export (Ex: "Descarcă Lista Văzute (CSV)") */
.btn-export {
    /* Mărimi */
    font-weight: bold;
    
    /* Culori și aspect */
    background-color: #f7cdd0; /* Roșu de accent */
    color: #1a1a1a;
    border: none;
    border-radius: 8px; 
    float: none !important;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);

    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
    margin-right: 0 !important;
    margin-left: 0 !important;
    display: inline-block;
    align-items: center;
}

.btn-export:hover {
    background-color: #DC3551; 
    border-color: #DC3551;
    color: #f7cdd0; 
    box-shadow: 0 0 10px rgba(220, 53, 81, 0.4);
    transform: translateY(-2px);
}

/* Stil pentru listele Văzute / De Văzut (Dacă sunt afișate ca liste simple) */
.user-lists-item {
    padding: 10px 0;
    color: white;
    font-size: 1em;
}
.user-lists-item:last-child {
    border-bottom: none;
}
.user-lists-item span {
    color: white;
    font-weight: bold;
}

.user-list-items li a {
    /* Culoarea implicită (Albastru standard pentru link, dar închis) */
    color: #f7cdd0 !important; /* Albastru-Violet deschis (pentru contrast) */
    text-decoration: none;
    transition: color 0.2s ease;
}

.user-list-items li a:hover {
    /* Culoarea la hover (Roșu de accent) */
    color: #DC3551 !important; 
    text-decoration: underline; /* Adaugă subliniere la hover */
}

/* ======================================================= */
/* FIX CENTRARE BUTOANE WATCHLIST (Elimină) */
/* ======================================================= */

/* Asigură că formularul este centrat în card */
.movie-card-content .form-center {
    /* CRITIC: Împinge elementul la fundul containerului Flex (movie-card-content) */
    margin-top: auto !important; 
    
    /* Păstrează centrarea orizontală: */
    display: flex;
    justify-content: center; 
    width: 100%; 
    padding-top: 15px; /* Adaugă spațiu deasupra butonului */
}

/* Ajustează marginile elementelor anterioare (data) */
.movie-card-content p.mt-auto {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    /* Dă-i un flex-grow de 0 ca să nu consume spațiu */
    flex-grow: 0; 
}

/* Reajustarea butonului (Aplicăm stilul 3D) */
.movie-card-content .btn-details-3d {
    /* Păstrează stilul 3D/rotund existent */
    width: 100px !important; /* Facem butonul mai mic */
    padding: 8px 15px; /* Ajustăm paddingul pentru mărimea 'sm' */
    font-size: 0.9em;
    margin: 0 !important; /* Elimină marginile auto din stilul de catalog */
    display: block;
    
    /* Putem adăuga o culoare distinctivă, de exemplu, gri închis/roșu pentru eliminare */
    background-color: #f7cdd0;
    color: #1a1a1a;
    border: 1px solid #f7cdd0; 
}

.movie-card-content .btn-details-3d:hover {
    background-color: #DC3551; 
    border-color: #DC3551;
    color: #f7cdd0; 
    box-shadow: 0 0 10px rgba(220, 53, 81, 0.4);
    transform: translateY(-2px);
}

.watched-badge-container {
    /* Asigură-te că nu există padding suplimentar */
    padding: 5px 0; 
    
    /* Împinge elementul la fundul conținutului (dacă e necesar) */
    margin-top: auto; 
    
    /* Fix pentru centrare (dacă align-items: center din movie-card-content nu funcționează) */
    display: flex !important;
    justify-content: center !important;
}

/* Stil pentru badge-ul în sine (pentru a arăta bine) */
.badge.btn-info {
    font-size: 0.9em;
    padding: 6px 12px;
    border-radius: 20px; /* Stilul tău de pill */
}

/* Aplicăm stilul 3D/rotund pe badge-ul "Watched" */
.movie-card-content .badge.btn-info {
    /* Preluăm stilurile de bază de la btn-details-3d, dar ajustate pentru un badge */
    padding: 8px 15px !important;
    font-size: 0.9em;
    font-weight: bold;
    text-transform: uppercase;
    
    /* Colțuri rotunjite (CERC) */
    border-radius: 50px !important;
    
    /* Culori și fundal (Similar cu butonul, dar o culoare distinctivă) */
    background-color: #f7cdd0 !important; /* Gri închis */
    color: #1a1a1a !important;
    border: none;
    
    /* Efectul 3D (Umbrele de relief) */
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.5);

    /* Asigură centrarea în div-ul părinte */
    margin-left: auto;
    margin-right: auto;
    display: inline-block;
}

/* CRITIC: Eliminăm complet efectul de HOVER */
.movie-card-content .badge.btn-info:hover {
    /* Anulează orice schimbare de fundal/culoare la hover */
    background-color: #f7cdd0 !important; 
    color: #1a1a1a !important;
    
    /* Anulează efectul de transformare/apasare */
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.5);
    transform: none; /* Nu se mișcă */
    cursor: default; /* Nu arată cursorul de link/pointer */
}

/* Stil 3D/Rotund Static pentru Badge-ul de Rating */
.movie-card-content .badge-rating-3d {
    /* Preluăm stilurile de bază de la watched, dar schimbăm culoarea de fundal */
    padding: 8px 15px !important;
    font-size: 0.9em;
    font-weight: bold;
    text-transform: uppercase;
    
    border-radius: 50px !important;
    
    /* Culoarea fundalului: Galben/Auriu pentru Rating */
    background-color: #f7cdd0 !important; 
    color: #1a1a1a !important; /* Galben auriu pentru text */
    border: none;
    
    /* Efectul 3D */
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.5); 
    
    /* Asigură că rămâne static (fără hover) */
    transform: none; 
    cursor: default;
    
    /* Centrare în div-ul părinte */
    margin-left: auto;
    margin-right: auto;
    display: inline-block;
}

/* Eliminăm orice efect de hover (deși nu ar trebui să existe pe span) */
.movie-card-content .badge-rating-3d:hover {
    background-color: #f7cdd0 !important; 
    color: #1a1a1a !important;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5); 
}


/* FLEXBOX: Împinge rating-ul și data la fund */
.movie-card-content {
    /* (Stil existent) */
    display: flex;
    flex-direction: column; 
    align-items: center; /* Centrează orizontal toate elementele */
    text-align: center;
    flex-grow: 1;
}

/* Împinge Data (p.rating-date) la fundul conținutului */
.movie-card-content p.rating-date {
    margin-top: auto !important; /* CRITIC: Împinge data în jos */
    margin-bottom: 5px !important; /* Spațiu sub data */
    padding-top: 15px; /* Spațiu de la celelalte elemente */
}

/* Centrare pentru containerul badge-ului */
.rating-badge-container {
    display: flex;
    justify-content: center; /* Centrează orizontal */
    width: 100%;
    margin-bottom: 15px; /* Spațiu sub badge */
    padding-bottom: 5px; 
}