* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: Arial, sans-serif;
  background: #080808;
  color: white;
  overflow-x: hidden;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 18px 5%;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
}

header h1 {
  color: #e50914;
  font-size: 30px;
}

.hero {
  min-height: 45vh;
  display: flex;
  align-items: end;
  padding: 5%;
  /*background: linear-gradient(to top, #080808, rgba(0,0,0,0.2)),
              url("images/banner.jpg") center/cover; */
}

.hero h2 {
  font-size: clamp(32px, 6vw, 70px);
}

.hero p {
  max-width: 500px;
  margin-top: 10px;
  color: #ddd;
}

.ad-banner {
  margin: 20px 5%;
  height: 90px;
  border-radius: 14px;
  background: #1c1c1c;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
}

main {
  padding: 20px 5% 60px;
}

.section-title {
  margin-bottom: 18px;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}

.movie-card {
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.movie-card:hover {
  transform: scale(1.06);
  filter: brightness(1.15);
}

.movie-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #222;
}

.movie-card h3 {
  font-size: 15px;
  margin-top: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  width: min(1000px, 100%);
}

iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 14px;
  background: black;
}

.close-btn {
  float: right;
  margin-bottom: 10px;
  font-size: 32px;
  background: none;
  color: white;
  border: none;
  cursor: pointer;
}

.modal h2 {
  margin-top: 15px;
}

.modal p {
  color: #ccc;
  margin-top: 8px;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 24px;
  }

  .movie-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: 35vh;
  }
}


.movie-page {
  background: #080808;
  min-height: 100vh;
}

.back-btn {
  position: fixed;
  top: 18px;
  left: 20px;
  z-index: 20;
  background: rgba(0,0,0,0.65);
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 16px;
  cursor: pointer;
}

.movie-hero {
  min-height: 78vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: end;
  padding: 6%;
}

.movie-info {
  max-width: 700px;
}

.movie-info h1 {
  font-size: clamp(42px, 8vw, 90px);
  margin-bottom: 15px;
}

.movie-info p {
  color: #ddd;
  font-size: clamp(15px, 2vw, 20px);
  line-height: 1.5;
  max-width: 650px;
}

.play-btn {
  margin-top: 25px;
  background: white;
  color: black;
  border: none;
  padding: 14px 36px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.play-btn:hover {
  transform: scale(1.05);
  background: #e6e6e6;
}

.suggestions {
  padding: 30px 5% 70px;
}

.suggestions h2 {
  margin-bottom: 18px;
}

.watch-screen {
  position: fixed;
  inset: 0;
  background: black;
  z-index: 9999;
}

.watch-screen iframe {
  width: 100vw;
  height: 100vh;
  border: none;
  border-radius: 0;
}

.close-watch {
  position: fixed;
  top: 15px;
  right: 20px;
  z-index: 10000;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  font-size: 38px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  cursor: pointer;
}

@media (max-width: 768px) {
  .movie-hero {
    min-height: 70vh;
    padding: 8% 5%;
  }

  .movie-info h1 {
    font-size: 42px;
  }

  .play-btn {
    width: 100%;
  }
}


.player-controls {
  position: fixed;
  top: 15px;
  right: 20px;
  z-index: 10000;
  display: flex;
  gap: 12px;
}

.fullscreen-btn,
.close-watch {
  width: 55px;
  height: 55px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  color: white;
  font-size: 30px;
  cursor: pointer;
}

#fullscreenBtn {
    margin-right: 50px;
}

.fullscreen-btn:hover,
.close-watch:hover {
  background: rgba(255,255,255,0.2);
}








header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header nav {
  display: flex;
  gap: 28px;
  color: #aaa;
  font-weight: bold;
}

header nav span {
  cursor: pointer;
}

header nav span:hover {
  color: white;
}

.hero {
  min-height: 70vh;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #080808 0%, transparent 55%);
  pointer-events: none;
}

.hero > div {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.movie-row-section {
  margin-bottom: 45px;
}

.movie-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0 20px;
  scroll-behavior: smooth;
}

.movie-row::-webkit-scrollbar {
  height: 8px;
}

.movie-row::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 20px;
}

.movie-row .movie-card {
  min-width: 170px;
  max-width: 170px;
  background: #141922;
  border-radius: 10px;
  overflow: hidden;
}

.movie-card {
  background: #141922;
  border-radius: 10px;
  overflow: hidden;
}

.movie-card-info {
  padding: 8px;
}

.movie-card-info p {
  color: #8fa3c7;
  font-size: 13px;
  margin-top: 5px;
}

@media (max-width: 768px) {
  header nav {
    display: none;
  }

  .hero {
    min-height: 55vh;
  }

  .movie-row .movie-card {
    min-width: 135px;
    max-width: 135px;
  }
}

.hero {
  transition: background-image 0.6s ease-in-out;
}




.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.row-buttons {
  display: flex;
  gap: 10px;
}

.row-btn {
  width: 48px;
  height: 48px;
  border: 1px solid #333;
  border-radius: 50%;
  background: rgba(20,20,20,0.9);
  color: white;
  font-size: 36px;
  line-height: 40px;
  cursor: pointer;
}

.row-btn:hover {
  background: #e50914;
  border-color: #e50914;
  transform: scale(1.08);
}

