﻿/* Bot Panel — Style */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
  font-size: 14px;
}

/* ─── Site Seçici ─────────────────────────────────────────────────────────── */
.selector-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.selector-header { text-align: center; margin-bottom: 48px; }
.selector-header h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 8px; }
.selector-header p  { color: #94a3b8; font-size: 1.1rem; }

.site-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  max-width: 900px;
  width: 100%;
}
.site-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 32px 24px;
  text-decoration: none;
  color: inherit;
  transition: all .2s;
  cursor: pointer;
}
.site-card:hover { border-color: #3b82f6; background: #1e3a5f; transform: translateY(-2px); }
.site-card-icon  { font-size: 2.5rem; margin-bottom: 12px; }
.site-card-name  { font-size: 1.2rem; font-weight: 600; margin-bottom: 6px; }
.site-card-url   { font-size: .8rem; color: #64748b; margin-bottom: 8px; }
.site-card-desc  { font-size: .85rem; color: #94a3b8; }
.site-card-add   { border-style: dashed; opacity: .6; }
.site-card-add:hover { opacity: 1; }

/* ─── App Layout ──────────────────────────────────────────────────────────── */
.app { max-width: 1400px; margin: 0 auto; padding: 0 16px 40px; }

/* ─── Header ──────────────────────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.header-left  { display: flex; align-items: center; gap: 10px; }
.header-logo  { font-size: 1.6rem; }
.header-title { font-size: 1.2rem; font-weight: 700; }
.header-url   { font-size: .8rem; color: #64748b; }
.header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.proxy-pill {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .8rem;
  cursor: pointer;
  transition: border-color .2s;
}
.proxy-pill:hover { border-color: #3b82f6; }

.badge {
  background: #16a34a;
  color: #fff;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .8rem;
  font-weight: 600;
  animation: pulse 2s infinite;
}
.badge.hidden { display: none !important; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.7} }

/* ─── Error Banner ────────────────────────────────────────────────────────── */
.error-banner {
  background: #7f1d1d;
  border: 1px solid #dc2626;
  border-radius: 10px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

/* ─── Main Grid ───────────────────────────────────────────────────────────── */
.app-main {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 900px) { .app-main { grid-template-columns: 1fr; } }

/* ─── Panel ───────────────────────────────────────────────────────────────── */
.panel {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 24px;
}
.panel h2 { font-size: 1rem; font-weight: 600; margin-bottom: 20px; color: #94a3b8; letter-spacing: .05em; }

/* ─── Progress ────────────────────────────────────────────────────────────── */
.progress-item      { margin-bottom: 20px; }
.progress-label     { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: 6px; }
.progress-bar-wrap  { background: #0f172a; border-radius: 6px; height: 8px; overflow: hidden; }
.progress-bar       { height: 100%; background: linear-gradient(90deg,#3b82f6,#6366f1); border-radius: 6px; transition: width .5s; width: 0%; }
.progress-bar.bar-imgs { background: linear-gradient(90deg,#10b981,#059669); }
.progress-pct       { font-size: .75rem; color: #64748b; margin-top: 4px; text-align: right; }

.current-action { background:#0f172a; border:1px solid #334155; border-radius:8px; padding:8px 12px; font-size:.8rem; color:#94a3b8; margin-top:16px; }
.last-activity  { font-size:.75rem; margin-top:8px; }
.act-fresh  { color:#4ade80; }
.act-slow   { color:#fbbf24; }
.act-stale  { color:#f87171; }

/* ─── Controls ────────────────────────────────────────────────────────────── */
.step-group { margin-bottom: 16px; }
.step-title { font-size: .75rem; color: #64748b; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }

.export-btns { display: flex; gap: 6px; flex-wrap: wrap; }

.control-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.worker-status { font-size: .8rem; color: #64748b; margin-top: 12px; min-height: 20px; }

hr { border: none; border-top: 1px solid #334155; margin: 16px 0; }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { opacity: .85; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary  { background: #3b82f6; color: #fff; }
.btn-success  { background: #16a34a; color: #fff; }
.btn-danger   { background: #dc2626; color: #fff; }
.btn-warning  { background: #d97706; color: #fff; }
.btn-outline  { background: transparent; color: #94a3b8; border: 1px solid #334155; }
.btn-outline:hover { border-color: #3b82f6; color: #3b82f6; }
.btn-ghost    { background: transparent; color: #64748b; }
.btn-ghost:hover  { color: #e2e8f0; }
.btn-sm { padding: 5px 10px; font-size: .78rem; }

/* ─── Logs ────────────────────────────────────────────────────────────────── */
.panel-logs { margin-top: 0; }
.log-box {
  max-height: 320px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: .78rem;
  line-height: 1.6;
}
.log-line   { padding: 2px 0; border-bottom: 1px solid #1e293b; }
.log-time   { color: #475569; margin-right: 8px; }
.log-info   { color: #94a3b8; }
.log-warn   { color: #fbbf24; }
.log-error  { color: #f87171; }
.log-debug  { color: #64748b; }
.log-empty  { color: #475569; font-style: italic; }
