/* ============================================================
   무료영도 — 공개 신청 페이지 전용 스타일
   styles.css 위에 레이어링되며 .public-page 로 스코프되어
   admin / overlay 페이지에는 영향을 주지 않습니다.
   ============================================================ */

.public-page {
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(800px 600px at 50% 120%, rgba(139, 92, 246, 0.14), transparent 60%),
    #05060a;
  background-attachment: fixed;
  position: relative;
}

/* Slow drifting aurora behind everything */
.public-aurora {
  position: fixed;
  inset: -20% -10% -10% -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(420px 420px at 20% 25%, rgba(99, 102, 241, 0.22), transparent 70%),
    radial-gradient(460px 460px at 80% 30%, rgba(6, 182, 212, 0.16), transparent 70%),
    radial-gradient(500px 500px at 60% 85%, rgba(139, 92, 246, 0.18), transparent 70%);
  filter: blur(20px);
  opacity: 0.9;
  animation: aurora-drift 22s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, -2%, 0) scale(1.05); }
  100% { transform: translate3d(-2%, 1%, 0) scale(1.08); }
}

.public-page .requests-layout {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 32px));
  gap: 28px;
}

/* ---------------- Hero header ---------------- */
.public-page .public-hero {
  border-bottom: none;
  padding: 12px 4px 4px;
  flex-wrap: wrap;
  row-gap: 16px;
}

.public-page .header-logo-section {
  gap: 16px;
}

.public-logo-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #06b6d4);
  box-shadow:
    0 8px 24px rgba(99, 102, 241, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.public-page .public-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(110deg, #ffffff 10%, #c7d2fe 45%, #67e8f9 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.public-tagline {
  margin: 6px 0 0;
  font-size: 14px;
  color: #94a3b8;
  font-weight: 500;
}

.public-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.public-channel-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: #e0f2fe;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(99, 102, 241, 0.18));
  border: 1px solid rgba(34, 211, 238, 0.4);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.public-channel-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 8px 20px -6px rgba(34, 211, 238, 0.5);
}

.public-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 13px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  backdrop-filter: blur(8px);
}

.public-live-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.public-live-text strong {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #34d399;
}

.public-page .public-live-badge .status-update-text {
  margin: 2px 0 0;
  font-size: 11px;
  color: #6ee7b7;
  opacity: 0.85;
}

/* ---------------- Shared card polish ---------------- */
.public-page .card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)) ,
    rgba(15, 18, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 20px 50px -20px rgba(0, 0, 0, 0.6);
}

/* ---------------- Submit panel (hero CTA) ---------------- */
.public-page .public-submit-panel {
  position: relative;
  padding: 26px 28px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.06) 60%, transparent),
    rgba(15, 18, 28, 0.8);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.12),
    0 28px 60px -28px rgba(79, 70, 229, 0.55);
}

.public-submit-heading {
  margin-bottom: 18px;
}

.public-submit-heading h2 {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.public-submit-heading p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #94a3b8;
}

.public-page .public-submit-field input {
  height: 50px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.public-page .public-submit-field input::placeholder {
  color: #5b6577;
}

.public-page .public-submit-field input:focus {
  border-color: rgba(129, 140, 248, 0.8);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16);
  background: rgba(2, 6, 23, 0.85);
}

.public-page .public-submit-field span {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #a5b4fc;
}

.public-page .public-submit-form .btn-primary {
  height: 50px;
  padding: 0 26px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 60%, #06b6d4);
  box-shadow: 0 8px 22px -4px rgba(99, 102, 241, 0.6);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.public-page .public-submit-form .btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 14px 30px -6px rgba(99, 102, 241, 0.7);
}

.public-page .public-submit-form .btn-primary:active {
  transform: translateY(0);
}

.public-page .public-submit-form .btn-primary:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* ---------------- Section titles ---------------- */
.public-page .requests-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
}

.public-page .requests-section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(180deg, #818cf8, #06b6d4);
  flex-shrink: 0;
}

/* ---------------- Tables ---------------- */
.public-page .table-container {
  background: transparent;
  border: none;
  border-radius: 12px;
}

.public-page table {
  border-spacing: 0 6px;
  border-collapse: separate;
  table-layout: fixed;
}

.public-page thead th {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #7c8aa3;
  font-size: 11px;
  padding: 8px 16px;
}

.public-page tbody td {
  border-bottom: none;
  background: rgba(255, 255, 255, 0.025);
  padding: 12px 16px;
}

.public-page tbody tr td:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.public-page tbody tr td:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.public-page tbody tr {
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.public-page .request-row:hover td {
  background: rgba(99, 102, 241, 0.08);
}

.public-page .request-row:hover {
  transform: translateX(2px);
}

/* Currently playing row gets a subtle highlight */
.public-page .request-playing td {
  background: rgba(16, 185, 129, 0.07);
  box-shadow: inset 2px 0 0 #10b981;
}

.public-page .cell-thumb {
  width: 76px;
  border-radius: 8px;
}

.public-page .status-pill {
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Keep short text columns (status / 신청자 / 사유 / 길이) on one line */
.public-page tbody td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The video cell still needs to flex & ellipsize its title */
.public-page .request-video-cell {
  white-space: normal;
  width: 100%;
}

/* ---------------- Empty states ---------------- */
.public-page .empty-state {
  color: #64748b;
  padding: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin: 8px 0 0;
}

/* ---------------- Submit status text ---------------- */
.public-page .public-submit-status {
  margin-top: 14px;
  font-size: 13px;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 720px) {
  .public-page .public-hero {
    justify-content: flex-start;
  }
  .public-page .public-submit-panel {
    padding: 20px 18px;
  }
  .public-page .cell-channel-name {
    display: none;
  }

  /* Tighten tables so they fit narrow screens without horizontal scroll */
  .public-page .card {
    padding: 18px 14px;
  }
  .public-page th,
  .public-page td {
    padding-left: 10px;
    padding-right: 10px;
  }
  /* Thumbnails eat space the title needs on phones — hide them */
  .public-page .cell-thumb {
    display: none;
  }
  /* Main list: drop 길이(2) and 사유(5) so the 영상 title gets real width */
  .public-page #requests-table th:nth-child(2),
  .public-page #requests-body td:nth-child(2),
  .public-page #requests-table th:nth-child(5),
  .public-page #requests-body td:nth-child(5) {
    display: none;
  }
  .public-page #requests-table th:nth-child(1) { width: 72px !important; }
  .public-page #requests-table th:nth-child(4) { width: 92px !important; }

  /* Waiting list (first card in the grid): drop 길이(3) for title room */
  .public-page .requests-grid > section:first-child table th:nth-child(3),
  .public-page #waiting-requests-body td:nth-child(3) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .public-aurora,
  .public-page .status-glow {
    animation: none;
  }
}
