:root {
  --bg: #f7f8fa;
  --fg: #1a1a1a;
  --accent: #0066cc;
  --accent-hover: #0055aa;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --muted: #6b7280;
  --error: #dc2626;
  --success: #16a34a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard",
               "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
}

header {
  text-align: center;
  padding: 24px 16px 8px;
  background: var(--accent);
  color: white;
  position: relative;   /* 2026-06-21: 언어 선택기 우측상단 절대배치 기준 */
}

/* 2026-06-21: 10개국어 언어 선택기 (우측 상단) */
.lang-bar { position: absolute; top: 10px; right: 14px; z-index: 50; }
.lang-sel {
  padding: 4px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.95); color: #222; font-size: 13px; cursor: pointer;
}
[dir="rtl"] .lang-bar { right: auto; left: 14px; }

header h1 { margin: 0; font-size: 1.5rem; }
header .sub { margin: 4px 0 0; opacity: 0.9; font-size: 0.9rem; }

main {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.dir-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dir {
  flex: 1;
  min-width: 140px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.dir input { display: none; }
.dir:has(input:checked) {
  border-color: var(--accent);
  background: #eef5ff;
}

input[type=file], input[type=text] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  width: 100%;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-secondary {
  background: white;
  color: var(--accent);
  border: 1px solid var(--accent);
  width: auto;
  margin-left: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
}

.info {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 8px 0 0;
}
.info.error { color: var(--error); }
.info.success { color: var(--success); }

.status {
  font-size: 0.9rem;
  margin: 12px 0 0;
}

progress {
  width: 100%;
  height: 6px;
  margin-top: 12px;
}

.hidden { display: none; }

footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.8rem;
}

.user-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.85rem;
}
.user-bar .btn-secondary {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 4px 12px;
  font-size: 0.85rem;
}

dialog {
  border: none;
  border-radius: 12px;
  padding: 20px;
  max-width: 400px;
  width: 90%;
}
dialog::backdrop { background: rgba(0,0,0,0.4); }
dialog h3 { margin: 0 0 12px; }
dialog input { display: block; margin: 6px 0; }
dialog hr { margin: 16px 0; border: 0; border-top: 1px solid var(--border); }

.oauth-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.oauth-btn {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
}
.oauth-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.oauth-btn[data-provider=google]:not([disabled]) { background: #fff; border-color: #4285f4; color: #4285f4; }
.oauth-btn[data-provider=kakao]:not([disabled])  { background: #fee500; color: #000; border-color: #fee500; }
.oauth-btn[data-provider=naver]:not([disabled])  { background: #03c75a; color: white; border-color: #03c75a; }
.oauth-btn[data-provider=toss]:not([disabled])   { background: #0064ff; color: white; border-color: #0064ff; }
.oauth-btn[data-provider=github]:not([disabled]) { background: #24292e; color: white; border-color: #24292e; }
.oauth-btn[data-provider=apple]:not([disabled])  { background: #000; color: white; border-color: #000; }
