:root {
  --bg-main: #0b0c10;
  --bg-secondary: #1f2833;
  --primary: #ff3d3d;
  --text-color: #ffffff;
  --text-muted: #c5c6c7;
  --accent-purple: #6c5ce7;
  --accent-yellow: #f1c40f;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-color);
  font-family: "Cairo", sans-serif;
  overflow-x: hidden;
  direction: rtl;
}

#main-header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  z-index: 1000;
  background: rgba(20, 22, 31, 0.7);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 30px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.5s ease-out;
}

#main-header.scrolled {
  background: rgba(20, 22, 31, 0.85);
  top: 10px;
  padding: 10px 25px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
  padding: 5px 0;
  transition: all 0.3s ease;
}

.logo .highlight {
  color: var(--primary);
  text-shadow: 0 0 10px rgba(255, 61, 61, 0.3);
}

.logo:hover {
  transform: scale(1.05);
}

nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-grow: 1;
  margin: 0 20px;
}

nav a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 25px;
  position: relative;
  background: transparent;
}

nav a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

nav a.active {
  color: white;
  background: var(--primary);
  box-shadow: 0 4px 15px rgba(255, 61, 61, 0.3);
}

nav a.active::after {
  display: none;
}

.search-box {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 20px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-right: 0;
  transition: all 0.3s ease;
  min-width: 180px;
  position: relative;
}

.search-box:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.search-box input {
  background: transparent;
  border: none;
  color: white;
  font-family: 'Cairo';
  width: 100%;
  outline: none;
  padding: 5px 10px;
  font-size: 14px;
  direction: rtl;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-box button {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  margin-right: 8px;
  padding: 5px;
  transition: all 0.3s ease;
  border-radius: 50%;
}

.search-box button:hover {
  color: var(--primary);
  background: rgba(255, 61, 61, 0.1);
  transform: scale(1.1);
}

.back-btn-top {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-family: "Cairo";
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  margin-left: 10px;
}

.back-btn-top:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(-5px);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -100%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.hero {
  height: 85vh;
  position: relative;
  background-size: cover;
  background-position: left center;
  display: flex;
  align-items: center;
  transition: background-image 1s ease-in-out;
  margin-top: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(11, 12, 16, 0.85) 0%, rgba(11, 12, 16, 0.7) 40%, transparent 100%),
              linear-gradient(to top, rgba(11, 12, 16, 0.3) 0%, transparent 30%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin-right: auto;
  margin-left: 60px;
  padding: 20px;
  text-align: right;
  animation: fadeIn 0.8s ease;
}

#hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.2;
  text-align: left;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.7);
}

#hero-desc {
  color: #ddd;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
  max-height: 200px;
  overflow: hidden;
  text-align: left;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  justify-content: flex-end;
}

.meta-tag {
  padding: 5px 12px;
  border-radius: 5px;
  font-weight: bold;
  font-size: 0.9rem;
}

.meta-tag.year {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.meta-tag.quality {
  background: var(--accent-purple);
  color: white;
}

.meta-tag.rating {
  color: var(--accent-yellow);
}

.hero-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

.hero-actions button {
  padding: 12px 35px;
  border-radius: 50px;
  border: none;
  font-family: "Cairo";
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
}

.btn-primary {
  background: var(--primary);
  color: white;
  margin-left: 15px;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 61, 61, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 30px;
  position: relative;
  z-index: 10;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.nav-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
}

.hero-indicators {
  display: flex;
  gap: 10px;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.6);
}

.indicator.active {
  background: var(--primary);
  transform: scale(1.2);
}

.main-container {
  max-width: 1400px;
  margin: -50px auto 50px;
  padding: 0 40px;
  position: relative;
  z-index: 5;
}

.container {
  max-width: 1400px;
  margin: 100px auto 50px;
  padding: 0 40px;
}

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

