/* ==========================================================================
   MAHMOUD SHOUKRY — WEB DEVELOPER (CHOREOGRAPHED MOTION VIDEO)
   High-End Sequential Motion Design, Balanced Visual Composition
   ========================================================================== */

:root {
  --bg-deep: #050811;
  --bg-card: rgba(10, 15, 29, 0.85);
  --primary-cyan: #00f2fe;
  --primary-blue: #38bdf8;
  --accent-purple: #9d4edd;
  --accent-gold: #fbbf24;
  --accent-rose: #f43f5e;
  --text-white: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-subtle: rgba(255, 255, 255, 0.12);
  --glow-cyan: 0 0 35px rgba(0, 242, 254, 0.45);
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Fira Code', monospace;
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-white);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Backdrop Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

.glow-cyan {
  top: -15%;
  left: 12%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #0284c7 0%, #00f2fe 50%, transparent 80%);
}

.glow-purple {
  bottom: -15%;
  right: 12%;
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, #7c3aed 0%, #9d4edd 50%, transparent 80%);
}

/* Main Wrapper */
.player-container {
  width: 100%;
  max-width: 1060px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 10;
}

/* Header */
.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  flex-wrap: wrap;
  gap: 12px;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.28);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary-cyan);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-cyan);
}

.header-center {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.dev-name { color: #fff; }
.slash { color: var(--accent-gold); margin: 0 4px; }
.dev-title { color: var(--primary-cyan); font-weight: 600; }

.header-tags {
  display: flex;
  gap: 8px;
}

.tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* ==========================================================================
   VIDEO STAGE (16:9 CINEMA ASPECT)
   ========================================================================== */
.video-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #060912;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 242, 254, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.stage-screen {
  position: relative;
  width: 100%;
  flex: 1;
  overflow: hidden;
  background: radial-gradient(circle at center, #0e162c 0%, #060912 90%);
}

/* Particle FX Canvas */
.fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Watermark HUD */
.scene-hud {
  position: absolute;
  top: 18px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(8, 12, 24, 0.85);
  border: 1px solid rgba(0, 242, 254, 0.3);
  backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-cyan);
  z-index: 40;
}

.hud-dot {
  width: 6px;
  height: 6px;
  background: var(--primary-cyan);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--primary-cyan);
}

/* Scene Layers Base */
.scene-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8%;
  opacity: 0;
  visibility: hidden;
  z-index: 10;
}

/* Eyebrow Label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

/* ==========================================================================
   SCENE 1: THE WORKSTATION (0.0s - 3.5s)
   Clean Ambient Desk + Flying Robot Actor
   ========================================================================== */
.scene-1 {
  padding: 0;
  overflow: hidden;
}

.desk-bg-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.desk-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: brightness(0.85) contrast(1.1);
}

.desk-gradient-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 35%, rgba(5, 8, 18, 0.85) 100%);
}

.robot-actor {
  position: absolute;
  top: 25%;
  right: 18%;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 15;
}

.robot-avatar {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--primary-cyan), var(--accent-purple));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), var(--glow-cyan);
}

.robot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.robot-glow-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed rgba(0, 242, 254, 0.6);
  animation: spinRing 12s linear infinite;
}

@keyframes spinRing {
  100% { transform: rotate(360deg); }
}

.robot-speech {
  margin-top: 14px;
  background: rgba(10, 15, 29, 0.94);
  border: 2px solid var(--primary-cyan);
  border-radius: 18px;
  padding: 12px 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), var(--glow-cyan);
  backdrop-filter: blur(12px);
  max-width: 380px;
  text-align: center;
}

.speech-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-cyan);
  margin-bottom: 4px;
}

.speech-quote {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

/* ==========================================================================
   SCENE 2: MAHMOUD SHOUKRY REVEAL (3.5s - 7.5s)
   Sequential Staggered Hero Name
   ========================================================================== */
.hero-character-box {
  width: 36%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.char-frame {
  position: relative;
  width: 250px;
  height: 320px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(0, 242, 254, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), var(--glow-cyan);
  background: #080d1a;
}

.char-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.char-scan-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #00f2fe, #f43f5e, transparent);
  box-shadow: 0 0 15px #00f2fe;
  animation: scanLaser 2.2s infinite ease-in-out alternate;
}

@keyframes scanLaser {
  0% { top: 5%; opacity: 0.3; }
  100% { top: 92%; opacity: 1; }
}

.char-badge {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  background: rgba(10, 15, 29, 0.9);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}

.hero-typography {
  width: 58%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-name-split {
  font-family: var(--font-display);
  font-size: 4.8rem;
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.04em;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.name-chunk#s2WordMahmoud {
  color: #ffffff;
  text-shadow: 0 4px 25px rgba(255, 255, 255, 0.35);
}

.name-chunk#s2WordShoukry {
  background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 28px rgba(157, 78, 221, 0.6));
}

.hero-dialogue-bubble {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 242, 254, 0.35);
  padding: 10px 20px;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  max-width: 480px;
}

.dialogue-icon { font-size: 1.4rem; }
.dialogue-text {
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.4;
}

