/* =========================================================
   SHARKY MOVIES 2 - NETFLIX STYLE UI
   ========================================================= */

:root {
  --primary: #e50914;
  --primary-dark: #b20710;
  --bg: #080808;
  --bg-soft: #111;
  --panel: #181818;
  --panel-light: #222;
  --text: #ffffff;
  --muted: rgba(255,255,255,0.72);
  --muted-2: rgba(255,255,255,0.5);
  --success: #46d867;
  --shadow: rgba(0,0,0,0.75);
  --radius: 14px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}

/* =========================================================
   NAVBAR
   ========================================================= */

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: 76px;
  padding: 0 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 300;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.85),
    rgba(0,0,0,0.35),
    rgba(0,0,0,0)
  );
  transition: background 0.25s ease, backdrop-filter 0.25s ease;
}

.navbar.scrolled {
  background: rgba(5,5,5,0.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 26px;
}

.logo {
  color: var(--primary);
  font-size: 1.9rem;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: -1px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-link {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.search-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 48%;
  transform: translateY(-50%);
  color: var(--muted-2);
  font-size: 1rem;
}

.search-bar {
  width: 230px;
  padding: 11px 12px 11px 34px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  outline: none;
  background: rgba(0,0,0,0.42);
  color: white;
  transition: width 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.search-bar:focus {
  width: 300px;
  border-color: var(--primary);
  background: rgba(0,0,0,0.75);
}

.profile-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #6e0007);
  box-shadow: 0 8px 25px rgba(229,9,20,0.28);
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  min-height: 86vh;
  padding: 140px 4% 120px;
  display: flex;
  align-items: center;
  position: relative;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to right, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.72) 32%, rgba(0,0,0,0.18) 70%, rgba(0,0,0,0.55) 100%),
    linear-gradient(to top, var(--bg) 0%, rgba(0,0,0,0.18) 42%, rgba(0,0,0,0.15) 100%);
}

.hero-content {
  max-width: 680px;
  animation: fadeUp 0.6s ease both;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(229,9,20,0.18);
  border: 1px solid rgba(229,9,20,0.45);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 6.6rem);
  line-height: 0.92;
  letter-spacing: -4px;
  text-shadow: 0 8px 30px rgba(0,0,0,0.9);
  margin-bottom: 18px;
}

.hero-meta,
.details-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
}

.hero-meta span,
.details-meta span {
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(255,255,255,0.13);
  color: rgba(255,255,255,0.9);
  font-size: 0.88rem;
  font-weight: 700;
}

#heroDesc {
  max-width: 590px;
  color: rgba(255,255,255,0.86);
  line-height: 1.55;
  font-size: 1.05rem;
  text-shadow: 0 3px 12px rgba(0,0,0,0.9);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-play {
  background: white;
  color: black;
}

.btn-play:hover {
  background: rgba(255,255,255,0.78);
}

.btn-secondary {
  background: rgba(255,255,255,0.18);
  color: white;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.28);
}

/* =========================================================
   CONTENT / ROWS
   ========================================================= */

.page-content {
  position: relative;
  z-index: 5;
  margin-top: -86px;
  padding: 0 0 60px;
}

.movie-section {
  padding: 0 4%;
}

.movie-row-block {
  margin-bottom: 38px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-header h2 {
  position: relative;
  font-size: 1.35rem;
  letter-spacing: -0.3px;
  padding-left: 12px;
}

.section-header h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  height: 76%;
  width: 4px;
  border-radius: 999px;
  background: var(--primary);
}

.clear-search {
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: white;
  padding: 9px 13px;
  border-radius: 999px;
  cursor: pointer;
}

.movie-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 10px 2px 24px;
  scroll-snap-type: x mandatory;
}

.movie-row::-webkit-scrollbar {
  height: 8px;
}

.movie-row::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
}

.movie-row::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.22);
  border-radius: 999px;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
  padding-bottom: 40px;
}

/* =========================================================
   MOVIE CARD
   ========================================================= */

.movie-card {
  position: relative;
  min-width: 190px;
  width: 190px;
  height: 285px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  scroll-snap-align: start;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.search-grid .movie-card {
  width: 100%;
  min-width: 0;
}

.movie-card:hover {
  transform: scale(1.08);
  z-index: 20;
  box-shadow: 0 20px 48px rgba(0,0,0,0.65);
}

.movie-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.movie-card:hover img {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  min-height: 48%;
  padding: 54px 12px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0));
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .card-overlay {
  opacity: 1;
  transform: translateY(0);
}

.card-title {
  font-size: 0.98rem;
  line-height: 1.2;
  margin-bottom: 8px;
  font-weight: 800;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--muted);
}

.card-rating {
  color: var(--success);
  font-weight: 800;
}

.card-play {
  margin-top: 10px;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 0.78rem;
}

/* =========================================================
   SKELETON LOADING
   ========================================================= */

.skeleton-card {
  min-width: 190px;
  width: 190px;
  height: 285px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(
    90deg,
    #151515 0%,
    #242424 50%,
    #151515 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.15s infinite linear;
}

.search-grid .skeleton-card {
  width: 100%;
  min-width: 0;
}

/* =========================================================
   DETAILS MODAL
   ========================================================= */

.details-modal,
.player-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.details-modal.active,
.player-modal.active {
  display: flex;
}

.details-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.76);
  backdrop-filter: blur(10px);
}

