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

:root {
    --netflix-font: 'Netflix Sans', -apple-system, blinkmacsystemfont, segoe ui, roboto, oxygen, ubuntu, cantarell, fira sans, droid sans, helvetica neue, sans-serif;
}

body {
    font-family: var(--netflix-font);
    background-color: #141414;
    color: #fff;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--netflix-font);
    font-weight: bold;
}

.review-section {
  background: #1a1a1a;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  margin: 1.5rem auto 0 auto;
  padding: 1.2rem 1.5rem 1.2rem 1.5rem;
  max-width: 420px;
  color: #fff;
  position: relative;
  top: -1.5rem;
  z-index: 2;
  border: 1px solid #222;
}

.movie-details-container {
  margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
  .review-section {
    max-width: 98vw;
    padding: 0.8rem 0.5rem;
  }
}

.review-section h2, .review-section h3 {
  margin-top: 0;
  color: #ff3c3c;
}
.star-rating {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.star-rating .star {
  cursor: pointer;
  color: #444;
  transition: color 0.2s;
}
.star-rating .star.selected,
.star-rating .star:hover,
.star-rating .star.selected ~ .star {
  color: #ffb400;
}
#reviewText {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #333;
  background: #222;
  color: #fff;
  padding: 0.75rem;
  margin-bottom: 1rem;
  resize: vertical;
  font-size: 1rem;
}
#submitReviewBtn {
  background: #ff3c3c;
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 24px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 1rem;
}
#submitReviewBtn:hover {
  background: #e32b2b;
}
#reviewMessage {
  color: #ffb400;
  margin-bottom: 1rem;
  min-height: 1.2em;
}
#reviewsContainer {
  margin-top: 1.5rem;
}
.review {
  background: #212121;
  border-radius: 14px;
  padding: 1.25rem 1.3rem 1.15rem 1.3rem;
  margin-bottom: 1.7rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.16);
  border-left: 5px solid #ffb400;
  display: flex;
  flex-direction: column;
  font-size: 1.09rem;
  cursor: pointer;
  transition: box-shadow 0.18s, border 0.18s, transform 0.15s;
}
.review:hover {
  box-shadow: 0 6px 22px rgba(255,180,0,0.18);
  border-left: 5px solid #ff3c3c;
  transform: translateY(-3px) scale(1.025);
}
.review-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.review-user {
  font-weight: bold;
  color: #ffb400;
}
.review-stars {
  color: #ffb400;
  font-size: 1.2rem;
}
.review-date {
  color: #aaa;
  font-size: 0.9rem;
  margin-left: auto;
}
.review-body {
  color: #fff;
  font-size: 1rem;
  margin-left: 0.1rem;
}
.loading, .empty, .error {
  color: #aaa;
  text-align: center;
  margin: 1rem 0;
}

