/* ================================================
   LINE Chat Export Converter — Converter UI Stylesheet
   style.css  ·  used by index.html only
   ================================================ */

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

/* ── Design tokens ── */
:root
{
  --bg:             #0f1117;
  --surface:        #1a1d27;
  --surface2:       #22263a;
  --line-green:     #06c755;
  --line-green-dim: #04a044;
  --accent:         #7c83fd;
  --accent2:        #f0c040;
  --text:           #e8eaf0;
  --text-muted:     #7a7f96;
  --text-dim:       #4a4f66;
  --bubble-me:      #1e3a2e;
  --bubble-other:   #1e2235;
  --bubble-system:  #161925;
  --border:         rgba(255,255,255,0.07);
  --shadow:         0 4px 24px rgba(0,0,0,0.4);

  /* Avatar palette — cycled by member index */
  --av-0: #e05c5c;
  --av-1: #e07d3c;
  --av-2: #c9a42a;
  --av-3: #4caf7d;
  --av-4: #2a9dc9;
  --av-5: #7b5cf0;
  --av-6: #c94e8e;
  --av-7: #5c8ee0;
}

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

/* ── Body ── */
body
{
  font-family: 'Noto Sans HK', 'Noto Sans TC', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ══════════════════════════════════════
   CONVERTER UI
══════════════════════════════════════ */
.lc-converter
{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  gap: 32px;
}

.lc-converter-card
{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: var(--shadow);
}

.lc-converter-card h2
{
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lc-converter-card h2 span.icon
{
  background: var(--line-green);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.lc-converter-card p
{
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Drop zone ── */
.lc-dropzone
{
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
}

.lc-dropzone:hover,
.lc-dropzone.drag-over
{
  border-color: var(--line-green);
  background: rgba(6,199,85,0.06);
}

.lc-dropzone .dz-icon  { font-size: 36px; }

.lc-dropzone .dz-label
{
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.lc-dropzone .dz-sub
{
  font-size: 12px;
  color: var(--text-dim);
}

.lc-dropzone input[type="file"] { display: none; }

/* ── My name field ── */
.lc-field label
{
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.lc-field-hint
{
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 400;
}

/* ── Sender name picker ── */
.lc-name-picker
{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.lc-name-btn
{
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  font-family: 'Noto Sans HK', 'Noto Sans TC', sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .18s, background .18s, color .18s, transform .12s;
  user-select: none;
}

.lc-name-btn:hover
{
  border-color: var(--line-green);
  color: var(--text);
  transform: translateY(-1px);
}

.lc-name-btn.selected
{
  background: rgba(6,199,85,0.12);
  border-color: var(--line-green);
  color: var(--line-green);
  font-weight: 600;
}

.lc-name-btn .nb-avatar
{
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}

.lc-name-btn.selected .nb-avatar
{
  box-shadow: 0 0 0 2px var(--line-green);
}

.lc-name-btn .nb-check
{
  font-size: 13px;
  opacity: 0;
  transition: opacity .15s;
  margin-left: 2px;
}

.lc-name-btn.selected .nb-check { opacity: 1; }

.lc-name-btn.none-btn
{
  font-style: italic;
  color: var(--text-dim);
  font-size: 12px;
}

.lc-name-btn.none-btn.selected
{
  background: var(--surface2);
  border-color: var(--text-dim);
  color: var(--text-muted);
}

/* ── Convert button ── */
.lc-btn
{
  background: var(--line-green);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, transform .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.lc-btn:hover  { background: var(--line-green-dim); }
.lc-btn:active { transform: scale(.98); }
.lc-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Status bar ── */
.lc-status
{
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  min-height: 20px;
  font-family: 'DM Mono', monospace;
}

.lc-status.error { color: #e05c5c; }
.lc-status.ok    { color: var(--line-green); }

/* ── Preview panel ── */
.lc-preview-panel
{
  width: 100%;
  max-width: 720px;
  display: none;
}

.lc-preview-panel.visible { display: block; }

.lc-preview-toolbar
{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px 14px 0 0;
  gap: 12px;
}

.lc-preview-toolbar span
{
  font-size: 13px;
  color: var(--text-muted);
}

.lc-btn-sm
{
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s;
}

.lc-btn-sm:hover { background: var(--line-green); color: #fff; border-color: var(--line-green); }

.lc-preview-frame
{
  width: 100%;
  height: 520px;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 14px 14px;
  background: var(--bg);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Responsive ── */
@media (max-width: 600px)
{
  .lc-converter-card { padding: 28px 20px; }
}