@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');
:root {
  --bg-deep: #07090e;
  --bg-card: rgba(15, 18, 25, 0.78);
  --bg-card-hover: rgba(22, 27, 38, 0.88);
  --bg-input: rgba(10, 13, 19, 0.85);
  --bg-subtle: rgba(255, 255, 255, 0.03);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-active: rgba(6, 182, 212, 0.5);
  --border-glow: rgba(0, 245, 212, 0.35);
  --miku-cyan: #00f5d4;
  --miku-blue: #0ea5e9;
  --miku-teal: #06b6d4;
  --neon-glow: rgba(0, 245, 212, 0.22);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;
  --status-emerald: #10b981;
  --status-emerald-bg: rgba(16, 185, 129, 0.12);
  --status-emerald-border: rgba(16, 185, 129, 0.28);
  --status-dim-bg: rgba(100, 116, 139, 0.12);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --radius-pill: 9999px;
}
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  padding: 32px 20px 60px;
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(ellipse 90% 50% at 50% -15%, rgba(6, 182, 212, 0.2), transparent 70%),
    radial-gradient(ellipse 40% 40% at 90% 85%, rgba(14, 165, 233, 0.1), transparent 60%);
  background-size: 100% 100%, 100% 100%;
  pointer-events: none;
  z-index: -1;
}
.bg-matrix {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  user-select: none;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.5px;
  color: rgba(0, 245, 212, 0.16);
  word-break: break-all;
  white-space: normal;
  padding: 0;
  margin: 0;
}
.container {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}
.header {
  padding: 16px 0 8px;
}
.header-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.header h1 {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 6px;
}
.header p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.6;
}
.header p strong {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(6, 182, 212, 0.4);
  text-underline-offset: 3px;
}
.api-bar {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.api-bar:hover {
  border-color: var(--border-medium);
}
.api-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 280px;
}
.api-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.api-label svg {
  width: 15px;
  height: 15px;
  color: var(--miku-cyan);
}
#api-key-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  padding: 8px 14px;
  outline: none;
  transition: all 0.2s ease;
}
#api-key-input:focus {
  border-color: var(--miku-teal);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
  background: rgba(10, 13, 19, 0.95);
}
#api-key-input::placeholder {
  color: var(--text-dim);
}
.api-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-api {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-api:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
.btn-api:active {
  transform: translateY(0);
}
.api-status {
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
}
.status-on {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
}
.status-off {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
.status-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
}
.status-checking {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
}
.status-unverified {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.25);
  color: #facc15;
}
.api-guide {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: -10px;
  padding-left: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.api-guide a {
  color: var(--miku-cyan);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.api-guide a:hover {
  text-decoration: underline;
  color: #5eead4;
}
.studio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 960px) {
  .studio-grid {
    grid-template-columns: 1.05fr 1.15fr;
    align-items: stretch;
  }
}
.box {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}
.box:hover {
  border-color: var(--border-medium);
}
.box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.label {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.label-icon {
  width: 16px;
  height: 16px;
  color: var(--miku-cyan);
}
.count-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--miku-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.22);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}
textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Pretendard', sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
  padding: 14px 16px;
  resize: vertical;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}
textarea:focus {
  border-color: var(--miku-teal);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.2);
  background: rgba(8, 10, 15, 0.95);
}
textarea::placeholder {
  color: var(--text-dim);
  font-weight: 400;
  line-height: 1.6;
}
textarea[readonly] {
  background: rgba(12, 15, 22, 0.9);
  color: #e2e8f0;
  cursor: text;
}