.section-header h3 {
  font-size: 1.5rem;
  border-right: 4px solid var(--primary);
  padding-right: 15px;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 30px;
  border-right: 4px solid var(--primary);
  padding-right: 15px;
}

.view-all {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: 0.3s;
}

.view-all:hover {
  color: var(--primary);
}

.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 25px;
}

.card {
  background: transparent;
  cursor: pointer;
  transition: 0.3s;
  position: relative;
}

.card:hover {
  transform: translateY(-10px);
}

.poster-box {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 270px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  
}

.poster-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

.card:hover .poster-box img {
  transform: scale(1.1);
  filter: brightness(0.6);
}

.card-badge {
  position: absolute;
  top: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  z-index: 2;
}

.badge-q {
  left: 10px;
  background: var(--accent-purple);
  color: white;
}

.badge-y {
  right: 10px;
  background: var(--accent-yellow);
  color: #000;
}

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: 0.3s;
}

.play-overlay i {
  font-size: 3rem;
  color: white;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.card:hover .play-overlay {
  opacity: 1;
}

.card-title {
  margin-top: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.details-page {
  background: #0b0c10;
  overflow-x: hidden;
}

.details-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 50px 50px;
}

.hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center top;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to left, rgba(11, 12, 16, 0) 0%, #0b0c10 60%),
              linear-gradient(to top, #0b0c10 10%, transparent 90%);
  z-index: 1;
}

.details-content-wrapper {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 120px 40px 50px;
  align-items: flex-start;
  transition: all 0.5s ease-in-out;
}

.player-side {
  flex: 1.6;
  order: 1;
  display: none;
  animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-100px); }
  to { opacity: 1; transform: translateX(0); }
}

.main-video-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  margin-bottom: 25px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 1000px;
  max-height: 70vh;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.main-video-box:fullscreen {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-video-box iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.info-side {
  flex: 1;
  order: 2;
  text-align: right;
  transition: all 0.5s ease;
}

.info-side.centered {
  text-align: center;
  margin: 0 auto;
  max-width: 900px;
}

.info-side.centered .logo-container {
  justify-content: center;
}

.info-side.centered .action-buttons {
  justify-content: center;
}

.info-side.centered .cast-list {
  justify-content: center;
}

.logo-container {
  margin-bottom: 20px;
  display: flex;
  justify-content: flex-start;
}

#series-logo {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
}

#title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.meta-info {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1.1rem;
  color: #ddd;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.meta-info .dot {
  color: var(--primary);
  font-size: 1.5rem;
}

.genres-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.genres-list span {
  font-weight: bold;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.9rem;
}

.story-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #ccc;
  margin-bottom: 30px;
  max-width: 700px;
}

.cast-list {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.cast-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 60px;
}

.cast-member img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  object-fit: cover;
  margin-bottom: 5px;
}

