/* FilePark — LifePark 과 같은 토큰·같은 배경을 쓴다 (한 식구로 보이게) */
:root {
  --bg: #0b0a12;
  --text: #eceaf3;
  --muted: #bcb8cd;
  --line: rgba(255,255,255,.10);
  --glass: rgba(255,255,255,.055);
  --card: rgba(14,12,22,.58);
  --primary: #8a5cff;
  --primary-soft: rgba(138,92,255,.20);
  --error: #ff8a8a;
  --ok: #6adc91;
  --side-w: 300px;   /* 폴더 이름이 길다 - 좁으면 잘려서 못 읽는다 */
}
* { box-sizing: border-box; }

/*
   ★★hidden 속성이 CSS 에 지지 않게 못 박는다.
   `[hidden] { display:none }` 은 브라우저 기본 규칙이라 힘이 약해서,
   `.center-view { display:flex }` 같은 **클래스 규칙 하나에 진다**.
   그러면 hidden 을 켜도 화면이 안 사라진다 - 로그인이 다 됐는데도 로그인 화면이
   그대로 남아 "로그인이 안 된다"로 보였다(2026-09-02, 원인 찾는 데 오래 걸림).
*/
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--text); background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
  overflow: hidden;
}

/* 배경 — LifePark 과 같은 규칙(옅게 깔고 어두운 막 한 겹) */
.aurora { position: fixed; inset: -20% -10%; z-index: -2; filter: blur(72px); opacity: .38; pointer-events: none; }
.aurora span { position: absolute; display: block; border-radius: 50%; mix-blend-mode: screen; }
.aurora span:nth-child(1) { width: 46vw; height: 46vw; left: 2%;  top: 0%;    background: #7b3ff2; }
.aurora span:nth-child(2) { width: 38vw; height: 38vw; right: 4%; top: 10%;   background: #2f7cf6; }
.aurora span:nth-child(3) { width: 34vw; height: 34vw; left: 24%; bottom: 0%; background: #17b8a6; }
.aurora span:nth-child(4) { width: 24vw; height: 24vw; right: 18%; bottom: 4%; background: #e0479e; opacity: .7; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; background: rgba(9,8,14,.34); pointer-events: none; }

button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.center-text { text-align: center; }
.error { color: var(--error); font-size: 13px; }
/* 오류가 아니라 '기다리는 중' 안내일 때 */
.error.muted-note { color: var(--muted); }

.link-btn { padding: 6px 12px; border-radius: 999px; font-size: 13.5px; color: var(--text); background: var(--glass); border: 1px solid var(--line); }
.link-btn:hover { background: rgba(255,255,255,.12); }
.link-btn.danger { color: var(--error); }
.icon-btn { width: 32px; height: 32px; border-radius: 999px; color: var(--muted); }
.icon-btn:hover { background: var(--glass); color: var(--text); }
.primary {
  padding: 13px; border-radius: 999px; font-size: 15px; font-weight: 700;
  color: #fff; background: linear-gradient(100deg, #8a5cff, #5b32d6);
}

/* 로그인 */
.center-view { display: flex; align-items: center; justify-content: center; height: 100%; padding: 24px; }
.card {
  width: min(380px, 100%); display: flex; flex-direction: column; gap: 12px;
  padding: 26px; border-radius: 20px;
  background: rgba(16,14,24,.86); border: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.badge {
  width: 62px; height: 62px; align-self: center; display: grid; place-items: center;
  font-size: 28px; border-radius: 20px;
  background: linear-gradient(140deg, #8a5cff, #5b32d6);
}
.badge-img { align-self: center; border-radius: 18px; }
.brand { margin: 8px 0 0; font-size: 30px; text-align: center; }
.sub { margin: 0 0 10px; font-size: 13px; letter-spacing: .08em; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.field input {
  padding: 12px 14px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--line); color: var(--text);
}
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }

/* 본화면 */
.app { display: flex; flex-direction: column; height: 100%; }
.topbar {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: rgba(11,10,18,.62); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.logo { font-size: 17px; }
.body { flex: 1; display: flex; min-height: 0; }

.side {
  width: var(--side-w); flex: none; padding: 12px 10px; overflow-y: auto;
  border-right: 1px solid var(--line); background: rgba(11,10,18,.42);
}
.side h2 { margin: 4px 8px 10px; font-size: 12px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.share-list { display: flex; flex-direction: column; gap: 2px; }
.share {
  display: flex; align-items: center; gap: 2px;
  padding: 6px 8px; border-radius: 10px; font-size: 14px;
}
.share:hover { background: var(--glass); }
.share.on { background: var(--primary-soft); box-shadow: inset 0 0 0 1px rgba(138,92,255,.5); }
/* 펼침 단추와 이름을 나눈다 - 한 자리에 두 뜻을 담으면 어느 쪽도 편하지 않다 */
.share .twist {
  flex: none; width: 20px; height: 22px; border-radius: 6px;
  color: var(--muted); font-size: 11px; line-height: 1;
}
.share .twist:hover { background: rgba(255,255,255,.12); color: var(--text); }
.share .label {
  flex: 1; min-width: 0; text-align: left; padding: 3px 4px; border-radius: 6px;
  color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.pane { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pathbar, .selbar {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
/* 홈 단추 - 작은 화살표는 눈에 안 띄고 누르기도 어렵다 */
.home-btn { flex: none; font-size: 13.5px; }
.selbar { background: var(--primary-soft); }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 14px; min-width: 0; }
.crumbs button { padding: 4px 8px; border-radius: 8px; color: var(--muted); }
.crumbs button:hover { background: var(--glass); color: var(--text); }
.crumbs .sep { color: var(--muted); opacity: .5; }

/* 정렬 머리글 — 줄과 같은 칸 너비를 써야 눈금이 맞는다 */
.head {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 26px 6px 26px; border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.head .mark { width: 18px; flex: none; }
.head .name { flex: 1; text-align: left; padding: 2px 4px; border-radius: 6px; }
.head .size { width: 78px; flex: none; text-align: right; }
.head .date { width: 132px; flex: none; text-align: right; }
.head button:hover { color: var(--text); background: var(--glass); }
.head button.on { color: var(--text); }

.file-list { flex: 1; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line);
}
.row:hover { border-color: rgba(255,255,255,.2); }
.row.picked { border-color: rgba(138,92,255,.65); background: linear-gradient(0deg, var(--primary-soft), var(--primary-soft)), var(--card); }
.row .mark { width: 18px; text-align: center; color: var(--muted); }
.row .mark.pick { cursor: pointer; }
.row .mark.pick:hover { color: var(--text); }
.row .name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row .name.dir { cursor: pointer; font-weight: 600; }
.row .size, .row .date { flex: none; font-size: 12px; color: var(--muted); }
.row .date { width: 132px; text-align: right; }
.row .size { width: 78px; text-align: right; }
.list-info { margin: 0; padding: 8px 16px 12px; font-size: 12px; }
.list-info.warn { color: #fbbf24; }

/* 올리기 */
.drop {
  flex: none;
  margin: 0 14px 12px; padding: 10px 14px 12px;
  border: 1px dashed var(--line); border-radius: 12px;
  background: rgba(11,10,18,.5);
}
.drop.over { background: var(--primary-soft); }
.drop-head { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.queue { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; max-height: 148px; overflow-y: auto; }
.up-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.up-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-row .st { flex: none; width: 96px; text-align: right; color: var(--muted); font-size: 12px; }
.up-row .st.done { color: var(--ok); }
.up-row .st.fail { color: var(--error); }
.bar { flex: none; width: 130px; height: 6px; border-radius: 999px; background: var(--glass); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8a5cff, #6ee7f2); }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 20;
  padding: 12px 20px; font-size: 14px; color: #fff; border-radius: 999px;
  background: linear-gradient(100deg, #8a5cff, #5b32d6);
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
}

@media (max-width: 760px) {
  .side { display: none; }
  .row .date { display: none; }
}

/* ══ 두 칸 (위 내 PC · 아래 NAS) ═══════════════════════
   ★두 칸이 같은 모양이라야 눈이 다시 배우지 않는다:
   왼쪽 트리 · 오른쪽 목록, 그리고 가운데에서 주고받는다. */
.split { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.half { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.half-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-bottom: 1px solid var(--line);
  background: rgba(11,10,18,.42);
}
.half-head .crumbs { min-width: 0; overflow: hidden; flex-wrap: nowrap; }
/* 어느 칸인지는 **늘 같은 자리·같은 색**으로 (보라=NAS, 청록=내 PC) */
.half-title {
  flex: none; padding: 3px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700;
}
.half-title.pc { color: #b8f3f9; background: rgba(110,231,242,.15); border: 1px solid rgba(110,231,242,.38); }
.half-title.nas { color: #ded5ff; background: var(--primary-soft); border: 1px solid rgba(138,92,255,.35); }
.picked-count { font-size: 12px; white-space: nowrap; }
.link-btn.accent { color: #b8f3f9; border-color: rgba(110,231,242,.38); }

.half-body { flex: 1; min-height: 0; display: flex; }
.tree-hint { padding: 12px 10px; font-size: 12.5px; line-height: 1.6; }

/* 주고받는 자리 — 두 칸 **사이**에 있어야 어디서 어디로 가는지가 보인다 */
.mid {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  background: rgba(20,17,30,.92);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.xfer {
  flex: none; padding: 7px 15px; border-radius: 10px;
  font-size: 13px; font-weight: 700;
  color: var(--on-primary, #fff); background: var(--primary);
  border: 1px solid var(--primary);
}
.xfer:hover:not(:disabled) { filter: brightness(1.12); }
.xfer:disabled { opacity: .38; cursor: default; }
/* 진행률은 가운데 줄 **바닥에** 깐다 - 자리를 따로 차지하지 않는다 */
.xfer-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(255,255,255,.08);
}
.xfer-bar > i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .15s ease; }
