/* ============================================================
   SendBOX - スタイルシート
   配色は指定パレットに準拠
   ============================================================ */

:root {
  --bg: #FFFFFF;            /* 背景 */
  --surface: #F8FAFC;       /* カード(面) */
  --primary: #60A5FA;       /* メインカラー */
  --primary-hover: #3B82F6; /* ホバー */
  --accent-light: #DBEAFE;  /* 薄いアクセント */
  --border: #E5E7EB;        /* 枠線 */
  --text: #1F2937;          /* 文字 */
  --text-light: #6B7280;    /* 薄い文字 */
  --row-hover: #EFF6FF;     /* カード類のホバー */
  --danger: #DC2626;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
               "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

/* ---------------- ヘッダー ---------------- */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  font-size: 0.9rem;
  margin-right: 8px;
  transform: translateY(-1px);
}

.tagline {
  color: var(--text-light);
  font-size: 0.8rem;
}

/* ---------------- レイアウト ---------------- */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.hero {
  text-align: center;
  margin: 8px 0 24px;
}

.hero h1 {
  font-size: 1.65rem;
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}

.hero p {
  color: var(--text-light);
  margin: 0;
}

/* ---------------- カード ---------------- */

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 1px 3px rgba(31, 41, 55, 0.05);
}

.card + .card { margin-top: 20px; }

.card h2 { font-size: 1.05rem; margin: 0 0 10px; }

/* ---------------- ドロップゾーン ---------------- */

.dropzone {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  outline: none;
}

.dropzone:hover,
.dropzone:focus-visible {
  background: var(--row-hover);
  border-color: var(--primary);
}

.dropzone.dragover {
  background: var(--accent-light);
  border-color: var(--primary-hover);
}

.dz-icon {
  width: 52px;
  height: 52px;
  line-height: 52px;
  margin: 0 auto 12px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 1.4rem;
}

.dz-main { font-weight: 700; margin: 0 0 4px; font-size: 1.05rem; }
.dz-sub  { color: var(--text-light); font-size: 0.82rem; margin: 2px 0; }

/* ---------------- ファイル一覧 ---------------- */

.file-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.file-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 8px;
  transition: background 0.15s ease;
}

.file-list li:hover { background: var(--row-hover); }

.file-list .f-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.file-list .f-size {
  color: var(--text-light);
  font-size: 0.8rem;
  white-space: nowrap;
}

.file-list .f-remove {
  border: none;
  background: transparent;
  color: var(--text-light);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1;
}

.file-list .f-remove:hover {
  background: var(--accent-light);
  color: var(--primary-hover);
}

.total-size {
  text-align: right;
  color: var(--text-light);
  font-size: 0.82rem;
  margin: 4px 0 0;
}

.total-size.over { color: var(--danger); font-weight: 700; }

/* ---------------- フォーム ---------------- */

.field { margin: 20px 0 16px; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
}

input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  font-family: inherit;
}

input[type="password"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--accent-light);
}

input::placeholder { color: #9CA3AF; }

/* ---------------- ボタン ---------------- */

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { background: var(--primary-hover); }

.btn:focus-visible {
  outline: 2px solid var(--primary-hover);
  outline-offset: 2px;
}

.btn:disabled {
  background: var(--accent-light);
  color: var(--text-light);
  cursor: not-allowed;
}

.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; }

.btn-ghost {
  background: var(--bg);
  color: var(--primary-hover);
  border: 1px solid var(--border);
}

.btn-ghost:hover { background: var(--row-hover); }

.btn.copied { background: #10B981; }

/* ---------------- 進捗バー ---------------- */

.progress {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-track {
  flex: 1;
  height: 10px;
  background: var(--accent-light);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.progress-text {
  color: var(--text-light);
  font-size: 0.82rem;
  min-width: 110px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------------- 結果 / ダウンロードカード ---------------- */

.result-card, .dl-card, .lock-card, .message-card { text-align: center; }

.result-icon { font-size: 2rem; margin-bottom: 4px; }

.result-name {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 4px 0 0;
  word-break: break-all;
}

.file-icon { font-size: 2.6rem; margin-bottom: 6px; }

.file-name {
  font-size: 1.3rem;
  margin: 0 0 18px;
  word-break: break-all;
}

.meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 22px;
}

.meta-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 8px;
}

.meta-item dt {
  color: var(--text-light);
  font-size: 0.72rem;
  margin-bottom: 2px;
}

.meta-item dd {
  margin: 0;
  font-weight: 700;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

/* ---------------- リンク表示 ---------------- */

.link-section { margin-top: 24px; text-align: left; }

.link-section h2, .link-section h3 { font-size: 0.95rem; margin: 0 0 8px; }

.link-box { display: flex; gap: 8px; }

.link-box input {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  font-size: 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.link-box .btn { flex-shrink: 0; }

/* ---------------- ファイル構成 ---------------- */

.structure { margin-top: 24px; text-align: left; }

.structure h2 .count {
  color: var(--text-light);
  font-weight: 400;
  font-size: 0.8rem;
}

.structure-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg);
}

.structure-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

.structure-list li:last-child { border-bottom: none; }
.structure-list li:hover { background: var(--row-hover); }

.structure-list .s-name { word-break: break-all; }

.structure-list .s-size {
  color: var(--text-light);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------------- パスワードページ ---------------- */

.lock-form {
  display: flex;
  gap: 8px;
  max-width: 380px;
  margin: 18px auto 0;
}

.lock-form input { flex: 1; min-width: 0; }

/* ---------------- 汎用 ---------------- */

.note { color: var(--text-light); font-size: 0.82rem; }
.note.center { text-align: center; margin-top: 14px; }

.error-msg {
  color: var(--danger);
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.88rem;
  margin: 14px 0 0;
}

.message-card .btn { margin-top: 10px; }

/* ---------------- フッター / 利用規約 ---------------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 32px 20px 40px;
}

.terms {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
}

.terms h2 {
  font-size: 1rem;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}

.terms ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text-light);
  font-size: 0.82rem;
}

.terms li { margin-bottom: 8px; }
.terms strong { color: var(--text); }

.copyright {
  max-width: 720px;
  margin: 16px auto 0;
  text-align: center;
  color: var(--text-light);
  font-size: 0.75rem;
}

/* ---------------- レスポンシブ / アクセシビリティ ---------------- */

@media (max-width: 520px) {
  .card { padding: 20px 16px; }
  .hero h1 { font-size: 1.35rem; }
  .dropzone { padding: 30px 14px; }
  .lock-form { flex-direction: column; }
  .progress-text { min-width: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