.cast-member span {
  font-size: 0.8rem;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.action-buttons {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.btn-watch-big {
  background: linear-gradient(45deg, #ff3d3d, #ff6b6b);
  color: white;
  padding: 15px 50px;
  border: none;
  border-radius: 50px;
  font-size: 1.3rem;
  font-weight: bold;
  font-family: "Cairo";
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(255, 61, 61, 0.3);
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-watch-big:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(255, 61, 61, 0.5);
}

.btn-trailer {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 15px 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  font-size: 1.1rem;
  font-family: "Cairo";
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-trailer:hover {
  background: white;
  color: black;
}

.episodes-box-container {
  background: #15161c;
  border-radius: 20px;
  padding: 25px;
  margin-top: 40px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.box-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  color: var(--primary);
}

.box-icon {
  font-size: 1.5rem;
}

.box-header h3 {
  font-size: 1.3rem;
  font-weight: bold;
  color: white;
  margin: 0;
}

.season-dropdown-wrapper {
  position: relative;
  margin-bottom: 20px;
  display: inline-block;
  width: 100%;
}

.season-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  width: 100%;
  justify-content: space-between;
  padding: 15px 25px;
  color: white;
  border-radius: 30px;
  font-size: 1.1rem;
  font-family: "Cairo";
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.season-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary);
}

.season-menu {
  position: absolute;
  top: 110%;
  right: 0;
  width: 100%;
  background: #15161c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
  display: none;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.season-menu.active {
  display: block;
}

.season-item {
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: 0.2s;
}

.season-item:hover {
  background: var(--primary);
}

.episodes-bar {
  margin-top: 10px;
}

.episodes-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.episodes-scroll::-webkit-scrollbar {
  height: 5px;
}

.episodes-scroll::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

.ep-number-btn {
  min-width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-weight: bold;
  font-size: 1.1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: 0.3s;
  flex-shrink: 0;
  flex: 0 0 auto;
  margin-bottom: 10px;
}

.ep-number-btn:hover {
  border-color: var(--primary);
}

.ep-number-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 5px 15px rgba(255, 61, 61, 0.4);
  transform: translateY(-3px);
}

.related-section {
  position: relative;
  z-index: 10;
  background: var(--bg-main);
  padding: 40px 0;
}

.related-section .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.hero-controls {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.auto-play-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

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

.auto-play-btn.active {
  background: var(--primary);
  border-color: var(--primary);
}

.auth-body {
  background: radial-gradient(circle at top left, var(--bg-secondary), var(--bg-main));
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'Cairo', sans-serif;
  background-color: #0b0c10;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  height: 100vh;
  color: white;
  overflow: hidden;
  transition: background-image 1s ease-in-out;
  animation: zoomBackground 20s infinite alternate ease-in-out;
}

@keyframes zoomBackground {
  0% { background-size: 100%; }
  100% { background-size: 110%; }
}

.auth-box {
  background: rgba(20, 20, 20, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  padding: 50px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  text-align: center;
  transition: transform 0.3s ease;
}

.auth-box:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.auth-box .logo {
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 10px;
  display: block;
  color: white;
  text-shadow: 0 0 20px rgba(255, 61, 61, 0.6);
}

.auth-box h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 30px;
  color: #ddd;
}

.input-group {
  position: relative;
  margin-bottom: 20px;
}

.auth-box input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: #fff;
  height: 55px;
  padding: 0 25px 0 55px;
  font-family: 'Cairo';
  font-size: 1rem;
  outline: none;
  transition: 0.3s;
  margin-bottom: 5px;
}

.auth-box input:focus {
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 15px rgba(255, 61, 61, 0.2);
}

.input-group i {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 1.1rem;
  transition: 0.3s;
}

.input-group input:focus + i {
  color: var(--primary);
}

.auth-btn {
  background: linear-gradient(45deg, #ff3d3d, #c0392b);
  color: white;
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 15px;
  font-family: 'Cairo';
  box-shadow: 0 10px 20px rgba(255, 61, 61, 0.3);
  transition: 0.3s;
}

.auth-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 30px rgba(255, 61, 61, 0.5);
}

.auth-btn:disabled {
  background: #555;
  transform: none;
  box-shadow: none;
}

.auth-link {
  margin-top: 25px;
  font-size: 0.95rem;
  color: #bbb;
}

.auth-link a {
  color: white;
  font-weight: bold;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,0.5);
  transition: 0.3s;
}

.auth-link a:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.msg-box {
  margin-top: 20px;
  padding: 12px;
  border-radius: 15px;
  font-size: 0.9rem;
  display: none;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
}

.msg-box.error {
  border: 1px solid #e74c3c;
  color: #ff6b6b;
}

.msg-box.success {
  border: 1px solid #2ecc71;
  color: #2ecc71;
}

.profile-header {
  background: rgba(31, 40, 51, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 30px;
  padding: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  gap: 40px;
  align-items: center;
}

.profile-img-container {
  width: 140px;
  height: 140px;
}

.profile-img {
  width: 100%;
  height: 100%;
  border: 4px solid var(--primary);
  box-shadow: 0 0 25px rgba(255, 61, 61, 0.3);
  transition: transform 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.02);
}

.user-info h2 {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 5px;
  background: linear-gradient(to left, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-info p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

#watchlist-grid .card {
  background: #15161c;
  border-radius: 15px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#watchlist-grid .poster-box {
  width: 100%;
  height: 250px;
  border-radius: 10px;
  overflow: hidden;
}

#watchlist-grid .poster-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.delete-btn {
  background: rgba(255, 61, 61, 0.15);
  color: #ff3d3d;
  border: 1px solid rgba(255, 61, 61, 0.3);
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  font-family: 'Cairo';
  font-size: 14px;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.delete-btn:hover {
  background: #ff3d3d;
  color: white;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 250px;
  height: 100vh;
  background: rgba(15, 17, 21, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  padding: 80px 20px 20px;
  gap: 20px;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  box-shadow: -5px 0 30px rgba(0,0,0,0.5);
  border-left: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  border-radius: 10px;
  transition: 0.3s;
}

.mobile-menu a:hover {
  background: rgba(255, 61, 61, 0.1);
  color: var(--primary);
  transform: translateX(-5px);
}

.mobile-menu a i {
  width: 25px;
  text-align: center;
  color: var(--primary);
}

.close-menu {
  margin-top: auto;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #ff3d3d;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Cairo';
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

@media (max-width: 1100px) {
  .details-content-wrapper {
    flex-direction: column;
  }
  
  .player-side,
  .info-side {
    width: 100%;
    order: unset;
  }
  
  .info-side.centered {
    max-width: 100%;
  }
  
  .hero-content {
    max-width: 500px;
    margin-left: 40px;
  }
  
  #hero-title {
    font-size: 3rem;
  }
}

@media (max-width: 1024px) {
  #main-header {
    width: 95%;
    padding: 10px 25px;
  }
  
  nav {
    gap: 15px;
  }
  
  nav a {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .search-box {
    min-width: 150px;
    padding: 6px 15px;
  }
}

@media (max-width: 900px) {
  .header-container {
    padding: 0 20px;
  }
  
  nav {
    gap: 15px;
  }
  
  nav a {
    font-size: 14px;
  }
  
  .search-box {
    margin-right: 10px;
    padding: 5px 12px;
  }
  
  .search-box input {
    width: 80px;
  }
  
  .hero {
    background-position: center center;
  }
  
  .hero-overlay {
    background: linear-gradient(to right, rgba(11, 12, 16, 0.9) 0%, rgba(11, 12, 16, 0.8) 50%, transparent 100%);
  }
  
  .hero-content {
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding: 20px;
  }
  
  #hero-title {
    text-align: center;
    font-size: 2.5rem;
  }
  
  #hero-desc {
    text-align: center;
  }
  
  #title {
    font-size: 2.5rem;
  }
  
  .hero-meta {
    justify-content: center;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-navigation {
    justify-content: center;
  }
  
  .details-content-wrapper {
    padding: 100px 20px 30px;
  }
  
  .grid-layout {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
  }
  
  .poster-box {
    height: 200px;
  }
  
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .header-container {
    padding: 0 15px;
  }
}

@media (max-width: 768px) {
  #main-header {
    width: 96%;
    padding: 8px 20px;
    border-radius: 40px;
    top: 0;
    border-radius: 0;
    width: 100%;
    padding: 10px;
  }
  
  .header-container {
    padding: 0 10px;
    justify-content: space-between;
  }
  
  nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(20, 22, 31, 0.95);
    padding: 10px 0;
    z-index: 2000;
    justify-content: space-around;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 0;
    backdrop-filter: blur(10px);
  }
  
  nav a {
    font-size: 10px;
    flex-direction: column;
    padding: 5px;
    border-radius: 10px;
    background: transparent;
  }
  
  body {
    padding-top: 80px;
  }
  
  .details-page {
    padding-top: 60px;
  }
  
  .hero-navigation {
    gap: 15px;
    margin-top: 20px;
  }
  
  .nav-btn {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  .indicator {
    width: 8px;
    height: 8px;
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 30px;
  }

  .user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .user-info h2 {
    font-size: 1.8rem;
  }

  .auth-box {
    padding: 30px 20px;
    width: 90%;
  }

  .auth-box h2 {
    font-size: 1.5rem;
  }

  #watchlist-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
  }

  #watchlist-grid .poster-box {
    height: 200px;
  }
}

