:root {
  --bg-main: #060709;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-glow: rgba(255, 255, 255, 0.08);
  --accent-red: #ff0537;
  --accent-glow: rgba(255, 5, 55, 0.4);
  --text-white: #ffffff;
  --text-muted: #9496a1;
  --glass-bg: rgba(6, 7, 9, 0.65);
  --glass-border: rgba(255, 255, 255, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-main);
  color: var(--text-white);
  overflow-x: hidden;
}

::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 75px;
  padding: 0 4%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  z-index: 100;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-logo {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.brand-logo span {
  color: var(--accent-red);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Global Search Bar */
.global-search-form {
  position: relative;
  width: 100%;
  max-width: 320px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.search-icon-left {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 8px 14px 8px 38px;
  border-radius: 30px;
  color: white;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-red);
  box-shadow: 0 0 15px var(--accent-glow);
}

/* Hero Banner */
.hero {
  position: relative;
  height: 55vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  padding: 0 5%;
  margin-top: 75px;
  background: linear-gradient(180deg, rgba(6,7,9,0.4) 0%, var(--bg-main) 100%),
              url('https://image.tmdb.org/t/p/original/7RyHsO4yDXtBv1zUU3MSp98rKGq.jpg') center/cover no-repeat;
}

.hero-content {
  max-width: 650px;
  z-index: 2;
}

.tagline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glow);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffaa00;
  margin-bottom: 15px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #b5b5b5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-play-hero {
  padding: 12px 26px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text-white);
  color: var(--bg-main);
  border: none;
  transition: transform 0.2s;
}

.btn-play-hero:hover {
  transform: scale(1.03);
}

/* Main Grid Area */
.main-content {
  position: relative;
  padding: 0 4% 60px 4%;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

/* Media Cards */
.media-card {
  height: 250px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  transition: transform 0.2s ease, border-color 0.2s;
}

.media-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(6,7,9,0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
}

.card-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-red);
  margin-bottom: 2px;
}

.card-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.play-icon-overlay {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 40px;
  height: 40px;
  background: rgba(255, 5, 55, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s;
}

.media-card:hover .play-icon-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Load More Button Container */
.load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.btn-load-more {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: 1px solid var(--glass-border);
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-load-more:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Introduction Section Modal */
.intro-modal-backdrop {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.intro-modal-backdrop.hidden {
  display: none;
  opacity: 0;
}

.intro-card {
  background: #0f1115;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  width: 100%;
  max-width: 500px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  text-align: center;
  position: relative;
}

.intro-card h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #a5a5a5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.intro-card h2 span {
  color: var(--accent-red);
  -webkit-text-fill-color: var(--accent-red);
}

.intro-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 25px;
}

.btn-get-started {
  background: linear-gradient(135deg, rgba(255, 5, 55, 0.9), rgba(179, 0, 36, 0.9));
  color: white;
  border: none;
  width: 100%;
  padding: 14px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: transform 0.2s;
}

.btn-get-started:hover {
  transform: scale(1.02);
}

/* Fully Responsive Mobile-Friendly Video Player Overlay */
.cinema-player {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 500;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.cinema-player.active {
  display: flex;
}

.video-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ytPlayerContainer {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.player-controls-overlay {
  position: absolute;
  inset: 0;
  z-index: 520;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px;
  transition: opacity 0.3s ease;
  opacity: 1;
}

.player-controls-overlay.hidden-cursor {
  opacity: 0;
  cursor: none;
}

.control-top-bar, .control-bottom-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-top-bar {
  justify-content: flex-end;
}

.control-bottom-bar {
  justify-content: center;
  background: rgba(10, 10, 12, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 14px;
  border-radius: 40px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  width: 92%;
  max-width: 380px;
  margin: 0 auto 10px auto;
}

.btn-cinema-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 8px 12px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.btn-circle-action {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}

/* Footer Styling */
.site-footer {
  background: rgba(4, 5, 7, 0.95);
  border-top: 1px solid var(--glass-border);
  padding: 40px 4% 30px 4%;
  margin-top: 60px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-brand p {
  max-width: 400px;
  line-height: 1.4;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-info a {
  color: var(--text-white);
  text-decoration: underline;
  transition: color 0.2s;
}

.footer-info a:hover {
  color: var(--accent-red);
}

.copyright {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Mobile Adaptations */
@media (max-width: 600px) {
  .navbar {
    height: 65px;
    padding: 0 3%;
  }
  .brand-logo {
    font-size: 1.25rem;
  }
  .hero {
    margin-top: 65px;
    height: 48vh;
    min-height: 300px;
    padding: 0 4%;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  .movie-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .media-card {
    height: 220px;
  }
  
  .global-search-form {
    max-width: 38px;
    overflow: hidden;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    transition: max-width 0.3s ease, border-color 0.3s;
  }
  .global-search-form:focus-within {
    max-width: 170px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.09);
  }
  .search-input {
    padding: 8px 10px 8px 34px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  .global-search-form:focus-within .search-input {
    opacity: 1;
  }
  .search-icon-left {
    left: 12px;
    z-index: 2;
  }

  .control-bottom-bar {
    width: 96%;
    padding: 6px 10px;
    gap: 6px;
  }
  .btn-cinema-action {
    padding: 6px 10px;
    font-size: 0.7rem;
  }
  .btn-circle-action {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .footer-brand {
    align-items: flex-start;
  }
  .footer-info {
    align-items: flex-end;
    text-align: right;
  }
}