/* 大大力（DARRY KING）行銷神隊友 共用樣式
   品牌色：黃 #FFD500（主） + 黑 #111（底） + 白點綴 + 金 #F0C078 點綴
   風格：陽剛 / 街頭海報 / 汽車職人 */

:root {
  --brand: #FFD500;        /* 大大力主黃 */
  --brand-2: #FFE74C;      /* 亮黃（hover） */
  --brand-deep: #E5BD00;   /* 深黃（按下/邊框） */
  --bg: #111111;           /* 純黑底 */
  --bg-2: #1A1A1A;         /* 卡片底 */
  --bg-3: #222222;         /* 輸入框底 */
  --line: #2C2C2C;
  --text: #FFFFFF;
  --text-on-yellow: #111;  /* 黃底時用黑字 */
  --text-dim: #B5B5B5;
  --accent: #F0C078;       /* 金（點綴） */
  --ok: #2ECC71;
  --warn: #FFD500;
  --err: #FF5C5C;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow: 0 6px 24px rgba(0,0,0,.55);
  --shadow-yellow: 0 6px 24px rgba(255,213,0,.25);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(255,213,0,.18), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(255,213,0,.06), transparent 60%);
  min-height: 100vh;
  line-height: 1.65;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { color: var(--accent); }

button { font-family: inherit; cursor: pointer; }

/* ===== Header ===== */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(10,14,20,.7);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.site-header .logo {
  font-weight: 800; font-size: 20px; letter-spacing: 1px;
  background: linear-gradient(90deg, var(--brand-2), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.site-header nav a {
  margin-left: 18px; color: var(--text-dim); font-size: 14px;
}
.site-header nav a:hover { color: var(--text); }

/* ===== Hero ===== */
.hero {
  padding: 72px 28px 48px;
  max-width: 1180px; margin: 0 auto;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block; padding: 6px 14px;
  background: rgba(255,213,0,.14); color: var(--brand-2);
  border: 1px solid rgba(255,213,0,.4);
  border-radius: 999px; font-size: 13px; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  margin: 0 0 16px; font-weight: 900; letter-spacing: 1px;
  line-height: 1.25;
}
.hero h1 .accent { color: var(--accent); }
.hero p.lead {
  font-size: 17px; color: var(--text-dim);
  max-width: 720px; margin: 0 auto 24px;
}

/* ===== 工具卡網格 ===== */
.section {
  max-width: 1180px; margin: 0 auto; padding: 36px 28px;
}
.section h2 {
  font-size: 22px; margin: 0 0 6px; display: flex; align-items: center; gap: 10px;
}
.section .section-desc {
  color: var(--text-dim); font-size: 14px; margin: 0 0 22px;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.tool-card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px;
  display: flex; flex-direction: column;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.tool-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-2), var(--accent));
  opacity: .6;
}
.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,213,0,.6);
  box-shadow: var(--shadow);
}
.tool-card .icon { font-size: 32px; margin-bottom: 12px; }
.tool-card h3 { margin: 0 0 8px; font-size: 18px; }
.tool-card p { color: var(--text-dim); font-size: 14px; margin: 0 0 16px; flex: 1; }
.tool-card .enter {
  align-self: flex-start;
  background: var(--brand); color: #fff; border: none;
  padding: 9px 18px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600;
}
.tool-card .enter:hover { background: var(--brand-2); }

/* ===== 工具頁面 ===== */
.tool-page {
  max-width: 1080px; margin: 0 auto; padding: 36px 24px 100px;
}
.tool-page .breadcrumb {
  font-size: 13px; color: var(--text-dim); margin-bottom: 12px;
}
.tool-page h1 {
  font-size: 28px; margin: 0 0 6px;
}
.tool-page .subtitle {
  color: var(--text-dim); margin: 0 0 28px;
}

.panel {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 22px;
  margin-bottom: 18px;
}
.panel h3 {
  margin: 0 0 14px; font-size: 16px;
  display: flex; align-items: center; gap: 8px;
}
.panel .hint { font-size: 13px; color: var(--text-dim); margin-bottom: 12px; }