@media (max-width: 600px) {
  .hero {
    height: 70vh;
  }
  
  .hero-content {
    padding-right: 15px;
  }
  
  #hero-title {
    font-size: 2rem;
  }
  
  #title {
    font-size: 2rem;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn-watch-big,
  .btn-trailer {
    width: 100%;
    justify-content: center;
  }
  
  .meta-info {
    flex-wrap: wrap;
  }
  
  .grid-layout {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .poster-box {
    height: 180px;
  }
  
  .container {
    padding: 0 20px;
  }
  
  .details-hero {
    padding: 80px 20px 30px;
  }
}

@media (max-width: 480px) {
  #main-header {
    width: 98%;
    padding: 6px 15px;
    border-radius: 30px;
    top: 10px;
  }
  
  .search-box {
    min-width: 100px;
  }
  
  .search-box input {
    width: 60px;
    font-size: 12px;
  }
  
  .logo {
    font-size: 18px;
  }
  
  .back-btn-top {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  body {
    padding-top: 70px;
  }
  
  .details-page {
    padding-top: 50px;
  }
  
  .hero-navigation {
    gap: 10px;
  }
  
  .nav-btn {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }
  
  .hero-indicators {
    gap: 8px;
  }
}

.server-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.server-btn {
    position: relative;
    background: rgba(31, 40, 51, 0.8);
    color: #e0e0e0;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.server-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.server-btn i {
    font-size: 1.1em;
    transition: 0.3s;
}