/* ==========================================================================
   SCENE 3: THE ROLE "WEB DEVELOPER" (7.5s - 11.5s)
   Balanced Vertical Layout Filling The Empty Bottom Half!
   ========================================================================== */
.scene-3 {
  justify-content: center;
  align-items: center;
}

.role-centered-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 780px;
  height: 100%;
}

.role-title-main {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 34px;
}

.word-web {
  color: #ffffff;
  text-shadow: 0 0 35px rgba(255, 255, 255, 0.6);
}

.word-dev {
  background: linear-gradient(90deg, #00f2fe, #38bdf8, #c084fc, #f43f5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 35px rgba(0, 242, 254, 0.7));
  letter-spacing: 0.02em;
}

/* Feature Pills - Filling the entire bottom half with balance */
.feature-pills-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.feature-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(13, 19, 36, 0.88);
  border: 1px solid var(--border-subtle);
  padding: 12px 22px;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 242, 254, 0.1);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: #e2e8f0;
  transition: transform 0.3s ease;
}

.feature-pill:nth-child(1) { border-color: rgba(0, 242, 254, 0.4); color: #a5f3fc; }
.feature-pill:nth-child(2) { border-color: rgba(168, 85, 247, 0.4); color: #e9d5ff; }
.feature-pill:nth-child(3) { border-color: rgba(251, 191, 36, 0.4); color: #fef08a; }

.pill-icon { font-size: 1.25rem; }

/* ==========================================================================
   SCENE 4: GRAND FINALE SHOWCASE (11.5s - 15.0s)
   Clean, Uncluttered VIP Showcase Card
   ========================================================================== */
.scene-4 {
  justify-content: center;
  align-items: center;
}

.finale-card {
  position: relative;
  background: rgba(11, 16, 32, 0.94);
  border: 1px solid rgba(0, 242, 254, 0.45);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), var(--glow-cyan);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 36px 48px;
  text-align: center;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 15;
}

.avatar-ring {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--primary-cyan), var(--accent-purple));
  margin-bottom: 14px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
}

.verified-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #0284c7;
  color: #fff;
  border: 2px solid #080c18;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
}

.finale-super-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #00f2fe 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
  line-height: 1.1;
}

.finale-sub-role {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-cyan);
  letter-spacing: 0.15em;
  margin-bottom: 14px;
}

.finale-slogan {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.btn-replay-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary-cyan), #0284c7);
  color: #040813;
  border: none;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 12px 28px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 242, 254, 0.4);
  transition: all 0.25s ease;
}

.btn-replay-action:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 26px rgba(0, 242, 254, 0.6);
}

.btn-replay-action:active {
  transform: translateY(0) scale(0.98);
}

/* ==========================================================================
   VIDEO CONTROLS BAR
   ========================================================================== */
.player-controls {
  background: rgba(8, 12, 24, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  padding: 8px 18px 12px;
  z-index: 40;
}

/* Progress Scrubber */
.progress-bar-wrap {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: height 0.2s ease;
}

.progress-bar-wrap:hover {
  height: 10px;
}

.progress-track {
  position: absolute;
  inset: 0;
  border-radius: 3px;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f2fe, #38bdf8, #9d4edd);
  border-radius: 3px;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.8);
}

.progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border: 2px solid var(--primary-cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.8);
  transition: transform 0.15s ease;
  pointer-events: none;
}

.progress-bar-wrap:hover .progress-thumb {
  transform: translate(-50%, -50%) scale(1);
}

.chapter-pip {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 10px;
  background: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

/* Controls Row */
.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ctrl-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ctrl-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.08);
}

.ctrl-btn:active {
  transform: scale(0.95);
}

.play-btn {
  background: rgba(0, 242, 254, 0.15);
  color: var(--primary-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.play-btn:hover {
  background: rgba(0, 242, 254, 0.3);
  color: #fff;
}

.svg-icon {
  width: 20px;
  height: 20px;
}

.hidden {
  display: none !important;
}

.time-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
}

.time-label span:first-child {
  color: #fff;
  font-weight: 700;
}

.time-div { margin: 0 3px; }

.scene-status-ticker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--primary-cyan);
}

.speed-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  width: auto;
  padding: 0 8px;
}

/* Scene Quick Nav */
.scene-quick-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px 0;
}

.nav-legend {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
  font-weight: 700;
  margin-right: 4px;
}

.nav-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: #fff;
  background: rgba(30, 41, 59, 0.9);
}

.nav-btn.active {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--primary-cyan);
  color: #fff;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 860px) {
  .hero-name-split { font-size: 3.4rem; }
  .role-title-main { font-size: 3.6rem; }
  .ctrl-group.center { display: none; }
  .char-frame { width: 190px; height: 250px; }
}

@media (max-width: 600px) {
  .scene-layer { flex-direction: column; justify-content: center; text-align: center; }
  .hero-character-box, .hero-typography { width: 100%; align-items: center; }
  .hero-character-box { display: none; }
  .hero-name-split { font-size: 2.3rem; }
  .role-title-main { font-size: 2.6rem; }
  .finale-super-title { font-size: 2rem; }
  .feature-pill { width: 100%; justify-content: center; }
}
