* { box-sizing: border-box; font-family: system-ui, sans-serif; }

body { margin: 0; background: #f5f5f5; }

#app { padding: 16px; padding-bottom: 80px; }

h1, h2 { text-align: center; }

.card { background: #fff; padding: 12px; border-radius: 10px; margin-bottom: 12px; }

.stats { font-size: 14px; }

.progress { height: 6px; background: #eee; border-radius: 6px; margin-top: 6px; }
#progress-bar { width: 20%; height: 100%; background: #000; border-radius: 6px; }

.buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

button { padding: 10px; border-radius: 10px; border: 1px solid #ccc; background: #fff; font-size: 14px; }
button.secondary { background: #eee; }

.ai-btn { opacity: 0.5; margin-top: 8px; }

.screen { display: none; }

textarea, input {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

label { display: block; font-size: 14px; margin: 10px 0 6px; }

.checkbox { font-size: 14px; margin-bottom: 10px; }

.actions { display: flex; gap: 10px; }
.actions button { width: 100%; }

.explanation {
  font-size: 14px;
  line-height: 1.4;
  background: #fafafa;
  border: 1px dashed #ccc;
}

#bottom-ad {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 50px;
  background: #ddd;
  text-align: center;
  line-height: 50px;
  font-size: 13px;
}

/* Channels */
.statusline {
  padding: 10px;
  border-radius: 10px;
  border: 1px dashed #ccc;
  background: #fafafa;
  font-size: 14px;
}

.channel-item {
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

.channel-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.channel-name { font-weight: 800; }

.channel-meta { font-size: 13px; color: #666; margin-top: 4px; }

.badge {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid #ccc;
  background: #f6f6f6;
  white-space: nowrap;
}


/* --- Help tooltip (?) --- */
.help{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#d0d0d0;
  color:#111;
  font-size:12px;
  margin-left:6px;
  cursor:pointer;
  user-select:none;
}

.help-popover{
  position:fixed;
  z-index:9999;
  max-width:260px;
  padding:10px 12px;
  border-radius:12px;
  background:#111;
  color:#fff;
  font-size:12px;
  line-height:1.35;
  box-shadow:0 10px 25px rgba(0,0,0,0.25);
}

.row select{
  width:100%;
  padding:8px;
  border-radius:8px;
  border:1px solid #ccc;
  margin-bottom:10px;
}


/* =======================
   Modal (Topic picker)
======================= */
.modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}
.modal-card{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 24px));
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
