/* ─────────────────────────────────────────────
   meet-app / style.css  —  다크 테마 + 골드 포인트
───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

/* ── 변수 ─────────────────────────────────── */
:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --surface2:  #21262d;
  --border:    #30363d;
  --gold:      #c9a84c;
  --gold-dim:  #a08030;
  --text:      #e6edf3;
  --text-muted:#8b949e;
  --danger:    #e74c3c;
  --success:   #2ea043;

  --ws-pgdsd:     #1e3a5f;
  --ws-asdp:      #1a3a2a;
  --ws-anchorage: #0d2040;
}

/* ── 리셋 ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: 'Inter', 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── 공통 버튼 ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}

.btn-primary {
  background: var(--gold);
  color: #0d1117;
}
.btn-primary:hover { background: #e2b85a; transform: translateY(-1px); }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #c0392b; }

.btn-icon {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all .2s;
}
.btn-icon:hover { background: var(--border); }
.btn-icon.active {
  background: var(--gold);
  color: #0d1117;
  border-color: var(--gold);
}
.btn-icon.danger { background: var(--danger); border-color: var(--danger); }

/* ── 입력 필드 ────────────────────────────── */
.input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color .2s;
}
.input:focus {
  outline: none;
  border-color: var(--gold);
}
.input::placeholder { color: var(--text-muted); }

/* ── 헤더 ─────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header .logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
}
.header .room-name {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ── ────────────────────────────────────────
   index.html
───────────────────────────────────────────── */
.home-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.home-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  margin-bottom: 8px;
}
.home-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* 워크스페이스 카드 */
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
@media (max-width: 600px) {
  .workspace-grid { grid-template-columns: 1fr; }
}

.ws-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
}
.ws-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.ws-card.selected {
  border-color: var(--gold);
  background: rgba(201,168,76,.08);
}
.ws-card .ws-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 12px;
}
.ws-card .ws-logo-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
}
.ws-card .ws-name {
  font-weight: 600;
  font-size: 0.95rem;
}

/* 룸 생성 폼 */
.create-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
.create-form h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--gold);
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* 링크 공유 박스 */
.share-box {
  margin-top: 20px;
  padding: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: none;
}
.share-box.visible { display: block; }
.share-box .share-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.share-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.share-link-row .input { font-size: 0.85rem; }

/* ── ────────────────────────────────────────
   room.html
───────────────────────────────────────────── */
.room-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.room-main {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* 비디오 그리드 */
.video-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg);
}

.video-grid {
  display: grid;
  gap: 8px;
  width: 100%;
  max-height: 100%;
}
.video-grid.n1 { grid-template-columns: 1fr; }
.video-grid.n2 { grid-template-columns: repeat(2, 1fr); }
.video-grid.n3,
.video-grid.n4 { grid-template-columns: repeat(2, 1fr); }
.video-grid.n5,
.video-grid.n6 { grid-template-columns: repeat(3, 1fr); }

.video-tile {
  position: relative;
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16/9;
}
.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s;
  transform-origin: center center;
}
/* 줌 컨트롤 */
.zoom-ctrl {
  position: absolute;
  bottom: 36px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  opacity: 0.75;
  transition: opacity .2s;
  z-index: 10;
}
.video-tile:hover .zoom-ctrl { opacity: 1; }
.zoom-btn {
  width: 26px;
  height: 26px;
  background: rgba(0,0,0,.7);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.zoom-btn:hover { background: rgba(201,168,76,.7); }
.zoom-level {
  width: 26px;
  height: 18px;
  background: rgba(0,0,0,.6);
  color: rgba(255,255,255,.7);
  font-size: 9px;
  text-align: center;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-tile .user-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,.65);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
}
.video-tile .muted-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}
.video-tile .muted-icon.visible { display: flex; }

/* 컨트롤바 */
.control-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.control-bar .room-info {
  position: absolute;
  left: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.recording-badge {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--danger);
  font-weight: 500;
}
.recording-badge.visible { display: flex; }
.recording-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  animation: blink 1s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .2; }
}

/* 채팅 사이드패널 */
.chat-panel {
  width: 300px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 10;
}
.chat-panel.open {
  transform: translateX(0);
}
.chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-msg .sender {
  font-size: 0.75rem;
  color: var(--gold);
  margin-bottom: 2px;
  font-weight: 600;
}
.chat-msg .body {
  font-size: 0.88rem;
  background: var(--surface2);
  padding: 8px 12px;
  border-radius: 8px;
  word-break: break-word;
}
.chat-msg.mine .body {
  background: rgba(201,168,76,.15);
}
.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.chat-input-row .input { font-size: 0.88rem; }

/* 회의록 알림 */
.notes-toast {
  position: fixed;
  bottom: 90px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.88rem;
  display: none;
  z-index: 100;
  max-width: 300px;
}
.notes-toast.visible { display: block; }
.notes-toast .toast-title { font-weight: 600; color: var(--gold); margin-bottom: 4px; }

/* ── ────────────────────────────────────────
   admin.html
───────────────────────────────────────────── */
.admin-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px;
}
.admin-container h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 32px;
}
.admin-section { margin-bottom: 40px; }
.admin-section h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.ws-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 700px) {
  .ws-admin-grid { grid-template-columns: 1fr; }
}
.ws-admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.ws-admin-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--gold);
}
.ws-admin-card .form-group { margin-bottom: 12px; }

/* 회의록 테이블 */
.meeting-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.meeting-table th,
.meeting-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.meeting-table th {
  color: var(--text-muted);
  font-weight: 500;
}
.meeting-table tr:hover td { background: var(--surface2); }

/* ── 모달 ─────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  display: none;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  max-width: 640px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}
.modal h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 16px;
}
.modal pre {
  font-family: 'Noto Sans KR', sans-serif;
  white-space: pre-wrap;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
}

/* 스크롤바 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── ────────────────────────────────────────
   입장 폼 (join-screen)
───────────────────────────────────────────── */
.join-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}

.join-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
}

.join-ws-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  margin-bottom: 4px;
}

.join-room-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 28px;
}

.join-info-banner {
  background: rgba(201,168,76,.08);
  border: 1px solid rgba(201,168,76,.25);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--gold);
  margin-top: 4px;
  line-height: 1.5;
}

/* ── ────────────────────────────────────────
   대기 화면 (lobby-screen)
───────────────────────────────────────────── */
.lobby-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.lobby-card {
  text-align: center;
  padding: 40px;
}

.lobby-spinner {
  width: 52px;
  height: 52px;
  border: 4px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.lobby-msg {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.lobby-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ── ────────────────────────────────────────
   대기실 패널 (호스트 전용)
───────────────────────────────────────────── */
.waiting-panel {
  position: fixed;
  top: 70px;
  right: 16px;
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  z-index: 50;
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
  overflow: hidden;
}

.waiting-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.waiting-badge {
  background: var(--gold);
  color: #0d1117;
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.waiting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.waiting-item:last-child { border-bottom: none; }

.waiting-info { flex: 1; min-width: 0; }

.waiting-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.waiting-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.waiting-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-approve,
.btn-reject {
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}

.btn-approve {
  background: var(--success);
  color: #fff;
}

.btn-approve:hover { opacity: .85; }

.btn-reject {
  background: var(--danger);
  color: #fff;
}

.btn-reject:hover { opacity: .85; }