.btn-main {
  background: #0284c7;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 13px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.15s ease, transform 0.1s ease;
  margin-top: 4px;
}
.btn-main:hover {
  background: #0369a1;
}
.btn-main:active {
  transform: scale(0.99);
}
.btn-main:disabled {
  background: #1e293b;
  color: var(--text-dim);
  cursor: not-allowed;
  transform: none;
}
.btn-shortcut-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  margin-left: 6px;
}
.btn-copy {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  padding: 6px 13px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}
.btn-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}
.btn-copy:active {
  transform: translateY(0);
}
.btn-highlight {
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: var(--miku-cyan);
}
.btn-highlight:hover {
  background: rgba(6, 182, 212, 0.24);
  border-color: var(--miku-cyan);
  color: #ffffff;
  box-shadow: 0 0 14px -2px rgba(0, 245, 212, 0.35);
}
.vocaloid-box {
  border-color: rgba(6, 182, 212, 0.28);
  background: linear-gradient(180deg, rgba(15, 22, 33, 0.85) 0%, rgba(13, 17, 24, 0.85) 100%);
  position: relative;
}
.vocaloid-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--miku-cyan), var(--miku-blue));
  border-radius: 4px 0 0 4px;
}
.vocaloid-box textarea {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: #38bdf8;
  background: rgba(5, 8, 14, 0.95);
  border-color: rgba(6, 182, 212, 0.22);
}
.sub-desc {
  font-size: 0.8rem;
  color: var(--miku-teal);
  margin-top: -6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.match-info-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.match-info {
  font-family: 'JetBrains Mono', 'Pretendard', monospace;
  font-size: 0.82rem;
  color: #cbd5e1;
  background: rgba(7, 10, 16, 0.85);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.match-info:empty {
  display: none;
}
.match-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.2s ease;
}
.match-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(6, 182, 212, 0.2);
}
.match-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.match-tag {
  color: var(--miku-cyan);
  font-weight: 700;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.74rem;
}
.match-mora-stats {
  font-size: 0.78rem;
  color: #94a3b8;
}
.match-badge {
  color: #34d399;
  font-size: 0.74rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
}
.btn-rerun-line {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.18s ease;
}
.btn-rerun-line:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--miku-cyan);
  color: #fff;
  transform: translateY(-1px);
}
.btn-rerun-line:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.match-pronunciation {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  padding-left: 2px;
}
.mora-split-text {
  color: #38bdf8;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(56, 189, 248, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.15);
  word-break: break-all;
  letter-spacing: 0.5px;
}
.results {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(4, 19, 29, 0.25);
  border-top-color: #04131d;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: rgba(11, 15, 23, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
  border: 1px solid rgba(0, 245, 212, 0.4);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 36px -6px rgba(0, 0, 0, 0.7), 0 0 20px -4px rgba(0, 245, 212, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.hidden {
  display: none !important;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--miku-teal);
}

/* ==========================================================================
   인증 잠금 화면 (Auth Overlay)
   ========================================================================== */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(4, 8, 15, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}
body.locked .container {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(13, 20, 36, 0.85);
  border: 1px solid rgba(0, 245, 212, 0.3);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 245, 212, 0.15);
}
.auth-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 245, 212, 0.12);
  border: 1px solid rgba(0, 245, 212, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #00f5d4;
}
.auth-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(0, 245, 212, 0.12);
  border: 1px solid rgba(0, 245, 212, 0.3);
  color: #00f5d4;
  margin-bottom: 12px;
}
.auth-card h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 8px;
}
.auth-desc {
  font-size: 0.86rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 24px;
}
.auth-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
#access-code-input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: #00f5d4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-align: center;
  transition: all 0.2s ease;
}
#access-code-input:focus {
  outline: none;
  border-color: #00f5d4;
  box-shadow: 0 0 16px rgba(0, 245, 212, 0.25);
}
.btn-verify {
  padding: 0 22px;
  background: linear-gradient(135deg, #00f5d4, #06b6d4);
  color: #030712;
  font-weight: 700;
  font-size: 0.92rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-verify:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 245, 212, 0.35);
}
.btn-verify:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.auth-error {
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #f87171;
  font-size: 0.82rem;
  margin-bottom: 14px;
  text-align: center;
  animation: shake 0.3s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.auth-footer {
  margin-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
}
.btn-text-link {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.18s;
}
.btn-text-link:hover {
  color: #00f5d4;
}

/* ==========================================================================
   관리자 대시보드 모달 (Admin Modal)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}
.admin-card {
  width: 100%;
  max-width: 740px;
  max-height: 88vh;
  overflow-y: auto;
  background: rgba(13, 20, 36, 0.95);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 18px;
  padding: 26px 28px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
}
.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #00f5d4;
}
.modal-title-wrap h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: #f1f5f9;
}
.btn-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}
.btn-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.admin-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.admin-guide-text {
  font-size: 0.86rem;
  color: #94a3b8;
}
.admin-input-row {
  display: flex;
  gap: 8px;
}
#admin-password-input {
  flex: 1;
  padding: 11px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
}
#admin-password-input:focus {
  outline: none;
  border-color: #00f5d4;
}
.btn-main-sm {
  padding: 0 20px;
  background: var(--miku-cyan);
  color: #030712;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-main-sm:hover {
  background: #22d3ee;
}
.admin-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-section h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #e2e8f0;
}
.create-code-form {
  display: grid;
  grid-template-columns: 1fr 140px 110px;
  gap: 8px;
}
#new-code-memo {
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: #fff;
  font-size: 0.85rem;
}
#new-code-expires {
  padding: 10px 10px;
  background: #0b1329;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  color: #cbd5e1;
  font-size: 0.82rem;
}
.btn-create {
  background: linear-gradient(135deg, #00f5d4, #06b6d4);
  color: #030712;
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-create:hover {
  box-shadow: 0 4px 14px rgba(0, 245, 212, 0.3);
}
.created-code-box {
  background: rgba(0, 245, 212, 0.1);
  border: 1px dashed rgba(0, 245, 212, 0.4);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}
.code-highlight {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  color: #00f5d4;
  letter-spacing: 1px;
}
.btn-copy-sm {
  margin-left: auto;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  color: #fff;
  font-size: 0.78rem;
  cursor: pointer;
}
.btn-copy-sm:hover {
  background: #00f5d4;
  color: #030712;
}
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.btn-icon-sm {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 0.85rem;
  cursor: pointer;
}
.btn-icon-sm:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.table-wrap {
  overflow-x: auto;
  max-height: 280px;
}
.codes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.codes-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.74rem;
}
.codes-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}
.code-cell {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #00f5d4;
  letter-spacing: 0.5px;
}
.btn-del-code {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.18s;
}
.btn-del-code:hover {
  background: #ef4444;
  color: #fff;
}
.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}
.btn-secondary-sm {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
}
.btn-secondary-sm:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.text-center {
  text-align: center;
}

/* 회원 정보 배지 (헤더 영역) */
.user-auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  background: rgba(0, 245, 212, 0.08);
  border: 1px solid rgba(0, 245, 212, 0.2);
  border-radius: 20px;
  padding: 3px 10px;
  color: #94a3b8;
}
.user-auth-code {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #00f5d4;
}
.btn-pill-action {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0 2px;
  text-decoration: underline;
}
.btn-pill-action:hover {
  color: #cbd5e1;
}

/* ==========================================================================
   독립 관리자 전용 페이지 (admin.html)
   ========================================================================== */
.admin-page {
  min-height: 100vh;
  padding: 40px 20px 80px;
  position: relative;
}
.admin-page-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: relative;
  z-index: 10;
}
.admin-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 20px;
}
.admin-brand h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  margin: 6px 0 6px;
  letter-spacing: -0.02em;
}
.admin-subtitle {
  font-size: 0.88rem;
  color: #94a3b8;
}
.admin-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(0, 245, 212, 0.12);
  border: 1px solid rgba(0, 245, 212, 0.3);
  color: #00f5d4;
}
.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.btn-text-nav {
  color: #38bdf8;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  transition: all 0.2s;
}
.btn-text-nav:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #fff;
}
.admin-auth-box {
  max-width: 440px;
  width: 100%;
  margin: 40px auto 0;
  background: rgba(13, 20, 36, 0.92);
  border: 1px solid rgba(0, 245, 212, 0.3);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 245, 212, 0.12);
}
.admin-main-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.admin-card-section {
  background: rgba(13, 20, 36, 0.82);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.section-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title-row h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
}
.section-desc {
  font-size: 0.84rem;
  color: #94a3b8;
  margin-top: -4px;
}