.details-box {
  position: relative;
  width: min(980px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 20px;
  background: #111;
  box-shadow: 0 25px 90px rgba(0,0,0,0.85);
  animation: modalPop 0.22s ease both;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 20;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(0,0,0,0.72);
  color: white;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.details-hero {
  position: relative;
  min-height: 420px;
  background-size: cover;
  background-position: center;
}

.details-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #111 0%, rgba(17,17,17,0.25) 52%, rgba(0,0,0,0.1) 100%),
    linear-gradient(to right, rgba(0,0,0,0.85), rgba(0,0,0,0.18));
}

.details-hero-content {
  position: absolute;
  left: 26px;
  bottom: 26px;
  max-width: 650px;
}

.details-hero-content h2 {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -2px;
  margin-bottom: 14px;
}

.details-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.details-body {
  display: grid;
  grid-template-columns: 185px 1fr;
  gap: 24px;
  padding: 26px;
}

.details-poster-wrap img {
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.details-text {
  color: rgba(255,255,255,0.86);
  line-height: 1.6;
}

.details-extra {
  margin-top: 18px;
  color: var(--muted-2);
}

/* =========================================================
   PLAYER MODAL
   ========================================================= */

.player-modal {
  background: rgba(0,0,0,0.92);
}

.player-box {
  width: min(1100px, 96vw);
  background: #000;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 25px 90px rgba(0,0,0,0.8);
}

.player-box h2 {
  margin-bottom: 14px;
}

#videoPlayer {
  width: 100%;
  height: 68vh;
  border: none;
  border-radius: 10px;
  background: #000;
}

.player-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 380px;
  border-radius: 12px;
  background:
    radial-gradient(circle at center, rgba(229,9,20,0.18), transparent 45%),
    #090909;
  padding: 30px;
}

.player-placeholder h3 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.player-placeholder p {
  color: var(--muted);
  max-width: 600px;
  line-height: 1.6;
}

.player-close {
  top: 24px;
  right: 28px;
}

/* =========================================================
   HELPERS / ANIMATIONS
   ========================================================= */

.hidden {
  display: none !important;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  .navbar {
    height: auto;
    min-height: 76px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
    background: rgba(0,0,0,0.86);
  }

  .nav-left,
  .nav-right {
    width: 100%;
    justify-content: space-between;
  }

  .nav-links {
    gap: 10px;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 6px;
  }

  .search-bar,
  .search-bar:focus {
    width: min(70vw, 280px);
  }

  .hero {
    min-height: 82vh;
    padding-top: 190px;
  }

  .page-content {
    margin-top: -42px;
  }
}

@media (max-width: 640px) {
  .logo {
    font-size: 1.45rem;
  }

  .profile-icon {
    display: none;
  }

  .hero h1 {
    letter-spacing: -2px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn {
    width: 100%;
  }

  .movie-card,
  .skeleton-card {
    min-width: 145px;
    width: 145px;
    height: 220px;
  }

  .search-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  }

  .details-body {
    grid-template-columns: 1fr;
  }

  .details-poster-wrap {
    display: none;
  }

  .details-hero {
    min-height: 360px;
  }

  #videoPlayer {
    height: 44vh;
  }
}



/* =========================================================
   PLAYER PAGES - movie.html / tv.html
   ========================================================= */

.player-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(229,9,20,0.16), transparent 35%),
    #080808;
}

.player-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 74px;
  padding: 0 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5,5,5,0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.player-header .logo {
  color: var(--primary);
  font-weight: 900;
  font-size: 1.7rem;
  text-decoration: none;
}

.player-home-link {
  color: white;
  text-decoration: none;
  font-weight: 700;
  opacity: 0.8;
}

.player-home-link:hover {
  opacity: 1;
}

.watch-layout {
  padding: 34px 4% 60px;
}

.watch-top {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.watch-poster {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.55);
}

.watch-meta h1 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -2px;
  margin-bottom: 14px;
}

.watch-info-line {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.watch-info-line span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 800;
}

.watch-desc {
  max-width: 850px;
  color: rgba(255,255,255,0.78);
  line-height: 1.65;
  margin-bottom: 22px;
}

.server-panel {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
}

.server-title {
  font-weight: 900;
  margin-bottom: 10px;
}

.server-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.server-btn {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: white;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.server-btn.active,
.server-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.server-note {
  margin-top: 10px;
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
}

.tv-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 22px;
}

.tv-select {
  background: rgba(255,255,255,0.08);
  color: white;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 11px 14px;
  font-weight: 800;
}

.tv-select option {
  background: #111;
}

.player-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: black;
  box-shadow: 0 22px 80px rgba(0,0,0,0.78);
  border: 1px solid rgba(255,255,255,0.08);
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-shell iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: black;
}

.player-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
}

.spinner {
  width: 46px;
  height: 46px;
  border: 4px solid rgba(255,255,255,0.18);
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: spin 0.85s linear infinite;
}

.loading-text {
  margin-top: 12px;
  font-weight: 800;
}

.click-shield {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 4;
  background: rgba(0,0,0,0.48);
  backdrop-filter: blur(7px);
}

.click-shield.show {
  display: flex;
}

.click-shield-card {
  width: min(520px, 92vw);
  border-radius: 18px;
  padding: 22px;
  background: rgba(18,18,18,0.94);
  border: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  box-shadow: 0 18px 70px rgba(0,0,0,0.7);
}

.click-shield-title {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.click-shield-sub {
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
}

.click-shield-btn {
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
}

.player-footer {
  padding: 24px 4%;
  color: rgba(255,255,255,0.45);
  text-align: center;
}

.empty-player {
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  color: rgba(255,255,255,0.75);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 760px) {
  .watch-top {
    grid-template-columns: 1fr;
  }

  .watch-poster {
    display: none;
  }

  .player-header {
    height: auto;
    padding-top: 16px;
    padding-bottom: 16px;
  }
}