.server-btn:hover i {
    transform: scale(1.2);
}

.server-btn.active {
    background: var(--primary, #ff3d3d);
    border-color: var(--primary, #ff3d3d);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 61, 61, 0.4), 
                0 0 40px rgba(255, 61, 61, 0.2);
    transform: scale(1.05);
    font-weight: 700;
}

.server-btn.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transform: skewX(-20deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

@media (max-width: 600px) {
    .server-controls {
        gap: 8px;
        padding: 5px;
    }

    .server-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
        flex: 1 1 auto;
        justify-content: center;
    }
}

#search-suggestions {
    position: absolute;
    top: 55px;
    right: 0;
    width: 350px;
    background: rgba(15, 16, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    z-index: 9999;
    overflow: hidden;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

#search-suggestions.active {
    display: block;
    animation: slideDown 0.3s ease;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
}

.suggestion-item:hover, 
.suggestion-item.active-focus {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--primary);
}

.suggestion-poster {
    width: 45px;
    height: 65px;
    border-radius: 8px;
    object-fit: cover;
    background: #222;
}

.suggestion-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.suggestion-title {
    color: white;
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.suggestion-meta {
    color: #aaa;
    font-size: 0.8rem;
    display: flex;
    gap: 10px;
}

.suggestion-rating {
    color: #f1c40f;
}

.history-header {
    padding: 10px 15px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: bold;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clear-history {
    cursor: pointer;
    color: #aaa;
    font-size: 0.75rem;
}

.clear-history:hover {
  color: #fff;
}

.slider-container {
    position: relative;
    margin-bottom: 50px;
    padding: 10px 0;
}

.horizontal-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 5px 30px 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll .card {
    min-width: 170px;
    max-width: 170px;
    flex: 0 0 auto;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background: var(--bg-secondary);
    position: relative;
}

.horizontal-scroll .card:hover {
    transform: scale(1.08) translateY(-10px);
    box-shadow: 0 10px 10px rgba(255, 61, 61, 0.4),
                0 5px 10px rgba(0,0,0,0.3);
    z-index: 10;
}

.horizontal-scroll .poster-box {
    height: 250px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}


.horizontal-scroll .card-title {
    position: absolute; 
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 10px 10px; 
    font-weight: bold;
    font-size: 0.95rem;
    color: white;
    z-index: 5;
    text-align: center;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    box-sizing: border-box;
}

.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(31, 40, 51, 0.95);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    z-index: 20;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.slider-container:hover .slider-nav-btn {
    opacity: 1;
}

.slider-nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 61, 61, 0.5);
}

.nav-right { right: -10px; }
.nav-left { left: -10px; }

@media (max-width: 768px) {
    .slider-nav-btn { display: none; }
    .horizontal-scroll { gap: 10px; padding: 10px 5px 20px 5px; }
    .horizontal-scroll .card { min-width: 140px; max-width: 140px; border-radius: 8px; }
    .horizontal-scroll .poster-box { height: 200px; }
    .horizontal-scroll .card:hover { transform: scale(1.02); box-shadow: none; }
}

.controls-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    padding: 0 5px;
}

