* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #030810; font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif; }

#wrap { position: relative; width: 100%; height: 100%; }
canvas { display: block; width: 100%; height: 100%; }

/* Video chrome */
.chrome {
  position: absolute; inset: 0; pointer-events: none; z-index: 10;
  display: flex; flex-direction: column; justify-content: space-between;
}
.top-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 28px;
  background: linear-gradient(180deg, rgba(3,8,16,.85), transparent);
  pointer-events: auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: #e8eef7; font-weight: 700; font-size: 1.1rem; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: #22d3ee; box-shadow: 0 0 12px #22d3ee; animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.top-actions { display: flex; gap: 10px; }
.btn-icon {
  pointer-events: auto; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: #e8eef7; width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
  font-size: 1rem; backdrop-filter: blur(8px); transition: background .2s;
}
.btn-icon:hover { background: rgba(34,211,238,.2); border-color: #22d3ee; }

.overlay-text {
  text-align: center; padding: 0 24px 120px;
  opacity: 0; transform: translateY(20px);
  transition: opacity .8s, transform .8s;
}
.overlay-text.show { opacity: 1; transform: translateY(0); }
.overlay-text h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800; color: #fff;
  text-shadow: 0 0 40px rgba(34,211,238,.5);
  margin-bottom: 8px;
}
.overlay-text h1 span { color: #22d3ee; }
.overlay-text .tagline {
  color: #fff; font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 700;
  margin-bottom: 10px; text-shadow: 0 0 30px rgba(34,211,238,.4);
}
.overlay-text p { color: #8fa8c8; font-size: 1.05rem; margin-bottom: 20px; }
.cta {
  pointer-events: auto; display: inline-block;
  background: linear-gradient(135deg, #0891b2, #22d3ee);
  color: #041018; padding: 14px 36px; border-radius: 12px;
  font-weight: 700; text-decoration: none; font-size: 1rem;
  box-shadow: 0 8px 40px rgba(34,211,238,.4);
}

.bottom-bar {
  padding: 16px 28px 24px;
  background: linear-gradient(0deg, rgba(3,8,16,.9), transparent);
  pointer-events: auto;
}
.progress-wrap { display: flex; align-items: center; gap: 14px; }
.play-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #0891b2, #22d3ee); color: #041018;
  font-size: 1.1rem; flex-shrink: 0;
}
.progress-track {
  flex: 1; height: 5px; background: rgba(255,255,255,.12); border-radius: 3px; cursor: pointer;
  position: relative;
}
.progress-fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, #0891b2, #22d3ee);
  border-radius: 3px; transition: width .1s linear;
}
.time { color: #8fa8c8; font-size: .85rem; min-width: 90px; text-align: center; font-variant-numeric: tabular-nums; }

.subtitle {
  position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.6); backdrop-filter: blur(12px);
  padding: 10px 24px; border-radius: 999px; border: 1px solid rgba(34,211,238,.3);
  color: #22d3ee; font-size: .95rem; white-space: nowrap;
  opacity: 0; transition: opacity .5s; z-index: 11; pointer-events: none;
}
.subtitle.show { opacity: 1; }

/* Start screen */
#startScreen {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(8,145,178,.15), #030810 70%);
  cursor: pointer; transition: opacity .6s;
}
#startScreen.hidden { opacity: 0; pointer-events: none; visibility: hidden; display: none; }
.play-big {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, #0891b2, #22d3ee);
  display: grid; place-items: center; font-size: 2.5rem; color: #041018;
  box-shadow: 0 0 60px rgba(34,211,238,.5);
  margin-bottom: 24px; animation: glow 2s ease-in-out infinite;
}
@keyframes glow { 50% { box-shadow: 0 0 80px rgba(34,211,238,.8); transform: scale(1.05); } }
#startScreen h2 { color: #fff; font-size: 1.5rem; margin-bottom: 8px; }
#startScreen p { color: #8fa8c8; }

body.embedded .bottom-bar { padding-bottom: 12px; }
body.embedded .subtitle { bottom: 72px; }
body.embedded .endOverlay .cta { pointer-events: auto; }

/* Netflix-style cinema (inside OraxAdmin) */
body.cinema { background: #000; }
body.cinema .chrome { justify-content: flex-end; }
body.cinema .bottom-bar {
  padding: 0 36px 32px;
  background: linear-gradient(0deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.55) 55%, transparent);
}
body.cinema .progress-track { height: 3px; border-radius: 2px; }
body.cinema .progress-fill { background: #e50914; box-shadow: 0 0 12px rgba(229,9,20,.6); }
body.cinema .play-btn {
  width: 48px; height: 48px;
  background: rgba(255,255,255,.14);
  color: #fff; border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(10px);
}
body.cinema .play-btn:hover { background: rgba(255,255,255,.22); }
body.cinema .time { color: rgba(255,255,255,.75); font-size: .8rem; }
body.cinema .subtitle {
  bottom: 88px;
  background: rgba(0,0,0,.72);
  border: none;
  font-size: 1.05rem;
  padding: 12px 28px;
  border-radius: 4px;
}
body.cinema .overlay-text {
  padding-bottom: 140px;
}
body.cinema .overlay-text h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; }
body.cinema .overlay-text .tagline { font-size: clamp(1.4rem, 3.5vw, 2.2rem); }
body.cinema .cta {
  background: #e50914;
  color: #fff;
  border-radius: 4px;
  box-shadow: none;
  font-size: 1.05rem;
  padding: 16px 40px;
}
body.cinema .cta:hover { background: #f40612; }

body.chrome-hidden .bottom-bar,
body.chrome-hidden .subtitle {
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease;
}
body.cinema::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 4;
  box-shadow: inset 0 100px 140px -80px rgba(0,0,0,.75), inset 0 -100px 140px -80px rgba(0,0,0,.8);
}
