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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #0a0a0f;
  color: #e8e8f0;
  padding: 20px;
  min-height: 100vh;
}

/* ---- Navigation ---- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #1e1e2a;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-link {
  text-decoration: none;
  color: inherit;
}
.brand-link:hover {
  opacity: 0.9;
}

/* ---- Logo ---- */
.brand-link img {
  height: 65px !important;
  width: auto !important;
  vertical-align: middle !important;
}

/* Fallback text brand (if ever used) */
.brand {
  font-size: 1.6rem;
  font-weight: 700;
  color: #00d4ff;
  letter-spacing: -0.5px;
}
.brand span {
  color: #a855f7;
}

nav a {
  color: #b0b0c8;
  text-decoration: none;
  margin-left: 18px;
  font-size: 1.2rem !important;
  padding: 6px 0;
  transition: color 0.2s;
}
nav a:hover {
  color: #00d4ff;
}

nav .right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
  background: #1e1e2a;
  border: none;
  color: #e8e8f0;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}
.btn:hover {
  background: #2a2a3a;
}
.btn-primary {
  background: #00d4ff;
  color: #0a0a0f;
}
.btn-primary:hover {
  background: #00b8e6;
}
.btn-danger {
  background: #e74c3c;
  color: #fff;
}
.btn-danger:hover {
  background: #c0392b;
}
.btn-outline {
  background: transparent;
  border: 1px solid #2a2a3a;
}
.btn-outline:hover {
  background: #1a1a2a;
}

/* ---- Grid (homepage & movies) ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

/* ---- Movie cards ---- */
.movie-card {
  background: #12121c;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
  border: 1px solid #1e1e2a;
}
.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  border-color: #2a2a3e;
}
.movie-card .poster {
  width: 100%;
  aspect-ratio: 16/9;
  background: #1a1a2a;
  object-fit: cover;
}
.movie-card .info {
  padding: 14px 16px 18px;
}
.movie-card .title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.movie-card .meta {
  color: #8888aa;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
}
.movie-card .rating {
  color: #fbbf24;
}

/* ---- Forms ---- */
.form-container {
  max-width: 420px;
  margin: 40px auto;
  background: #12121c;
  padding: 32px;
  border-radius: 16px;
  border: 1px solid #1e1e2a;
}
.form-container h2 {
  margin-bottom: 20px;
  font-size: 1.6rem;
}
.form-container input {
  width: 100%;
  padding: 12px 14px;
  margin: 8px 0 16px;
  background: #1a1a2a;
  border: 1px solid #2a2a3a;
  border-radius: 8px;
  color: #e8e8f0;
  font-size: 1rem;
}
.form-container input:focus {
  outline: none;
  border-color: #00d4ff;
}
.form-container button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
}

/* ---- Upload page ---- */
#uploadForm {
  max-width: 600px;
  margin: 0 auto;
}
#uploadForm input[type="file"] {
  background: #1a1a2a;
  padding: 20px;
  border: 2px dashed #2a2a3a;
  border-radius: 12px;
  width: 100%;
  color: #8888aa;
}
#uploadForm input[type="file"]:hover {
  border-color: #00d4ff;
}

/* ---- Progress bar ---- */
#progressBar {
  width: 100%;
  height: 6px;
  background: #1a1a2a;
  border-radius: 4px;
  margin-top: 12px;
  overflow: hidden;
  display: none;
}
#progressFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00d4ff, #a855f7);
  border-radius: 4px;
  transition: width 0.3s;
}

/* ---- Video player page ---- */
#videoPlayer {
  width: 100%;
  max-width: 1000px;
  border-radius: 14px;
  background: #000;
  display: block;
  margin: 0 auto;
}
.player-container {
  max-width: 1000px;
  margin: 0 auto;
}
.player-container h2 {
  margin-bottom: 12px;
}

/* ---- Utility classes ---- */
.text-center {
  text-align: center;
}
.mt-20 {
  margin-top: 20px;
}
.mb-20 {
  margin-bottom: 20px;
}
.flex {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.flex-center {
  align-items: center;
  justify-content: center;
}
.gap-8 {
  gap: 8px;
}

/* ---- Carousels (horizontal scroll) ---- */
.section-wrapper {
  margin-bottom: 30px;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.section-header h2,
.section-header h3 {
  margin: 0;
  font-size: 1.2rem;
}
.carousel-wrapper {
  position: relative;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 12px;
  padding: 4px 0 12px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.carousel-track::-webkit-scrollbar {
  display: none;
}
.carousel-wrapper .movie-card {
  flex: 0 0 auto;
  width: 150px;
}
.carousel-wrapper .movie-card .poster {
  aspect-ratio: 2/3;
  border-radius: 10px;
}
.carousel-wrapper .movie-card .title {
  font-size: 0.85rem;
  margin-top: 6px;
}

/* ---- Carousel arrows ---- */
.carousel-arrow-left,
.carousel-arrow-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.carousel-arrow-left:hover,
.carousel-arrow-right:hover {
  background: rgba(0,0,0,0.9);
}
.carousel-arrow-left { left: 0; }
.carousel-arrow-right { right: 0; }

/* ---- Admin movie grid (posters) ---- */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.admin-card {
  background: #12121c;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #1e1e2a;
  transition: transform 0.2s, box-shadow 0.2s;
}
.admin-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  border-color: #2a2a3e;
}
.admin-card .admin-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  background: #0a0a0f;
}
.admin-card .admin-info {
  padding: 8px 10px;
}
.admin-card .admin-title {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-card .admin-meta {
  color: #8888aa;
  font-size: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-card .admin-delete {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 2px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
}
.admin-card .admin-delete:hover {
  background: #c0392b;
}
.admin-card .admin-badge {
  color: #fbbf24;
  font-size: 0.7rem;
}