.btn-glow {
    position: relative;
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.btn-glow i {
    font-size: 1.1rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.btn-glow:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(255, 61, 61, 0.4);
    transform: translateY(-3px);
}

.btn-glow:hover i {
    color: white;
    transform: scale(1.2);
}

.btn-glow:active {
    transform: scale(0.95);
    box-shadow: 0 0 10px rgba(255, 61, 61, 0.2);
}

@media (max-width: 768px) {
    .controls-container {
        justify-content: center;
    }
    .btn-glow {
        width: 100%;
        justify-content: center;
    }
}

.btn-secondary.in-list,
.btn-trailer.in-list,
button.in-list { 
    background-color: #27ae60 !important;
    border-color: #27ae60 !important;
    color: white !important;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(39, 174, 96, 0.4);
}

.btn-secondary.in-list:active,
.btn-trailer.in-list:active {
    transform: scale(0.95);
}

.in-list i {
    margin-left: 5px;
}

.profile-wrapper {
    margin-top: 100px;
    min-height: 80vh;
}

.profile-dashboard {
    background: #15161c;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 50px;
}

.dashboard-cover {
    height: 180px;
    background: linear-gradient(135deg, var(--primary) 0%, #15161c 90%);
    opacity: 0.8;
    position: relative;
}

.dashboard-content {
    display: flex;
    align-items: flex-end;
    padding: 0 40px 30px;
    margin-top: -60px;
    gap: 30px;
    flex-wrap: wrap;
}

.avatar-container {
    position: relative;
    flex-shrink: 0;
}

.avatar-frame {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    padding: 5px;
    background: #15161c;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: #333;
}

.avatar-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    opacity: 0;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.5rem;
}

.avatar-frame:hover .avatar-overlay {
    opacity: 1;
}

.user-data-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 65px;
}

.names-box h1 {
    font-size: 2.2rem;
    margin: 0;
    color: #fff;
    font-weight: 800;
}

.email-tag {
    color: var(--text-muted);
    font-size: 1rem;
    background: rgba(255,255,255,0.05);
    padding: 2px 10px;
    border-radius: 10px;
}

.stats-row {
    display: flex;
    gap: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: #888;
}

.dashboard-actions {
    padding-top: 70px;
}

