/* public_html/style.css
   シンプルで見やすい UI（トップボタンは #5865f2 に統一）
*/

/* カラーパレット */
:root{
  --primary: #5865f2;    /* 指定カラー（トップボタン） */
  --accent: #7c8cff;
  --bg: #f6f8ff;
  --card: #ffffff;
  --muted: #f3f5ff;
  --text: #111827;
  --muted-text: #6b7280;
  --success: #16a34a;
  --danger: #ef4444;
  --border: #e6e9ff;
}

/* 基本 */
*{box-sizing:border-box}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, "Helvetica Neue", Arial;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.5;
}
.container{
  max-width:1000px;
  margin:28px auto;
  padding:0 16px;
}

/* Top bar */
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
  flex-wrap:wrap;
}
.nav-left, .nav-right{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

/* トップ用ボタン（指定どおり #5865f2） */
.top-btn{
  background:var(--primary);
  color:#fff;
  border:none;
  padding:8px 12px;
  border-radius:8px;
  text-decoration:none;
  font-weight:600;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  box-shadow:0 6px 18px rgba(88,101,242,0.08);
}
.top-btn:hover{filter:brightness(.96);transform:translateY(-1px);}

/* コンテンツカード */
.card{
  background:var(--card);
  border-radius:12px;
  padding:18px;
  box-shadow:0 8px 24px rgba(16,24,40,0.04);
}

/* 見出しと説明 */
h1{margin-top:0;font-size:1.4rem}
.small{font-size:0.9rem;color:var(--muted-text)}

/* フォーム要素 */
label{display:block;margin:10px 0 6px}
input[type="file"]{display:block}
textarea{width:100%;min-height:120px;padding:10px;border-radius:8px;border:1px solid var(--border);background:#fff;resize:vertical;font-family:monospace}
input[type="text"], input[type="url"], select {width:100%;padding:8px;border-radius:8px;border:1px solid var(--border);background:#fff}

/* オプションチェック */
.options label{display:inline-flex;align-items:center;gap:8px;margin-right:12px;color:var(--muted-text)}

/* 操作ボタン（フォーム内） */
.btn-primary{
  background:var(--primary);
  color:#fff;
  border:none;
  padding:10px 14px;
  border-radius:8px;
  font-weight:600;
  cursor:pointer;
}
.btn-outline{
  background:transparent;
  color:var(--primary);
  border:1px solid rgba(88,101,242,0.18);
  padding:9px 12px;
  border-radius:8px;
  cursor:pointer;
}
.btn-primary:disabled, .btn-outline:disabled{opacity:0.6;cursor:not-allowed}

/* 進捗バー */
.progress-wrap{margin-top:12px}
.progress{width:100%;height:10px;background:var(--muted);border-radius:8px;overflow:hidden;margin-top:6px}
#progress-bar{height:100%;width:0%;background:linear-gradient(90deg,var(--accent),var(--primary));transition:width .2s ease}

/* 結果領域 */
.result{
  margin-top:14px;
  background:linear-gradient(180deg, #fff, #fbfdff);
  border:1px solid var(--border);
  padding:12px;border-radius:10px;
  color:var(--text);
}

/* テーブル（生成リストなど） */
.table{width:100%;border-collapse:collapse;margin-top:10px}
.table th,.table td{padding:8px;border:1px solid #eef2ff;text-align:left;font-size:0.95rem}
.table th{background:#fbfbff;color:var(--muted-text)}

/* 設定パネル（背景：白、文字：濃色） */
.settings-panel{
  background: #fff;
  color: var(--text);
  padding:16px;
  border-radius:10px;
  border:1px solid var(--border);
  box-shadow:0 6px 18px rgba(16,24,40,0.03);
}
.settings-panel h2{margin-top:0;color:var(--primary)}
.settings-panel label{font-weight:600;color:#111827}

/* .dropdown 小調整 */
.dropdown { position:relative; }
.dropdown .dropdown-content{
  display:none;
  position:absolute;
  right:0;
  top:48px;
  background:#fff;
  padding:10px;
  border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,0.08);
  border:1px solid var(--border);
  min-width:220px;
  z-index:40;
}

/* rules editor (soft & pop) */
.rules-editor { background: linear-gradient(180deg,#ffffff,#fbfdff); border:1px solid #eef4ff; padding:12px; border-radius:10px; }
.rules-rows { display:flex; flex-direction:column; gap:8px; margin-top:8px; }
.rule-row { display:flex; gap:8px; align-items:center; }
.rule-input { flex:1; padding:10px 12px; border-radius:10px; border:1px solid #e6eefc; background:#fff; font-family:monospace; }
.rule-input::placeholder { color:#bfcffb; }
.rule-badge { width:36px; height:36px; border-radius:8px; background:#f0f3ff; color:#5865f2; display:flex; align-items:center; justify-content:center; font-weight:700; }
.rule-actions { display:flex; gap:6px; }
.rule-remove { background:#ffecec; color:#ef4444; border:none; padding:6px 8px; border-radius:8px; cursor:pointer; }
.rule-handle { cursor:grab; opacity:0.6; padding:6px; border-radius:8px; background:#f7f9ff; }

/* small responsive niceties */
@media (max-width:640px){
  .rule-row{flex-direction:column;align-items:stretch}
  .rule-badge{width:100%;height:auto;padding:8px;border-radius:8px;text-align:center}
  .topbar{flex-direction:column;align-items:flex-start}
}

.text-muted{color:var(--muted-text)}
.center{text-align:center}