:root {
  --bg-color: #0b0f19;
  --bg-color-light: #151a28;
  --primary-color: #9d4edd; /* Purple accent from reference 1 */
  --secondary-color: #e50914; /* Red accent alternative */
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --nav-bg: rgba(11, 15, 25, 0.9);
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  -webkit-tap-highlight-color: transparent;
  padding-bottom: 70px; /* Space for bottom nav */
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(11,15,25, 0.9) 0%, rgba(11,15,25, 0) 100%);
}

.logo-area h2 {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.logo-area h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.header-actions .icon-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Hero Section / Featured Movie */
.hero {
  position: relative;
  height: 60vh;
  min-height: 400px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, var(--bg-color) 0%, transparent 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-bottom: 20px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 15px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, background-color 0.2s;
}

.btn-primary:active {
  transform: scale(0.95);
}

.btn-icon-col {
  background: transparent;
  border: none;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-icon-col i {
  font-size: 1.5rem;
}

/* Categories Slider */
.categories {
  padding: 10px 20px;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}

.categories::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}

.cat-item {
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  padding-bottom: 5px;
}

.cat-item.active {
  color: white;
  border-bottom: 2px solid var(--secondary-color);
}

/* Movie Row / Carousel */
.movie-section {
  padding: 15px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  margin-bottom: 15px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.view-all {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.movie-carousel {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 0 20px;
  scrollbar-width: none;
}
.movie-carousel::-webkit-scrollbar { display: none; }

.movie-card {
  flex: 0 0 140px;
  cursor: pointer;
}

.movie-poster {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  object-fit: cover;
  background-color: var(--bg-color-light);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}
.movie-card:active .movie-poster {
  transform: scale(0.95);
}

/* Stacked View (For search or full lists) */
.movie-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding: 0 20px;
}
@media (min-width: 600px) {
  .movie-stack { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .movie-stack { grid-template-columns: repeat(5, 1fr); }
}

.movie-stack .movie-card {
  flex: 1;
}
.movie-stack .movie-poster {
  height: auto;
  aspect-ratio: 2/3;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-color);
  display: flex;
  justify-content: space-around;
  padding: 15px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  z-index: 100;
}

.nav-item {
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
}

.nav-item.active {
  color: var(--secondary-color);
}
.nav-item i {
  font-size: 1.4rem;
}

/* Forms & Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.auth-card {
  background-color: var(--bg-color-light);
  padding: 30px;
  border-radius: 20px;
  width: 90%;
  max-width: 400px;
  text-align: center;
}

.auth-card h2 {
  margin-bottom: 20px;
}

.input-group {
  margin-bottom: 15px;
  text-align: left;
}
.input-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.input-group input {
  width: 100%;
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
}

.auth-switch {
  margin-top: 15px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.auth-switch a {
  color: var(--primary-color);
  font-weight: bold;
}

/* Utility */
.hidden { display: none !important; }
