* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(135deg, #1d3557, #e63946);
  color: #fff;
  font-family: Cairo, Tahoma, Arial, sans-serif;
}

body {
  padding: 20px;
}

.layout-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

.main-content {
  flex: 1 1 auto;
  min-width: 0;
}

.player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.site-watermark {
  position: absolute;
  top: clamp(10px, 3vw, 28px);
  right: clamp(10px, 4vw, 48px);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 118px;
  max-width: 190px;
  padding: 7px 12px;
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(97, 24, 155, 0.94), rgba(221, 20, 128, 0.94));
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  user-select: none;
}

.site-watermark strong {
  font-size: clamp(0.7rem, 1.1vw, 0.95rem);
  line-height: 1;
  white-space: nowrap;
}

.site-watermark-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
  background:
    radial-gradient(circle at center, transparent 36%, #fff 38% 48%, transparent 50%),
    conic-gradient(from 18deg, #fff 0 18%, transparent 18% 32%, #fff 32% 50%, transparent 50% 64%, #fff 64% 82%, transparent 82% 100%);
  flex: 0 0 auto;
}

.control-brand {
  position: absolute;
  right: clamp(12px, 3vw, 34px);
  bottom: clamp(34px, 5vw, 54px);
  z-index: 4;
  padding: 4px 9px;
  border-radius: 4px;
  background: rgba(221, 20, 128, 0.9);
  color: #fff;
  font-size: clamp(0.62rem, 0.9vw, 0.82rem);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.player-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
  font-weight: 700;
  line-height: 1.8;
}

.player-state:empty {
  display: none;
}

.player-state.error {
  background: radial-gradient(circle at center, rgba(31, 31, 42, 0.94), rgba(0, 0, 0, 0.72));
}

.player-error-box {
  width: min(460px, 92%);
  background: #202029;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.player-error-box strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.player-error-box span {
  color: #cfcfd7;
  font-size: 0.95rem;
}

.player-error-box a {
  display: block;
  margin-top: 22px;
  padding: 12px 20px;
  border-radius: 28px;
  background: #e63946;
  color: #fff;
  text-decoration: none;
}

.ad-sidebar {
  width: 100%;
  min-height: 100px;
  background: #222;
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.ad-sidebar a {
  width: 100%;
  min-height: 100%;
  padding: 14px;
  color: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.ad-title {
  font-size: 18px;
  font-weight: 800;
}

.ad-title.blue {
  color: #3b82f6;
}

.ad-title.red {
  color: #ef4444;
}

.ad-copy {
  color: #aaa;
  font-size: 12px;
}

.watch-news-section {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 18px;
}

.watch-news-title {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.watch-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.watch-news-card {
  overflow: hidden;
  border-radius: 8px;
  background: #202029;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.watch-news-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.watch-news-card div {
  padding: 12px;
}

.watch-news-card h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  line-height: 1.55;
}

.watch-news-card span {
  color: #aaa;
  font-size: 0.78rem;
}

@media (min-width: 992px) {
  .layout-wrapper {
    flex-direction: row;
    align-items: flex-start;
  }

  .ad-sidebar {
    width: 160px;
    min-height: 600px;
    flex: 0 0 160px;
  }
}

@media (max-width: 620px) {
  body {
    padding: 10px;
  }

  .player-container {
    border-radius: 6px;
  }

  .player-error-box {
    padding: 22px 16px;
  }
}
