@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700;900&display=swap');

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

:root {
  --bg: #050505;
  --bg-sidebar: #0a0a0a;
  --bg-card: #121212;
  --bg-hover: #1a1a1a;
  --text: #f0f0f0;
  --text-muted: #888;
  --border: #1f1f1f;
  --green: #12e06a;
  --cyan: #00d4ff;
  --blue: #3f61ff;
  --primary: #12e06a;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0,0,0,0.5);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
  font-family: 'Tajawal', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 30px 20px;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: block;
  box-shadow: 0 0 15px rgba(255,255,255,0.1);
}

.dot.green { background: var(--green); box-shadow: 0 0 15px rgba(18, 224, 106, 0.4); }
.dot.cyan { background: var(--cyan); box-shadow: 0 0 15px rgba(0, 212, 255, 0.4); }
.dot.blue { background: var(--blue); box-shadow: 0 0 15px rgba(63, 97, 255, 0.4); }

.logo-text {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 1px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px;
  margin-top: 20px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 1.1rem;
  transition: var(--transition);
}

.nav-link i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.nav-link:hover, .nav-link.active {
  background: var(--bg-hover);
  color: var(--text);
  transform: translateX(-5px);
}

.menu-toggle { display: none; }

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mobile-header {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
}

.mobile-header .logo {
  flex-direction: row;
  font-size: 1.5rem;
  gap: 8px;
}

.mobile-header .dot {
  width: 10px;
  height: 10px;
}

.mobile-header .menu-toggle {
  display: block;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

.main-inner {
  padding: 40px;
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

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

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header h2 i {
  color: var(--primary);
  font-size: 1.4rem;
}

.view-all {
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

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

/* Grids */
.latest-grid, .movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

/* Cards */
.latest-card, .movie-card {
  display: block;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid transparent;
  transition: var(--transition);
}

.latest-card:hover, .movie-card:hover {
  transform: translateY(-8px);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.latest-card-poster, .movie-card-poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
}

.latest-card-poster img, .movie-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.quality-badge, .quality-badge-sm {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  color: var(--green);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 900;
  z-index: 2;
  border: 1px solid rgba(18, 224, 106, 0.3);
}

.type-badge, .type-badge-card {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  color: var(--cyan);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 900;
  z-index: 2;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  z-index: 3;
}

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

.play-overlay i {
  font-size: 3rem;
  color: #fff;
  filter: drop-shadow(0 0 10px var(--primary));
  transform: scale(0.8);
  transition: var(--transition);
}

.latest-card:hover .play-overlay i, .movie-card:hover .play-overlay i {
  transform: scale(1);
}

.latest-card-info, .movie-card-info {
  padding: 15px;
}

.latest-card-info h3, .movie-card-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.latest-meta, .movie-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  gap: 10px;
}

/* Movie Details Page */
.movie-header {
  display: flex;
  gap: 40px;
  background: var(--bg-card);
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 40px;
}

.movie-poster-col {
  flex: 0 0 300px;
}

.movie-poster-main {
  width: 100%;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.movie-info-col {
  flex: 1;
}

.movie-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.2;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 25px;
}

.tag {
  background: rgba(255,255,255,0.05);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag i { color: var(--cyan); }
.tag-series i { color: var(--blue); }

.movie-info-line {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.info-label {
  color: var(--text);
  font-weight: 700;
  margin-left: 5px;
}

.story-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.story-section h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--green);
}

.story-section p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

/* Player */
.player-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 40px;
}

.player-tabs {
  display: flex;
  background: var(--bg-sidebar);
  padding: 10px;
  gap: 5px;
  overflow-x: auto;
}

.server-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.server-tab:hover {
  background: rgba(255,255,255,0.05);
}

.server-tab.active {
  background: var(--primary);
  color: #000;
}

.player-wrapper {
  position: relative;
  padding-top: 56.25%;
}

.player-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}



/* Series Seasons & Episodes */
.series-section {
  background: var(--bg-card);
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 40px;
}

.seasons-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.season-tab {
  background: var(--bg-sidebar);
  color: var(--text-light);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

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

.season-tab.active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
  font-weight: 700;
}

