/* Root layout for index page only */

.index-body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #020617 0%, #000000 60%);
  color: #e5e7eb;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  box-sizing: border-box;
}

.index-container {
  width: 100%;
  max-width: 1120px;
}

/* Header */

.index-header h1 {
  font-size: 1.8rem;
  margin: 0 0 4px 0;
}

.index-subtitle {
  margin: 0 0 20px 0;
  font-size: 0.95rem;
  color: #9ca3af;
}

/* Grid */

.overlay-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 1024px) {
  .overlay-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .overlay-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Cards */

.overlay-card {
  background: radial-gradient(circle at top left, #020617, #020314);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.6);
  padding: 14px 14px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.overlay-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.overlay-title {
  font-size: 1rem;
  margin: 0;
}

.overlay-tag {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #9ca3af;
}

/* Previews */

.overlay-preview {
  border-radius: 12px;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(30, 64, 175, 0.45);
}

.overlay-preview-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

/* Scale down the overlay inside the iframe for preview */
.overlay-preview-inner iframe {
  position: absolute;
  inset: 0;
  width: 140%;
  height: 140%;
  border: none;
  transform-origin: top left;
  transform: scale(0.7);
  pointer-events: none; /* don’t capture clicks in preview */
}

/* Meta / actions */

.overlay-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.overlay-description {
  margin: 0;
  font-size: 0.82rem;
  color: #9ca3af;
}

.overlay-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(251, 113, 133, 0.6);
  background: linear-gradient(
    120deg,
    rgba(251, 113, 133, 0.2),
    rgba(129, 140, 248, 0.28)
  );
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  color: #f9fafb;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn-primary:hover {
  border-color: rgba(251, 113, 133, 0.9);
}

.overlay-url {
  font-size: 0.75rem;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.9);
  color: #9ca3af;
}