.movie-row {
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.movie-row::-webkit-scrollbar {
  display: none;
}




/* TV UI */

/* ===============================
   Unified Responsive + TV Support
================================ */

.focusable {
  outline: none;
}

body.keyboard-mode .focusable:focus,
body.keyboard-mode button:focus,
body.keyboard-mode a:focus,
body.keyboard-mode input:focus,
body.keyboard-mode textarea:focus,
body.keyboard-mode select:focus,
body.keyboard-mode .movie-card:focus {
  outline: 4px solid #ffffff;
  outline-offset: 5px;
  box-shadow: 0 0 0 7px rgba(229, 9, 20, 0.75);
  transform: scale(1.08);
  z-index: 5;
}

.movie-card {
  position: relative;
}

.movie-card:focus {
  border-radius: 12px;
}

.row-btn,
.play-btn,
.back-btn,
.fullscreen-btn,
.close-watch {
  min-width: 48px;
  min-height: 48px;
}

.movie-row {
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.movie-row::-webkit-scrollbar {
  display: none;
}

.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.row-buttons {
  display: flex;
  gap: 10px;
}

.row-btn {
  width: 52px;
  height: 52px;
  border: 1px solid #333;
  border-radius: 50%;
  background: rgba(20,20,20,0.9);
  color: white;
  font-size: 36px;
  line-height: 40px;
  cursor: pointer;
}

.row-btn:hover {
  background: #e50914;
  border-color: #e50914;
}

.movie-row-section {
  margin-bottom: 42px;
}

.movie-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 10px 4px 24px;
}

.movie-row .movie-card {
  flex: 0 0 165px;
}

.movie-grid {
  overflow: visible;
}

.player-controls {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 10000;
  display: flex;
  gap: 14px;
}

.fullscreen-btn,
.close-watch {
  position: static;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 30px;
  cursor: pointer;
}

.fullscreen-btn:hover,
.close-watch:hover {
  background: rgba(255,255,255,0.2);
}

/* Mobile */
@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  header {
    padding: 14px 5%;
  }

  header h1 {
    font-size: 24px;
  }

  .hero {
    min-height: 55vh;
    padding: 6%;
  }

  .hero h2 {
    font-size: 34px;
  }

  .hero p {
    font-size: 14px;
    max-height: 90px;
    overflow: hidden;
  }

  .play-btn {
    width: 100%;
    font-size: 18px;
    padding: 14px 20px;
  }

  .movie-row .movie-card {
    flex: 0 0 135px;
  }

  .movie-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .row-btn {
    width: 44px;
    height: 44px;
    font-size: 30px;
  }

  .player-controls {
    top: 12px;
    right: 12px;
  }

  .fullscreen-btn,
  .close-watch {
    width: 48px;
    height: 48px;
    font-size: 26px;
  }
}

/* Tablet */
@media (min-width: 601px) and (max-width: 1024px) {
  .hero {
    min-height: 62vh;
  }

  .movie-row .movie-card {
    flex: 0 0 155px;
  }

  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  }
}

/* Desktop */
@media (min-width: 1025px) and (max-width: 1599px) {
  .movie-row .movie-card {
    flex: 0 0 170px;
  }

  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
}

/* Smart TV / Large Screens */
@media (min-width: 1600px) {
  body {
    font-size: 20px;
  }

  header {
    padding: 26px 5%;
  }

  header h1 {
    font-size: 46px;
  }

  .hero {
    min-height: 72vh;
    padding: 6%;
  }

  .hero h2 {
    font-size: 86px;
  }

  .hero p {
    font-size: 26px;
    max-width: 900px;
    line-height: 1.5;
  }

  .section-title {
    font-size: 34px;
  }

  .movie-row-section {
    margin-bottom: 60px;
  }

  .movie-row {
    gap: 24px;
    padding-bottom: 35px;
  }

  .movie-row .movie-card {
    flex: 0 0 240px;
  }

  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px;
  }

  .movie-card h3 {
    font-size: 21px;
  }

  .movie-card-info p {
    font-size: 17px;
  }

  .row-btn {
    width: 70px;
    height: 70px;
    font-size: 48px;
  }

  .play-btn {
    font-size: 28px;
    padding: 20px 48px;
  }

  .back-btn {
    font-size: 24px;
    padding: 18px 28px;
  }

  .movie-info h1 {
    font-size: 92px;
  }

  .movie-info p {
    font-size: 26px;
    max-width: 950px;
  }

  .fullscreen-btn,
  .close-watch {
    width: 76px;
    height: 76px;
    font-size: 42px;
  }

  body.keyboard-mode .focusable:focus,
  body.keyboard-mode button:focus,
  body.keyboard-mode a:focus,
  body.keyboard-mode input:focus,
  body.keyboard-mode textarea:focus,
  body.keyboard-mode select:focus,
  body.keyboard-mode .movie-card:focus {
    outline: 6px solid #ffffff;
    outline-offset: 7px;
    box-shadow: 0 0 0 11px rgba(229, 9, 20, 0.8);
    transform: scale(1.12);
  }
}






/* remote control QR desing */
#remoteQrBox {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 99999;
}

.qr-card {
  width: 240px;
  background: rgba(0,0,0,0.88);
  border: 1px solid #333;
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  color: white;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.qr-card h3 {
  color: #e50914;
  margin-bottom: 10px;
}

.qr-card canvas {
  background: white;
  border-radius: 10px;
  padding: 8px;
}

.qr-card p {
  font-size: 13px;
  color: #ccc;
  margin-top: 10px;
}

.qr-card small {
  display: block;
  color: #777;
  margin: 8px 0;
}

.qr-card button {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #e50914;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

@media (max-width: 600px) {
  #remoteQrBox {
    display: none;
  }
}


.section-title {
  position: relative;
  padding-left: 14px;
  font-size: 28px;
  font-weight: bold;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 32px;
  background: #e50914;
  border-radius: 999px;
}