/* Header Styles */
header {
    background-color: #1a1a1a;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgb(0 0 0 / 20%);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header {
    background: linear-gradient(to bottom, #000 0%, transparent 100%);
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s ease;
}

.main-header.scrolled {
    background: #141414;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-left h1 {
    margin: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-links a {
    font-family: var(--netflix-font);
    font-weight: normal;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.nav-links a.active {
    border-bottom: 2px solid #e50914;
    color: #e50914;
}

.nav-links a:hover {
    color: #e50914;
}

.logo-link {
    color: #e50914;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo-link:hover {
    color: #ff0f1f;
}

.search-bar {
    position: relative;
    margin-right: 1rem;
}

.search-bar input {
    background: rgb(0 0 0 / 75%);
    border: 1px solid rgb(255 255 255 / 20%);
    color: white;
    padding: 0.5rem 2rem 0.5rem 1rem;
    border-radius: 4px;
    width: 240px;
    transition: width 0.3s ease;
}

.search-bar i {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.login-btn {
    padding: 0.5rem 1.5rem;
    background: #e50914;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
    margin-left: 1rem;
}

.login-btn:hover {
    background: #f40612;
}

.nav-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 260px;
}

#navbarProfileArea {
    position: relative;
    margin-left: auto;
    display: flex;
    align-items: center;
}

.profile-icon {
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    margin-left: 1rem;
    position: relative;
    z-index: 11;
    display: inline-block !important;
}

.profile-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    margin-left: 1rem;
    background: #333;
    border: 2px solid #fff;
    box-shadow: 0 0 4px 0 #000;
    display: none;
}

.profile-initials {
    margin-left: 1rem;
    background: #444;
    color: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.profile-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    background: #181818;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgb(0 0 0 / 20%);
    min-width: 180px;
    z-index: 12;
    display: none;
    transition: opacity 0.15s;
}

.profile-menu-item, .profile-dropdown a.profile-menu-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.profile-menu-item:hover, .profile-dropdown a.profile-menu-item:hover {
    background: #333;
}

.profile-upload-input {
    display: none;
}

/* Hero Banner */
.hero-banner {
    position: relative;
    width: 100vw;
    min-height: 58vh;
    max-height: 72vh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=1200&q=80') center center/cover no-repeat;
    filter: brightness(0.45) blur(0.5px);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 3.5rem 6vw 4vw;
    max-width: 700px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 0 4px 32px #000a;
}

.hero-desc {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #eee;
    text-shadow: 0 2px 8px #000a;
}

.hero-actions {
    display: flex;
    gap: 1.2rem;
}

.hero-btn {
    padding: 0.9rem 2.2rem;
    border: none;
    border-radius: 4px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    background: rgb(51 51 51 / 70%);
    color: #fff;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 12px #0005;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.hero-btn.play {
    background: #fff;
    color: #111;
}

.hero-btn.play:hover {
    background: #e50914;
    color: #fff;
}

.hero-btn.info:hover {
    background: #333;
    color: #e50914;
}

@media (width <= 700px) {
    .hero-banner {
        min-height: 38vh;
        max-height: 48vh;
    }

    .hero-content {
        padding: 2rem 1rem 2vw;
        max-width: 95vw;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-desc {
        font-size: 1rem;
    }
}

/* Content Sections */
.content-section {
    padding: 2rem 5%;
    position: relative;
    z-index: 2;
}

.section-title {
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.2px;
}

.movie-row-section {
    margin-top: 0 !important;
    margin-bottom: 2.2rem !important;
    padding-top: 0;
    padding-bottom: 0.2rem;
    background: transparent;
    box-shadow: none;
    position: relative;
}

.movie-row-section + .movie-row-section {
    margin-top: -0.8rem !important;
}

.movie-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0 2.5rem;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    position: relative;
    z-index: 2;
}

.movie-row::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.movie-card {
    flex: 0 0 200px;
    margin: 0.5rem;
    position: relative;
    transition: transform 0.18s cubic-bezier(0.4,0,0.2,1), box-shadow 0.18s cubic-bezier(0.4,0,0.2,1);
    border-radius: 0.7rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgb(0 0 0 / 14%);
    background: #181818;
}

.movie-card:hover {
    transform: scale(1.06) translateY(-6px);
    box-shadow: 0 8px 32px rgb(229 9 20 / 19%), 0 2px 8px rgb(0 0 0 / 18%);
    z-index: 3;
}

.movie-card a {
    text-decoration: none;
    color: white;
}

.movie-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.movie-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    border-radius: 0.7rem 0.7rem 0 0;
    transition: filter 0.18s;
}

.movie-card:hover img {
    filter: brightness(1.15) contrast(1.05);
}

.movie-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgb(0 0 0 / 90%) 0%, rgb(0 0 0 / 50%) 70%, transparent 100%);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-info {
    transform: translateY(0);
}

.movie-info h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.movie-rating {
    color: #ffd700;
}

.movie-rating i {
    margin-right: 0.25rem;
}

.movie-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.genre-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: rgb(255 255 255 / 10%);
    border-radius: 12px;
    white-space: nowrap;
}

