/* 🎬 Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Roboto", Arial, sans-serif;
    background-color: #141414;
    color: #f5f5f5;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scroll personalizado */
::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a1a;
}
::-webkit-scrollbar-thumb {
    background: #e50914;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #f40612;
}

/* 🎬 Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(to right, #000, #111);
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.6s ease;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
    color: #e50914;
    letter-spacing: 2px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo h1:hover {
    transform: scale(1.1);
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: #e50914;
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: #fff;
}
nav ul li a:hover::after {
    width: 100%;
}

#auth-buttons button,
button {
    padding: 0.5rem 1.2rem;
    background: #e50914;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

#auth-buttons button:hover,
button:hover {
    background: #f40612;
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(229, 9, 20, 0.6);
}

#auth-buttons button:active,
button:active {
    transform: scale(0.95);
}

/* 🎬 Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(to bottom, #1a1a1a, #111);
    animation: fadeIn 1s ease;
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
    color: #fff;
    animation: textPop 0.7s ease;
}

.hero p {
    font-size: 1.2rem;
    color: #bbb;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes textPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 🎬 Grid de películas */
/* 🎬 Grid de películas con scroll horizontal */
.content-grid {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}

.content-grid::-webkit-scrollbar {
    height: 10px;
}
.content-grid::-webkit-scrollbar-track {
    background: #111;
}
.content-grid::-webkit-scrollbar-thumb {
    background: none;
    border-radius: 6px;
}
.content-grid::-webkit-scrollbar-thumb:hover {
    background: none;
}

.movie-card {
    flex: 0 0 auto; 
    width: 200px;
    background-color: #222;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    position: relative;
    
    overflow: hidden;
    scroll-snap-align: start; 
}

.movie-card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.movie-card h3 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    color: #fff;
}

.movie-card .rating {
    color: #ffd700;
    font-size: 0.95rem;
    font-weight: bold;
}

.movie-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.6);
    cursor: pointer;
}

.movie-card:hover img {
    transform: scale(1.1);
}

/* 🎬 Formularios */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 420px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: #1a1a1a;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.5);
    animation: fadeIn 0.8s ease;
}

form input,
form select,
form textarea {
    padding: 0.7rem;
    font-size: 1rem;
    border: 1px solid #333;
    border-radius: 6px;
    background-color: #222;
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

form input:focus,
form select:focus,
form textarea:focus {
    border: 1px solid #e50914;
    box-shadow: 0 0 8px rgba(229, 9, 20, 0.6);
}

/* 🎬 Alertas */
.alert {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 1.5rem;
    border-radius: 6px;
    z-index: 1000;
    font-weight: bold;
    animation: fadeSlide 0.5s ease;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 🎬 Página de detalles */
.movie-details {
    padding: 2rem;
    background-color: #1a1a1a;
    border-radius: 10px;
    margin: 2rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    box-shadow: 0 3px 15px rgba(0,0,0,0.6);
    animation: fadeIn 1s ease;
}

.movie-details img {
    max-width: 280px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}
.movie-details img:hover {
    transform: scale(1.05);
}

/* 🎬 Reviews */
.reviews-section {
    padding: 2rem;
}

.review-card {
    background-color: #222;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.review-card:hover {
    transform: scale(1.02);
}

.comments-section {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #333;
}

/* 🎬 Secciones y búsqueda */
.section {
    margin: 2rem 0;
}

.section h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: #e50914;
    position: relative;
}

.section h3::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 50px;
    height: 3px;
    background: #e50914;
    border-radius: 2px;
}

.search-bar {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 1rem auto;
}

#search-input {
    flex: 1;
    padding: 0.7rem;
    font-size: 1rem;
    border: 1px solid #333;
    border-radius: 6px;
    background-color: #222;
    color: #fff;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

#search-input:focus {
    border: 1px solid #e50914;
    box-shadow: 0 0 8px rgba(229, 9, 20, 0.6);
}

#search-btn {
    padding: 0.7rem 1.2rem;
    background-color: #e50914;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.3s ease, transform 0.2s ease;
}

#search-btn:hover {
    background-color: #f40612;
    transform: scale(1.05);
}