.episodes-grid {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
}

.episodes-grid.active {
  display: grid;
}

.episode-card {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  text-align: center;
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.episode-card:hover {
  background: var(--hover);
  border-color: var(--primary);
  transform: translateY(-3px);
}

.episode-card.current {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.ep-num {
  font-weight: 700;
  font-size: 1.1rem;
}

.ep-playing {
  font-size: 0.8rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Downloads */
.downloads-section {
  background: var(--bg-card);
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 40px;
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.download-card {
  display: flex;
  align-items: center;
  background: var(--bg-sidebar);
  padding: 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  gap: 15px;
}

.download-card:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
}

.dq {
  background: var(--blue);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-weight: 900;
  font-size: 0.9rem;
}

.dl { flex: 1; font-weight: 700; }
.dicon { color: var(--blue); }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 40px;
}

.page-link {
  background: var(--bg-card);
  padding: 12px 25px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.page-link:hover {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* Responsive */
@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    transform: translateX(100%);
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .mobile-header { display: flex; }
  .main-inner { padding: 20px; }
  .movie-header { flex-direction: column; }
  .movie-poster-col { flex: 0 0 auto; max-width: 250px; margin: 0 auto; }
}

/* Search Page Styles */
.search-form {
  display: flex;
  gap: 15px;
  max-width: 800px;
  margin: 0 auto 40px;
  background: var(--bg-card);
  padding: 15px;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.05);
}

.search-form input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 15px 25px;
  font-size: 1.2rem;
  color: var(--text);
  outline: none;
  font-family: inherit;
}

.search-form input::placeholder {
  color: var(--text-muted);
}

.search-form button {
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #000;
  border: none;
  padding: 15px 35px;
  border-radius: 40px;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-form button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(18, 224, 106, 0.4);
}

.search-result-count {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1.2rem;
  font-weight: 700;
}

.no-results {
  text-align: center;
  padding: 100px 20px;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-top: 30px;
  border: 1px dashed var(--border);
}

.no-results i {
  font-size: 5rem;
  color: var(--border);
  margin-bottom: 25px;
}

.no-results p {
  font-size: 1.5rem;
  font-weight: 700;
}

.page-header h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 30px;
  background: -webkit-linear-gradient(45deg, var(--green), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Matches List */
.matches-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.match-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.match-card:hover {
  transform: translateY(-5px);
  border-color: var(--cyan);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.match-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; width: 5px; height: 100%;
}

.match-card.live::before { background: var(--red); box-shadow: 0 0 10px var(--red); }
.match-card.soon::before { background: var(--green); }
.match-card.ended::before { background: var(--text-muted); }

.match-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 25px;
}

.match-teams {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.team img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
}

.team-name {
  font-weight: 900;
  font-size: 1.2rem;
  text-align: center;
}

.match-info-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.match-vs {
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(255,255,255,0.1);
  letter-spacing: 5px;
}

.match-time {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--cyan);
}

.match-status-badge {
  background: rgba(255,255,255,0.1);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
}

.match-card.live .match-status-badge {
  background: rgba(255,0,0,0.2);
  color: var(--red);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.match-details {
  display: flex;
  justify-content: center;
  gap: 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-item i {
  color: var(--cyan);
}

/* Single Match Page */
.match-player-section {
  max-width: 1000px;
  margin: 0 auto;
}

.match-header {
  text-align: center;
  margin-bottom: 30px;
}

.match-header h1 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.match-meta {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.match-meta .badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
}

.match-meta .badge i { color: var(--cyan); margin-left: 5px; }

.player-container-wrapper {
  background: #000;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.video-responsive {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-responsive iframe {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}

.match-teams-large {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 40px;
}

.team-large {
  text-align: center;
}

.team-large img {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.vs-large {
  font-size: 4rem;
  font-weight: 900;
  color: rgba(255,255,255,0.05);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .match-teams { flex-direction: column; gap: 20px; }
  .match-vs { display: none; }
  .match-time { margin: 10px 0; }
  .match-teams-large { flex-direction: column; gap: 30px; padding: 20px; }
  .vs-large { font-size: 2rem; margin: 10px 0; }
}