.movie-slider {
    position: relative;
    width: 100%;
    min-height: 420px;
    height: 420px;
    max-height: 440px;
    background: linear-gradient(to right, #181818 80%, #e50914 120%);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 4px 32px #000a;
    z-index: 1;
}

.movie-slider .slider-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgb(20 20 20 / 85%) 60%, rgb(229 9 20 / 45%) 100%);
    z-index: 2;
    pointer-events: none;
}

.movie-slider .slider-content {
    position: relative;
    z-index: 3;
}

.movie-slider img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    filter: brightness(0.8);
}

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

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background-size: cover;
    background-position: center;
}

.slider-slide.active {
    opacity: 1;
}

.slide-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 2rem 1rem;
    background: linear-gradient(transparent, rgb(0 0 0 / 90%) 40%);
    color: white;
    z-index: 1;
}

.slide-content h2 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgb(0 0 0 / 50%);
}

.slide-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.8rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
}

.slide-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.view-more, .add-watchlist {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.view-more {
    background: #e50914;
    color: white;
}

.add-watchlist {
    background: rgb(255 255 255 / 10%);
    color: white;
    border: 1px solid rgb(255 255 255 / 30%);
}

.view-more:hover {
    background: #f40612;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgb(229 9 20 / 30%);
}

.add-watchlist:hover {
    background: rgb(255 255 255 / 20%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgb(255 255 255 / 10%);
}

.scroll-btn {
    background: rgb(30 30 30 / 70%);
    color: #fff;
    width: 44px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    box-shadow: 0 4px 16px rgb(0 0 0 / 25%);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    opacity: 0.85;
    outline: none;
    border: 2px solid #222;
}

.scroll-btn:active {
    transform: translateY(-50%) scale(0.97);
}

.scroll-btn:hover {
    background: #e50914;
    color: #fff;
    box-shadow: 0 6px 24px rgb(229 9 20 / 15%);
    opacity: 1;
}

.scroll-left {
    left: 8px;
}

.scroll-right {
    right: 8px;
}

@media (width <= 900px) {
    .scroll-btn {
        width: 34px;
        height: 54px;
        font-size: 1.3rem;
    }

    .movie-row {
        padding: 0 1rem;
        gap: 0.75rem;
    }

    .scroll-left {
        left: 2px;
    }

    .scroll-right {
        right: 2px;
    }
}

/* Hide scroll buttons on touch devices for a cleaner look */
@media (pointer: coarse) {
    .scroll-btn {
        display: none;
    }
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
    transition: opacity 0.5s ease;
}

.movie-grid.loading {
    opacity: 0.5;
}

.movie-card {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.movie-card:hover {
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 8px 20px rgb(0 0 0 / 30%);
}

.movie-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 4px;
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.movie-poster:hover {
    opacity: 0.8;
}

.movie-info {
    padding: 1rem;
    background: #1a1a1a;
}

.movie-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
    text-align: center;
    text-shadow: 1px 1px 2px rgb(0 0 0 / 30%);
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.movie-tag {
    background: #2c3440;
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.movie-tag:hover {
    background: #3a4450;
    transform: scale(1.05);
}

.loading {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #666;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.error-message {
    color: #e74c3c;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    background: rgb(231 76 60 / 10%);
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: #1a1a1a;
    color: white;
    margin-top: 2rem;
    border-top: 1px solid rgb(255 255 255 / 10%);
    box-shadow: 0 -2px 10px rgb(0 0 0 / 20%);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 5%;
    background: #141414;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-section a {
    display: block;
    margin-bottom: 0.5rem;
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #fff;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #e50914;
}

.footer-bottom {
    text-align: center;
    padding: 1rem;
    background: #0b0b0b;
}

.admin-link {
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.admin-link:hover {
    color: #e50914;
}

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Responsive Design */
@media (width <= 1024px) {
    .nav-links {
        gap: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.5rem;
    }

    .movie-slider {
        height: 400px;
    }

    .slide-content h2 {
        font-size: 1.8rem;
    }

    .slide-content {
        padding: 1.5rem 1.5rem 0.8rem;
    }
}

@media (width <= 768px) {
    nav {
        padding: 0 1rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .login-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }

    .profile-container {
        width: 32px;
        height: 32px;
    }

    .profile-icon {
        font-size: 14px;
    }

    .hero-section, .container {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

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

    .movie-slider {
        height: 300px;
    }

    .slide-content h2 {
        font-size: 1.5rem;
    }

    .slide-meta {
        font-size: 0.9rem;
    }

    .slide-actions {
        gap: 0.8rem;
    }

    .view-more, .add-watchlist {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .movie-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .movie-info h1 {
        font-size: 2rem;
    }

    .movie-meta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .movie-actions {
        justify-content: center;
    }
}

@media (width <= 480px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 0.5rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.8rem;
    }

    .nav-links a, .login-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .user-profile {
        margin-left: auto;
    }

    .hero-section, .container {
        padding: 0 0.5rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.8rem;
    }

    .movie-slider {
        height: 250px;
    }

    .slide-content {
        padding: 1rem 1rem 0.5rem;
    }

    .slide-content h2 {
        font-size: 1.2rem;
    }

    .slide-meta {
        font-size: 0.8rem;
    }

    .view-more, .add-watchlist {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Login/Register Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 70%);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #1a1a1a;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    color: white;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: #2a2a2a;
    color: white;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #e50914;
}

.auth-button {
    width: 100%;
    padding: 0.8rem;
    background-color: #e50914;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
}

.auth-button:hover {
    background-color: #f40612;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
}

.auth-switch a {
    color: #e50914;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.error-message {
    color: #e50914;
    background-color: rgb(229 9 20 / 10%);
    padding: 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

/* User Profile Styles */
.user-profile {
    display: none;
    align-items: center;
    gap: 1rem;
}

.profile-name {
    color: white;
    font-weight: 500;
}

/* Profile Page Styles */
.profile-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    color: #fff;
    background: #141414;
}

.profile-header {
    background: linear-gradient(to bottom, rgb(0 0 0 / 80%) 0%, #141414 100%);
    padding: 3rem 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

#largeProfilePic {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e50914;
    box-shadow: 0 0 20px rgb(229 9 20 / 30%);
}

.profile-details h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgb(0 0 0 / 50%);
}

.profile-details p {
    color: #999;
    font-size: 1rem;
    margin: 0.5rem 0;
}

/* Tabs Styling */
.profile-tabs {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #333;
    padding-bottom: 1rem;
}

.tab-button {
    background: transparent;
    border: none;
    color: #777;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100%;
    height: 3px;
    background: #e50914;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-button.active {
    color: #fff;
}

.tab-button.active::after {
    transform: scaleX(1);
}

/* Content Panels */
.tab-content {
    min-height: 400px;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

/* Movie Grid Styling */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* Movie Details Page Styles */
.movie-details-page {
    min-height: calc(100vh - 60px);
    background: #141414;
    padding-top: 60px;
}

.movie-hero {
    position: relative;
    min-height: 90vh;
    color: white;
}

.movie-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.3);
    z-index: 0;
}

.movie-content {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.movie-poster img {
    width: 300px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgb(0 0 0 / 50%);
}

.movie-info {
    flex: 1;
}

.movie-info h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    color: #ccc;
}

.movie-plot {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #fff;
}

.movie-crew, .movie-details {
    margin-bottom: 2rem;
    color: #ccc;
}

.movie-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn.primary {
    background: #e50914;
    color: white;
}

.btn.secondary {
    background: rgb(255 255 255 / 10%);
    color: white;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    color: #e50914;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-container {
    text-align: center;
    padding: 3rem;
    color: white;
}

.error-container i {
    font-size: 3rem;
    color: #e50914;
    margin-bottom: 1rem;
}

@media (width <= 768px) {
    .movie-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .movie-info h1 {
        font-size: 2rem;
    }

    .movie-meta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .movie-actions {
        justify-content: center;
    }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(0 0 0 / 80%);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #141414;
    padding: 2rem;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    position: relative;
    color: white;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #e50914;
}

.login-btn {
    padding: 0.5rem 1.5rem;
    background: #e50914;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-btn:hover {
    background: #f40612;
}

.movie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(0 0 0 / 90%);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.movie-detail-container {
    display: flex;
    gap: 2rem;
    max-width: 1000px;
    width: 100%;
    color: white;
}

.movie-poster img {
    width: 300px;
    border-radius: 8px;
}

.movie-info {
    flex: 1;
}

.movie-meta {
    margin: 1rem 0;
    color: #aaa;
}

.movie-rating {
    margin: 1rem 0;
}

.imdb-rating {
    color: #f5c518;
    font-size: 1.2rem;
    margin-right: 1rem;
}

.plot {
    margin: 1rem 0;
    line-height: 1.6;
}

.movie-details p {
    margin: 0.5rem 0;
}

.movie-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.action-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-watchlist {
    background: #e50914;
    color: white;
}

.rate-movie {
    background: rgb(255 255 255 / 10%);
    color: white;
    border: 1px solid rgb(255 255 255 / 30%);
}

/* --- MOVIE DETAILS PAGE MODERN NETFLIX STYLE --- */
.movie-details-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: linear-gradient(to bottom, rgb(20 20 20 / 90%) 60%, #141414 100%);
    padding-top: 6.5rem;
    padding-bottom: 2rem;
}

.movie-details-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2.5rem;
    background: rgb(24 24 24 / 98%);
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px 0 rgb(0 0 0 / 65%);
    padding: 2.5rem 2.5rem 2rem;
    margin-top: 2rem;
    max-width: 900px;
    width: 100%;
    position: relative;
}

.movie-details-poster {
    width: 240px;
    min-width: 180px;
    border-radius: 1rem;
    box-shadow: 0 4px 24px 0 rgb(229 9 20 / 25%);
    object-fit: cover;
    background: #222;
    margin-right: 1.5rem;
}

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

.movie-details-title {
    font-size: 2.4rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 0.2rem;
    letter-spacing: 1px;
}

.movie-details-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 1.1rem;
    color: #d2d2d2;
    margin-bottom: 1rem;
}

.movie-details-rating {
    color: #e50914;
    font-weight: bold;
    background: #222;
    border-radius: 0.5rem;
    padding: 0.2rem 0.8rem;
    margin-right: 0.6rem;
    font-size: 1.1rem;
}

.movie-details-plot {
    color: #f3f3f3;
    font-size: 1.18rem;
    margin-bottom: 1.2rem;
    line-height: 1.7;
}

.movie-details-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1.2rem;
}

.movie-details-btn {
    padding: 0.75rem 2.2rem;
    border: none;
    border-radius: 2rem;
    background: #e50914;
    color: #fff;
    font-size: 1.15rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 12px 0 rgb(229 9 20 / 18%);
    transition: background 0.2s, transform 0.2s;
}

.movie-details-btn:hover {
    background: #b0060f;
    transform: scale(1.06);
}

@media (width <= 900px) {
    .movie-details-container {
        flex-direction: column;
        align-items: center;
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }

    .movie-details-poster {
        width: 60vw;
        min-width: 120px;
        margin: 0 auto 1.2rem;
    }

    .movie-details-info {
        align-items: center;
        text-align: center;
    }
}

/* PROFILE ICON */
.profile-container {
    position: relative;
    padding: 5px;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.profile-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-initials {
    color: white;
    font-weight: bold;
}

/* DROPDOWN - Controlled by JS, not hover */
#navProfileDropdown.profile-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background: #111;
    border-radius: 8px;
    padding: 10px;
    min-width: 180px;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}