/* Palette mimics gofile.io: surface #162036 / #202c48 / #2c3959, slate text, blue accent. */
:root {
  --bg: #162036;
  --surface: #202c48;
  --line: #2c3959;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent-text: #ffffff;
  --danger: #f87171;
  --drop: #1d2a45;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  color-scheme: dark;
  font-family: Inter, "Hiragino Sans", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  line-height: 1.7;
}

a { color: var(--accent); }

.site-header { padding: 18px 24px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}
.brand img { display: block; }

.site-main {
  flex: 1;
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.intro { margin: 16px 0 32px; }
h1 { margin: 0 0 8px; font-size: clamp(1.5rem, 5vw, 2.1rem); line-height: 1.3; }
h2 { margin: 0 0 12px; font-size: 1.1rem; }
.intro p { margin: 0 0 8px; color: var(--muted); }

.panel {
  margin-top: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

label { display: block; margin-bottom: 8px; font-weight: 600; }

.row { display: flex; flex-wrap: wrap; gap: 8px; }

input[type="password"], input[type="text"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

button, .button {
  display: inline-block;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
button:hover, .button:hover { filter: brightness(1.08); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.link-button {
  margin-top: 16px;
  padding: 4px 0;
  background: none;
  color: var(--muted);
  font-weight: 400;
  text-decoration: underline;
}
.link-button.danger { color: var(--danger); }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 56px 20px;
  background: var(--surface);
  border: 2px dashed var(--line);
  border-radius: 8px;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
}
.dropzone strong { color: var(--accent); font-size: 1.1rem; }
.dropzone span { color: var(--muted); font-size: .9rem; }
.dropzone.dragging { background: var(--drop); border-color: var(--accent); }
.dropzone:focus-within { border-color: var(--accent); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

progress { display: block; width: 100%; height: 10px; accent-color: var(--accent); }

.status { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }
.error { margin: 8px 0 0; color: var(--danger); font-size: .9rem; }

.file-list { margin: 16px 0 0; padding: 0; list-style: none; }
.file-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.file-name { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.file-size { color: var(--muted); font-size: .9rem; white-space: nowrap; }

.site-footer {
  padding: 16px;
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
}
.site-footer p { margin: 0; }

/* Owner dashboard */
.site-header {display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
body:has(#gate) .site-main{width:min(1200px,100%)}
body:has(#gate) #uploader{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:20px;align-items:start}
#uploader>.panel:first-child{grid-row:1 / span 5;margin-top:0;min-height:360px}
#uploader>.dropzone{padding:40px 16px}
#uploader>.link-button{justify-self:start}
#libraryFiles .file-name{flex-basis:100%;font-weight:600}
#libraryFiles button{font-size:.82rem;padding:6px 10px}
button.danger{background:transparent;color:var(--danger);border:1px solid var(--line)}
button:disabled{opacity:.5;cursor:wait}
@media(max-width:800px){body:has(#gate) #uploader{display:flex;flex-direction:column}#uploader>*{width:100%}#uploader>.panel:first-child{min-height:0}}
