* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #06101c;
  --panel: #0c1a2e;
  --text: #f4f8ff;
  --muted: #aec0da;
  --brand: #5fa2ff;
  --line: rgba(255,255,255,0.08);
}

html, body {
  font-family: Inter, sans-serif;
  background: #06101c;
  color: var(--text);
  overflow-x: hidden;
}

/* Layout */
#app {
  padding: 16px;
}

.container {
  max-width: 1200px;
  margin: auto;
}

.panel {
  background: var(--panel);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid var(--line);
}

/* Top */
.topbar,
.viewer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.top-actions {
  display: flex;
  gap: 10px;
}

/* Text */
.hero-title {
  font-size: 48px;
  margin: 16px 0;
}

.hero-copy,
.subcopy,
.meta {
  color: var(--muted);
  line-height: 1.6;
}

/* Buttons */
.btn {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--brand);
  border: none;
  font-weight: bold;
  cursor: pointer;
}

.btn.secondary {
  background: #1a2f4a;
  color: white;
}

.icon-btn {
  padding: 10px;
  background: #1a2f4a;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

/* Builder */
.builder-card,
.viewer-card,
.about-card {
  margin-top: 20px;
  padding: 20px;
  border-radius: 16px;
  background: #0e1d33;
}

/* Inputs */
.link-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-row {
  display: flex;
  gap: 10px;
}

.link-input {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #081423;
  color: white;
}

.delete-btn {
  width: 50px;
}

/* Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.video-card {
  border-radius: 12px;
  overflow: hidden;
  background: black;
}

.frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.frame iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Mobile Responsive */

@media (max-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar,
  .viewer-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }

  .top-actions,
  .link-row {
    flex-direction: column;
    width: 100%;
  }

  .btn,
  .icon-btn,
  .delete-btn {
    width: 100%;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 28px;
  }

  .panel,
  .builder-card,
  .viewer-card {
    padding: 14px;
  }

  .btn {
    padding: 10px;
  }
}


.menu-popup {
  position: absolute;
  min-width: 200px;
  background: #0e1d33;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  padding: 8px;
  z-index: 9999;
}

.menu-item {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #f4f8ff;
  border: none;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
}

.menu-item:hover {
  background: rgba(255,255,255,0.06);
}