.btn-logout {
    background: rgba(255, 61, 61, 0.1);
    color: #ff3d3d;
    border: 1px solid rgba(255, 61, 61, 0.3);
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Cairo';
    font-weight: bold;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-logout:hover {
    background: #ff3d3d;
    color: white;
}

.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-group h2 {
    font-size: 1.5rem;
    margin: 0;
}

.title-group .icon {
    color: var(--primary);
    font-size: 1.2rem;
}

.btn-clear-all {
    background: transparent;
    color: #aaa;
    border: none;
    cursor: pointer;
    font-family: 'Cairo';
    font-size: 0.9rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-clear-all:hover {
    color: #ff3d3d;
}

.card-actions-float {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 8px;
    z-index: 20;
    opacity: 0;
    transition: 0.3s;
}

.card:hover .card-actions-float {
    opacity: 1;
}

.action-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}

.action-btn:hover {
    transform: scale(1.1);
}

.delete-btn {
    background: rgba(255, 61, 61, 0.9);
}

.check-btn {
    background: rgba(39, 174, 96, 0.9);
}

.finished-card .poster-box {
    filter: grayscale(0.5);
    transition: 0.3s;
}

.finished-card:hover .poster-box {
    filter: grayscale(0);
}

#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-main);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    --path: #fff;
    --dot: var(--primary);
    --duration: 3s;
    width: 44px;
    height: 44px;
    position: relative;
    display: inline-block;
    margin: 0 16px;
}

.loader:before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    position: absolute;
    display: block;
    background: var(--dot);
    top: 37px;
    left: 19px;
    transform: translate(-18px, -18px);
    animation: dotRect var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
}

.loader svg {
    display: block;
    width: 100%;
    height: 100%;
}

.loader svg rect, .loader svg polygon, .loader svg circle {
    fill: none;
    stroke: var(--path);
    stroke-width: 10px;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.loader svg polygon {
    stroke-dasharray: 145 76 145 76;
    stroke-dashoffset: 0;
    animation: pathTriangle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
}

.loader svg rect {
    stroke-dasharray: 192 64 192 64;
    stroke-dashoffset: 0;
    animation: pathRect 3s cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
}

.loader svg circle {
    stroke-dasharray: 150 50 150 50;
    stroke-dashoffset: 75;
    animation: pathCircle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
}

.loader.triangle {
    width: 48px;
}

.loader.triangle:before {
    left: 21px;
    transform: translate(-10px, -18px);
    animation: dotTriangle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
}

@keyframes pathTriangle {
    33% { stroke-dashoffset: 74; }
    66% { stroke-dashoffset: 147; }
    100% { stroke-dashoffset: 221; }
}

@keyframes dotTriangle {
    33% { transform: translate(0, 0); }
    66% { transform: translate(10px, -18px); }
    100% { transform: translate(-10px, -18px); }
}

@keyframes pathRect {
    25% { stroke-dashoffset: 64; }
    50% { stroke-dashoffset: 128; }
    75% { stroke-dashoffset: 192; }
    100% { stroke-dashoffset: 256; }
}

@keyframes dotRect {
    25% { transform: translate(0, 0); }
    50% { transform: translate(18px, -18px); }
    75% { transform: translate(0, -36px); }
    100% { transform: translate(-18px, -18px); }
}

@keyframes pathCircle {
    25% { stroke-dashoffset: 125; }
    50% { stroke-dashoffset: 175; }
    75% { stroke-dashoffset: 225; }
    100% { stroke-dashoffset: 275; }
}

.special-link {
    color: #ff79c6 !important;
    font-weight: bold;
}

.desktop-nav a.active,
.mobile-menu a.active {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    padding: 6px 18px;
    border-radius: 50px;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.6);
    display: inline-block;
}

a.special-link.active {
    color: #ffffff !important;
}

