:root {
  --primary-color: #0070f3;
  --danger-color: #e53e3e;
  --success-color: #34c759;
  --bg-color: #f5f5f7;
}

body {
  font-family: 'Apple SD Gothic Neo', -apple-system, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background-color: var(--bg-color);
  padding: 15px;
  box-sizing: border-box;
}

.card {
  background: #ffffff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 400px;
}

h2 { margin: 0 0 16px 0; text-align: center; color: #1d1d1f; font-size: 20px; }
.sub-title { font-size: 13px; color: #666; text-align: center; margin-bottom: 20px; line-height: 1.4; }

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.header-bar h2 { margin: 0; font-size: 18px; }

.input-group { margin-bottom: 12px; }
.input-group label { display: block; margin-bottom: 4px; color: #6e6e73; font-size: 13px; }
.input-group input {
  width: 100%; padding: 10px 12px; border: 1px solid #d2d2d7; border-radius: 8px;
  box-sizing: border-box; font-size: 15px;
}

button {
  width: 100%; padding: 12px; background-color: var(--primary-color);
  color: white; border: none; border-radius: 8px; font-weight: 600;
  font-size: 15px; cursor: pointer; margin-top: 8px; transition: opacity 0.2s;
}
button:disabled { background-color: #ccc; cursor: not-allowed; }

.btn-secondary { background-color: #8e8e93; }
.btn-success { background-color: var(--success-color); }
.btn-logout { background-color: var(--danger-color); padding: 6px 12px; font-size: 12px; width: auto; margin: 0; }
.btn-back { background-color: #e5e5ea; color: #333; padding: 6px 12px; font-size: 13px; width: auto; margin: 0; }

.user-info-box {
  background: #f0f7ff; border: 1px solid #cce3ff; padding: 12px 16px;
  border-radius: 10px; margin-bottom: 20px; font-size: 14px; line-height: 1.5;
}
.user-info-box p { margin: 2px 0; }

/* 메뉴 그리드 */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  color: #333;
  margin: 0;
}
.menu-btn .icon { font-size: 28px; margin-bottom: 8px; }
.menu-btn .label { font-size: 14px; font-weight: bold; }

/* 미디어 영역 */
.media-container {
  width: 100%; height: 260px; background-color: #000; border-radius: 12px;
  overflow: hidden; position: relative; display: flex; justify-content: center;
  align-items: center; margin-bottom: 12px;
}
video, #capturedPreview { width: 100%; height: 100%; object-fit: cover; }
canvas { display: none; }

/* 카메라 화면 중앙 위치 안내 오버레이 */
.location-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: bold;
  z-index: 10;
  pointer-events: none; /* 클릭 이벤트 통과 */
  transition: opacity 0.3s ease;
}

.location-overlay.hidden {
  display: none;
}

/* 간단한 로딩 아이콘 애니메이션 */
.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 1s ease-in-out infinite;
}

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

.status-text { font-size: 13px; text-align: center; margin-top: 8px; min-height: 18px; word-break: keep-all; }
.warning-text { color: var(--danger-color); }

.placeholder-content { text-align: center; padding: 40px 0; color: #8e8e93; }
.placeholder-content .big-icon { font-size: 48px; display: block; margin-bottom: 12px; }

.hidden { display: none !important; }