:root {
  --bg: #000000;
  --fg: #ffffff;
  --footer-outflow: 360px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow-y: auto;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.4;
}

.artboard {
  position: relative;
  width: 1440px;
  height: 1024px;
  margin: 32px auto;
}

.frame { position: absolute; }
.frame img { display: block; }

.badge {
  position: absolute;
  top: -1410px; /* moved up by additional 200px */
  left: 245px;
  width: 170px;
  height: 157px;
  z-index: 10;
}

.frame-01 { top: -1492px; left: 327px; width: 786px; height: 460px; } /* moved up by additional 200px */
.frame-01 > img { width: 786px; height: 460px; }
.frame-01 .video-placeholder {
  position: absolute;
  left: 1px;
  top: 18px;
  width: 783px;
  height: 440px;
  display: grid;
  place-items: center;
  background: #000;
}
.frame-01 .video-placeholder iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

.video-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.fallback-content {
  text-align: center;
  color: #fff;
}

.play-button {
  font-size: 48px;
  margin-bottom: 20px;
  color: #fff;
}

.fallback-content p {
  margin: 5px 0;
  font-size: 16px;
}

/* Video Adjustment Panel */
.video-adjustment-panel {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 20px;
  border-radius: 10px;
  z-index: 1000;
  min-width: 300px;
  font-family: monospace;
  pointer-events: auto;
}

.video-adjustment-panel h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
}

.adjustment-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.control-group label {
  min-width: 80px;
  font-size: 12px;
}

.control-group input[type="range"] {
  flex: 1;
  min-width: 100px;
  cursor: pointer;
  z-index: 1001;
  position: relative;
}

.control-group span {
  min-width: 50px;
  font-size: 12px;
  text-align: right;
}

.video-adjustment-panel button {
  background: #333;
  color: white;
  border: 1px solid #555;
  padding: 8px 12px;
  margin: 5px 5px 0 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.video-adjustment-panel button:hover {
  background: #555;
}

.show-panel-button {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: 1px solid #555;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  z-index: 999;
  pointer-events: auto;
}

.show-panel-button:hover {
  background: rgba(0, 0, 0, 0.9);
}

.frame-02 { top: -798px; left: 199px; width: 388px; height: 613px; } /* moved up by additional 200px */
.frame-02 > img { width: 388px; height: 613px; }
.copy-02 {
  position: absolute;
  left: 38px; right: 43px; top: 128px; bottom: 28px;
  color: #000;
  font-size: 12px; line-height: 1.5;
}

.frame-03 { top: -678px; left: 620px; width: 402px; height: 607px; } /* moved up by additional 200px */
.frame-03 > img { width: 402px; height: 607px; }
.copy-03 {
  position: absolute;
  left: 44px; right: 49px; top: 125px; bottom: 24px;
  color: #fff;
  font-size: 12px; line-height: 1.55;
}

.frame-04 { top: -278px; left: 955px; width: 167px; height: 159px; } /* moved up by additional 200px */
.frame-04 > img { width: 167px; height: 159px; }
.frame-04 > .anim {
  position: absolute;
  left: 2px; top: 22px;
  width: 163px; height: 130px;
  overflow: hidden;
}

.sparkles {
  position: absolute;
  top: -1576px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: auto;
  pointer-events: none;
  z-index: 1000;
}

.footer-buttons {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--footer-outflow) * -1 - 1558px); /* moved up by additional 200px */
  display: flex;
  gap: 26px;
}
.footer-buttons img { display: block; }

.below-footer-spacer { height: calc(var(--footer-outflow) + 0px); }

.viewport-940 {
  width: 1000px;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: visible;
  position: relative;
}
.viewport-940 .artboard {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 32px 0;
}

/* Mobile Responsiveness */
@media (max-width: 1000px) {
  .viewport-940 {
    width: 100%;
    padding: 0 20px;
  }
  
  .artboard {
    width: 100%;
    height: auto;
    min-height: 100vh;
    margin: 20px auto;
    transform: none;
    left: auto;
    position: relative;
  }
  
  .badge {
    position: relative;
    top: auto;
    left: auto;
    width: clamp(120px, 15vw, 170px);
    height: auto;
    margin: 20px auto 40px auto;
    display: block;
  }
  
  .frame-01 {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 786px;
    height: auto;
    margin: 0 auto;
  }
  
  .frame-01 > img {
    width: 100%;
    height: auto;
  }
  
  .frame-01 .video-placeholder {
    position: absolute;
    top: 4.5%;
    left: 0.5%;
    right: 0.5%;
    bottom: 4.5%;
    width: 99%;
    height: 91%;
  }
  
  .frame-02 {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 388px;
    height: auto;
    margin: 40px auto;
  }
  
  .frame-02 > img {
    width: 100%;
    height: auto;
  }
  
  .frame-03 {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 402px;
    height: auto;
    margin: 40px auto;
  }
  
  .frame-03 > img {
    width: 100%;
    height: auto;
  }
  
  .frame-04 {
    position: relative;
    top: auto;
    left: auto;
    width: clamp(120px, 15vw, 167px);
    height: auto;
    margin: 20px auto;
  }
  
  .frame-04 > img {
    width: 100%;
    height: auto;
  }
  
  .sparkles {
    position: relative;
    top: auto;
    left: auto;
    width: clamp(150px, 20vw, 220px);
    height: auto;
    margin: 20px auto;
    display: block;
  }
  
  .footer-buttons {
    position: relative;
    bottom: auto;
    margin-top: 60px;
    gap: clamp(15px, 3vw, 26px);
    justify-content: center;
    display: flex;
  }
  
  .footer-buttons img {
    width: clamp(40px, 8vw, 60px);
    height: auto;
  }
  
  .copy-02,
  .copy-03 {
    font-size: clamp(11px, 2.5vw, 12px);
    padding: 10px;
  }
}

@media (max-width: 768px) {
  .viewport-940 {
    padding: 0 15px;
  }
  
  .artboard {
    margin: 15px auto;
  }
  
  .frame-01 {
    max-width: 100%;
  }
  
  .frame-01 .video-placeholder {
    width: 100%;
    height: 56.25vw; /* 16:9 aspect ratio */
    position: relative;
    top: 0;
    left: 0;
    right: auto;
    bottom: auto;
  }
  
  .frame-01 .video-placeholder iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
  }
  
  .badge {
    margin: 20px auto 30px auto;
    order: -1; /* Move badge above video */
  }
  
  .copy-02,
  .copy-03 {
    font-size: clamp(13px, 3vw, 14px);
    line-height: 1.6;
  }
  
  .footer-buttons {
    justify-content: center;
    gap: 20px;
  }
  
  .footer-buttons img {
    width: 50px;
    height: auto;
  }
}
