:root {
  --bg: #0b0d12;
  --surface: #14171f;
  --surface-2: #1c2029;
  --border: #262b36;
  --text: #e6e8ee;
  --muted: #8a90a0;
  --accent: #ff3d7f;
  --accent-2: #7c5cff;
  --radius: 16px;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.hero {
  padding: 56px 24px 40px;
  background: radial-gradient(1200px 400px at 80% -10%, rgba(124, 92, 255, 0.25), transparent 60%),
    radial-gradient(900px 400px at 0% 0%, rgba(255, 61, 127, 0.18), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-block;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255, 61, 127, 0.08);
  border: 1px solid rgba(255, 61, 127, 0.25);
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  background: linear-gradient(135deg, #fff, #b9bdcb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin-top: 10px;
  font-size: 16px;
  color: var(--muted);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.grid-head {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.muted { color: var(--muted); font-size: 14px; }

/* ===== Buttons ===== */
.btn {
  padding: 12px 22px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 24px rgba(255, 61, 127, 0.25);
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.add-btn {
  padding: 14px 24px;
  font-size: 15px;
}

/* ===== Embed grid ===== */
.embed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
  align-items: start;
}

.reel-item {
  position: relative;
  border-radius: var(--radius);
  overflow: visible;
}

.reel-item blockquote.instagram-media {
  max-width: 100% !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.reel-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
}

.reel-item:hover .reel-delete { opacity: 1; }

.reel-delete:hover {
  background: #d63d52;
  transform: scale(1.08);
}

/* ===== Error ===== */
.error {
  padding: 16px 18px;
  border: 1px solid rgba(255, 80, 80, 0.4);
  background: rgba(255, 80, 80, 0.08);
  color: #ffb4b4;
  border-radius: 12px;
  font-size: 14px;
  margin-top: 20px;
}
.hidden { display: none !important; }

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.18s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  animation: slideUp 0.22s ease;
}

@keyframes slideUp {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
}
.modal-close:hover {
  background: var(--bg);
  color: var(--text);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.modal-form input {
  width: 100%;
  padding: 13px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s ease;
}
.modal-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.status {
  margin-top: 10px;
  font-size: 13px;
  min-height: 18px;
}
.status.ok { color: #7ee0a8; }
.status.err { color: #ffb4b4; }

.coming-soon {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px;
}
.coming-inner {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.eyebrow.soon {
  color: var(--accent-2);
  background: rgba(124, 92, 255, 0.08);
  border-color: rgba(124, 92, 255, 0.25);
}
.coming-inner h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 6px 0 8px;
}
.coming-inner p {
  color: var(--muted);
  font-size: 14px;
}

footer {
  text-align: center;
  padding: 28px 24px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .hero-inner { flex-direction: column; align-items: flex-start; }
  .add-btn { width: 100%; }
}