label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
input[type=text], textarea, select {
  width: 100%;
  background: var(--bg-3); color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 13px; font-size: 15px;
  font-family: inherit; line-height: 1.5;
  transition: border-color .15s;
}
textarea { min-height: 100px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--brand-2);
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn {
  background: var(--brand); color: #fff; border: none;
  padding: 11px 22px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 600;
}
.btn:hover { background: var(--brand-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary {
  background: transparent; border: 1px solid var(--line); color: var(--text);
}
.btn.secondary:hover { border-color: var(--brand-2); color: var(--brand-2); }
.btn.demo {
  background: rgba(240,192,120,.14);
  border: 1px dashed rgba(240,192,120,.5);
  color: var(--accent);
}
.btn.demo:hover { background: rgba(240,192,120,.25); }

/* ===== 結果 + Refine ===== */
.result-wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
@media (max-width: 880px) { .result-wrap { grid-template-columns: 1fr; } }

.result-box {
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 16px;
  white-space: pre-wrap; word-wrap: break-word;
  min-height: 240px; font-size: 15px; line-height: 1.85;
}
.result-box.empty { color: var(--text-dim); font-style: italic; display: flex; align-items: center; justify-content: center; }
.result-box.loading { color: var(--brand-2); }

.refine-box {
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 14px;
}
.refine-box h4 { margin: 0 0 6px; font-size: 14px; color: var(--accent); }
.refine-box p.hint { font-size: 12px; color: var(--text-dim); margin: 0 0 10px; }
.refine-box textarea { min-height: 80px; font-size: 14px; }
.refine-box .btn { width: 100%; margin-top: 10px; padding: 9px; font-size: 14px; }

.copy-btn {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,213,0,.18); color: var(--brand-2);
  border: 1px solid rgba(255,213,0,.5);
  padding: 5px 11px; border-radius: var(--r-sm);
  font-size: 12px;
}
.copy-btn:hover { background: rgba(255,213,0,.4); }

.result-card { position: relative; }

/* ===== Feedback Bubble ===== */
#fb-bubble {
  position: fixed; right: 22px; bottom: 22px; z-index: 100;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-2), var(--accent));
  color: #fff; border: none; font-size: 24px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
#fb-bubble:hover { transform: scale(1.08); }
#fb-panel {
  position: fixed; right: 22px; bottom: 90px; z-index: 100;
  width: 320px; max-width: calc(100vw - 44px);
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px;
  box-shadow: var(--shadow);
  display: none;
}
#fb-panel.open { display: block; }
#fb-panel h4 { margin: 0 0 4px; }
#fb-panel p.hint { font-size: 12px; color: var(--text-dim); margin: 0 0 10px; }
#fb-panel .tabs { display: flex; gap: 6px; margin-bottom: 10px; }
#fb-panel .tabs button {
  flex: 1; padding: 7px; font-size: 13px;
  background: var(--bg-3); border: 1px solid var(--line);
  color: var(--text-dim); border-radius: var(--r-sm);
}
#fb-panel .tabs button.active { color: var(--text); border-color: var(--brand-2); background: rgba(255,213,0,.14); }
#fb-panel textarea { min-height: 90px; font-size: 13px; }
#fb-panel .send { width: 100%; margin-top: 8px; }
#fb-panel .ok-msg { color: var(--ok); font-size: 13px; margin-top: 8px; display: none; }
#fb-panel .ok-msg.show { display: block; }

footer.site-footer {
  text-align: center; color: var(--text-dim);
  font-size: 13px; padding: 30px 20px 110px;
  border-top: 1px solid var(--line); margin-top: 40px;
}

.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,213,0,.25);
  border-top-color: var(--brand-2);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: middle; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== TonePicker（語氣選擇器） ===== */
.tone-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tone-chip {
  background: var(--bg-3); color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px; font-family: inherit;
  transition: all .15s; cursor: pointer;
}
.tone-chip:hover { border-color: var(--brand); color: var(--brand); }
.tone-chip.active {
  background: var(--brand); color: var(--text-on-yellow);
  border-color: var(--brand); font-weight: 600;
}
