/* FK 코트펄스 화면. 모양은 농구 코트펄스(basketball.livcont.com)의 대시보드·로그인 화면 값을 그대로 따른다:
   밝은 바탕 #f1f5f9, 남색 그라데이션 머리띠, 흰 카드(모서리 14px), 상태별 테두리(초록 실선 / 노랑 점선 / 회색 점선), 알약 모양 상태표.
   글꼴은 같은 이름(Gmarket Sans)을 먼저 찾고, 없으면 맑은 고딕으로 보인다(바깥 글꼴 서버를 부르지 않는다). */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding: 16px; font-family: 'Gmarket Sans', 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; background: #f1f5f9; color: #0f172a; min-height: 100vh; }
button, input { font-family: inherit; }
.mono { font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace; }

.container { max-width: 1620px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.header { background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); color: #fff; padding: 16px 24px; border-radius: 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 18px; box-shadow: 0 18px 40px rgba(30, 60, 114, 0.28); flex-wrap: wrap; }
.wordmark { display: flex; align-items: baseline; gap: 10px; height: 62px; align-items: center; }
.wordmark .fk { font-size: 34px; font-weight: 700; letter-spacing: 1px; }
.wordmark .cp { font-size: 22px; font-weight: 300; letter-spacing: 3px; }
.wordmark .pulse { width: 46px; height: 26px; }
.header-line { display: flex; flex-direction: column; gap: 6px; font-size: 14px; letter-spacing: 0.2px; text-align: right; }
.header-line .small { font-size: 12px; opacity: 0.85; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.ghost-btn { border: 1px solid rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.12); color: #fff; padding: 7px 12px; border-radius: 8px; font-size: 12px; font-weight: 500; cursor: pointer; }
.ghost-btn:hover { background: rgba(255, 255, 255, 0.22); }

.notice { border-radius: 10px; border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; padding: 10px 14px; font-size: 13px; font-weight: 500; }
.all-block { background: #fff; border-radius: 14px; border: 1px solid #e2e8f0; padding: 12px 16px; box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08); display: flex; flex-direction: column; gap: 8px; }
.all-block h2 { margin: 0; font-size: 13px; font-weight: 500; color: #334155; }
.all-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 8px 16px; }

.venues-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.venue-card { background: #fff; border-radius: 14px; border: 1px solid #e2e8f0; padding: 16px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08); transition: border 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease; position: relative; }
.venue-card.online { border: 2px solid rgba(34, 197, 94, 1); box-shadow: 0 0 9px rgba(34, 197, 94, 0.15), 0 0 4px rgba(34, 197, 94, 0.09); animation: pulse-border 2s ease-in-out infinite; }
.venue-card.waiting { border: 2px dashed rgba(250, 204, 21, 0.75); background: rgba(250, 204, 21, 0.05); }
.venue-card.offline { border: 1px dashed #cbd5e1; background: #f8fafc; opacity: 0.55; }
@keyframes pulse-border {
  0% { box-shadow: 0 0 9px rgba(34, 197, 94, 0.15), 0 0 4px rgba(34, 197, 94, 0.09); }
  50% { box-shadow: 0 0 15px rgba(34, 197, 94, 0.21), 0 0 8px rgba(34, 197, 94, 0.15), 0 0 3px rgba(34, 197, 94, 0.24); }
  100% { box-shadow: 0 0 9px rgba(34, 197, 94, 0.15), 0 0 4px rgba(34, 197, 94, 0.09); }
}
.venue-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.venue-name { font-size: 17px; font-weight: 500; color: #0f172a; letter-spacing: 0.2px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.venue-meta { display: flex; gap: 6px; align-items: center; font-size: 11px; color: #94a3b8; flex-wrap: wrap; min-height: 14px; }
.venue-meta.warn { color: #b45309; font-weight: 700; font-size: 12px; }

.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: 0.4px;
  text-transform: uppercase; background: rgba(34, 197, 94, 0.18); color: #047857; white-space: nowrap; }
.status-pill.waiting { background: rgba(250, 204, 21, 0.28); color: #b45309; }
.status-pill.offline { background: rgba(148, 163, 184, 0.28); color: #475569; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }

.section { border-radius: 10px; border: 1px solid #e2e8f0; padding: 10px; background: #f8fafc; display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; gap: 8px; }
.row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 10px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.3px; }
.value-pill { padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid #e2e8f0; text-align: center; font-size: 13px; font-weight: 500; color: #0f172a; min-height: 34px;
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.value-pill.score { font-size: 17px; font-weight: 700; }
.value-pill.alert { border-color: #fca5a5; background: #fef2f2; color: #b91c1c; }
.team-row { display: grid; grid-template-columns: 64px minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 8px; align-items: center; }
.team-label { background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%); color: #fff; border-radius: 8px; padding: 8px 6px; text-align: center; font-size: 14.3px; font-weight: 500; }
.team-row-heading .team-label { background: transparent; }
.team-row-heading .value-pill { background: #e2e8f0; color: #0f172a; border-color: #cbd5e1; font-weight: 500; font-size: 11px; min-height: 0; padding: 6px 10px; }

.url-block { border: 1px dashed #cbd5e1; border-radius: 10px; padding: 10px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.url-row { display: flex; align-items: center; gap: 8px; }
.url-label { width: 72px; flex: 0 0 72px; text-align: center; font-size: 14.3px; font-weight: 700; color: #1e293b; letter-spacing: 0.3px; }
.url-display { flex: 1; min-width: 0; background: #f1f5f9; padding: 8px 10px; border-radius: 8px; border: 1px solid #e2e8f0; font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
  font-size: 11px; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; }
.copy-btn { border: none; padding: 7px 12px; border-radius: 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; cursor: pointer;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%); color: #fff; transition: transform 0.2s ease, box-shadow 0.2s ease; white-space: nowrap; }
.copy-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25); }
.copy-btn.copied { background: linear-gradient(135deg, #10b981 0%, #047857 100%); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.card-foot .foot-note { flex: 1 1 150px; min-width: 0; }
.clear-btn { flex: 0 0 auto; position: relative; overflow: hidden; border: 1px solid #cbd5e1; background: #fff; color: #475569; padding: 6px 10px; border-radius: 8px; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.clear-btn[disabled] { opacity: 0.4; cursor: default; }
.clear-btn .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(239, 68, 68, 0.25); pointer-events: none; }
.foot-note { font-size: 11px; color: #94a3b8; }

/* 로그인 */
body.login { padding: 0; display: flex; align-items: center; justify-content: center; }
.login-container { width: 100%; max-width: 504px; padding: 24px; }
.login-card { background: #fff; border-radius: 20px; box-shadow: 0 20px 50px rgba(30, 60, 114, 0.15); padding: 48px 40px; display: flex; flex-direction: column; align-items: center; gap: 32px; }
.login-card .wordmark { color: #1e3c72; height: auto; }
.tagline { font-size: 18px; font-weight: 500; color: #1e3c72; text-align: center; line-height: 1.6; padding: 0 16px; }
.login-form { width: 100%; display: flex; flex-direction: column; gap: 16px; }
.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-group label { font-size: 13px; font-weight: 500; color: #475569; }
.input-group input { width: 100%; padding: 14px 16px; font-size: 15px; border: 2px solid #e2e8f0; border-radius: 10px; background: #f8fafc; color: #0f172a; transition: all 0.2s; }
.input-group input:focus { outline: none; border-color: #2a5298; background: #fff; box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1); }
.login-button { width: 100%; padding: 16px; font-size: 16px; font-weight: 700; color: #fff; border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); box-shadow: 0 10px 24px rgba(30, 60, 114, 0.25); }
.login-button[disabled] { opacity: 0.6; cursor: wait; }
.login-error { min-height: 20px; font-size: 13px; font-weight: 500; color: #dc2626; text-align: center; }

@media (max-width: 960px) { .venues-grid, .all-rows { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } .header-line { text-align: left; } }