.player-preferences {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pref-item {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.pref-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.pref-item i {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pref-item select {
    background: transparent;
    border: none;
    color: white;
    padding: 10px 5px;
    font-family: 'Cairo';
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    min-width: 120px;
}

.pref-item select option {
    background: #15161c;
    color: white;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 20px;
    border: 2px solid var(--bg-main);
}

::-webkit-scrollbar-thumb:hover {
    background-color: #ff1f1f;
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-main);
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #15161c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    padding: 25px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: 0.3s;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.modal-header h3 { margin: 0; color: white; }
.modal-header button {
    background: none; border: none; color: #aaa;
    font-size: 1.5rem; cursor: pointer;
}
.modal-header button:hover { color: var(--primary); }

.avatar-grid-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

.avatar-option {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: 0.2s;
    object-fit: cover;
}

.avatar-option:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.avatar-option.selected {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary);
}


/* نيون أخضر مخصص للسجل */
.history-card::after {
    background: conic-gradient(from var(--angle), transparent 70%, #2ecc71) !important;
}

#history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 25px;
    overflow: visible !important;
}


/* =========================================
   🎨 تصميم مشغل الفيديو المخصص (UBB-A Plyr)
   ========================================= */

/* 1. المتغيرات الأساسية (تغيير اللون والخط) */
:root {
  --plyr-color-main: #ff3d3d; /* لون الموقع الأساسي */
  --plyr-video-control-color: #ffffff;
  --plyr-video-control-color-hover: #ff3d3d;
  --plyr-menu-background: rgba(21, 22, 28, 0.95);
  --plyr-menu-color: #ffffff;
  --plyr-menu-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --plyr-font-family: 'Cairo', sans-serif;
  --plyr-range-track-height: 6px;
  --plyr-range-thumb-height: 14px;
  --plyr-range-thumb-active-shadow-width: 0px;
}

/* 2. حاوية المشغل */
.plyr {
  font-family: 'Cairo', sans-serif !important;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* 3. شريط التحكم (Control Bar) - جعله عائماً وشفافاً */
.plyr__controls {
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%) !important;
  padding-bottom: 25px !important;
  padding-top: 40px !important;
}

/* 4. زر التشغيل الكبير في المنتصف */
.plyr__control--overlaid {
  background: rgba(255, 61, 61, 0.9) !important;
  box-shadow: 0 0 30px rgba(255, 61, 61, 0.4);
  transform: scale(1);
  transition: .3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.plyr__control--overlaid:hover {
  transform: scale(1.1) !important;
  background: #fff !important;
  color: #ff3d3d !important;
}

.plyr__control--overlaid svg {
  width: 35px; 
  height: 35px;
}

/* 5. شريط التقدم (Seek Bar) */
.plyr__progress input[type=range], 
.plyr__volume input[type=range] {
  cursor: pointer;
}

/* تأثير التوهج للشريط */
.plyr--full-ui input[type=range] {
  color: var(--plyr-color-main) !important;
  filter: drop-shadow(0 0 5px rgba(255, 61, 61, 0.6));
}

/* 6. القوائم (الإعدادات والجودة) */
.plyr__menu__container {
  background: var(--plyr-menu-background) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px !important;
  border: 1px solid rgba(255,255,255,0.1);
  direction: rtl; /* تعريب القائمة */
  text-align: right;
}

.plyr__menu__container button.plyr__control {
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 14px;
}

.plyr__menu__container button.plyr__control:hover {
  background: rgba(255, 61, 61, 0.2) !important;
  color: var(--plyr-color-main) !important;
}

/* علامة الاختيار داخل القائمة */
.plyr__menu__container button.plyr__control[aria-checked=true] span {
  background: var(--plyr-color-main);
  box-shadow: 0 0 10px var(--plyr-color-main);
}

/* 7. الأزرار السفلية */
.plyr__controls .plyr__control:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--plyr-color-main) !important;
}

/* 8. إضافة لوجو الموقع (Watermark) */
.plyr::after {
  content: 'UBB-A';
  position: absolute;
  top: 20px;
  left: 20px; /* يسار عشان العربية */
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.3);
  font-size: 18px;
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* تحسينات الموبايل */
@media (max-width: 768px) {
  .plyr__control--overlaid {
    width: 50px;
    height: 50px;
  }
}


