/* ── Crypto Corner — Signal City Broadcast UI ────────────────────────────── */

:root {
  --cc-pete:     #00d4d4;
  --cc-elder:    #f59e0b;
  --cc-arcadi:   #a78bfa;
  --cc-seyra:    #c084fc;
  --cc-narratus: #60a5fa;
  --cc-hackerx:  #34d399;
  --cc-orrin:    #fbbf24;
  --cc-shade:    #f87171;
  --cc-on-air:   #ff4444;
  --card:        rgba(10, 16, 30, 0.82);
  --border:      rgba(120, 154, 255, 0.22);
}

/* ── Shell ─────────────────────────────────────────────────────────────── */
.cc-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ── Header ────────────────────────────────────────────────────────────── */
.cc-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cc-brand {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cc-back {
  color: var(--muted, #a5b0d6);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.cc-back:hover { color: var(--accent, #27e4ff); border-color: var(--accent, #27e4ff); }

.cc-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--accent, #27e4ff);
  display: block;
}

.cc-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #27e4ff 0%, #c084fc 60%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

/* ── Status bar ────────────────────────────────────────────────────────── */
.cc-status-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  overflow: hidden;
}

.cc-onair {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.cc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
  transition: background 0.3s;
}

.cc-onair.live .cc-dot {
  background: var(--cc-on-air);
  box-shadow: 0 0 8px var(--cc-on-air);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.cc-onair-text {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: #555;
  transition: color 0.3s;
}
.cc-onair.live .cc-onair-text { color: var(--cc-on-air); }

.cc-ticker-wrap {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
}

.cc-ticker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted, #a5b0d6);
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ── Controls ──────────────────────────────────────────────────────────── */
.cc-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.cc-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--muted, #a5b0d6);
  display: block;
  margin-bottom: 0.3rem;
}

.cc-feed-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cc-select {
  flex: 1;
  min-width: 220px;
  background: rgba(10, 16, 30, 0.9);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: #f6f7ff;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.9rem;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.cc-select:focus, .cc-select:hover { border-color: var(--accent, #27e4ff); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.cc-btn {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cc-btn-secondary {
  background: rgba(39, 228, 255, 0.1);
  color: var(--accent, #27e4ff);
  border: 1px solid rgba(39, 228, 255, 0.35);
}
.cc-btn-secondary:hover {
  background: rgba(39, 228, 255, 0.2);
  box-shadow: 0 0 14px rgba(39, 228, 255, 0.3);
}

.cc-btn-primary {
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.25), rgba(39, 228, 255, 0.18));
  color: #f6f7ff;
  border: 1px solid rgba(192, 132, 252, 0.5);
  font-size: 0.85rem;
  padding: 0.7rem 2rem;
}
.cc-btn-primary:hover {
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.4), rgba(39, 228, 255, 0.3));
  box-shadow: 0 0 24px rgba(192, 132, 252, 0.4), 0 0 48px rgba(39, 228, 255, 0.2);
  transform: translateY(-1px);
}
.cc-btn-primary:active { transform: translateY(0); }
.cc-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cc-btn-icon { margin-right: 0.4rem; }

/* ── Headlines box ─────────────────────────────────────────────────────── */
.cc-headlines-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 48px;
}

.cc-placeholder {
  color: var(--muted, #a5b0d6);
  font-size: 0.85rem;
  font-style: italic;
  padding: 0.5rem 0;
}

.cc-hl-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: all 0.18s;
}
.cc-hl-item:hover {
  background: rgba(39, 228, 255, 0.07);
  border-color: rgba(39, 228, 255, 0.4);
}
.cc-hl-item.selected {
  background: rgba(192, 132, 252, 0.12);
  border-color: rgba(192, 132, 252, 0.55);
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.2);
}

.cc-hl-idx {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  color: var(--muted, #a5b0d6);
  width: 1.4rem;
  flex-shrink: 0;
  text-align: right;
}

.cc-hl-text {
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.35;
}

/* ── Summon row ────────────────────────────────────────────────────────── */
.cc-summon-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}

.cc-selected-hl {
  flex: 1;
  min-width: 200px;
  font-size: 0.82rem;
  color: var(--muted, #a5b0d6);
  font-style: italic;
  line-height: 1.4;
}

/* ── Council Stage ─────────────────────────────────────────────────────── */
.cc-stage {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cc-stage-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cc-stage-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent, #27e4ff);
}

.cc-headline-pill {
  background: rgba(192, 132, 252, 0.15);
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: 20px;
  padding: 0.2rem 0.85rem;
  font-size: 0.78rem;
  color: #c084fc;
  max-width: 600px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-council-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* ── Host card ─────────────────────────────────────────────────────────── */
.cc-host-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cc-host-card:hover {
  box-shadow: 0 0 20px var(--host-glow, rgba(39, 228, 255, 0.15));
}

.cc-host-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cc-host-icon {
  font-size: 1.3rem;
  width: 2rem;
  text-align: center;
  flex-shrink: 0;
}

.cc-host-name {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.cc-host-method {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--muted, #a5b0d6);
  margin-top: 0.15rem;
}

.cc-host-reading {
  font-size: 0.87rem;
  line-height: 1.55;
  color: #dde3f4;
  min-height: 3.5rem;
}

/* skeleton loading state */
.cc-host-reading.loading {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.cc-skeleton {
  height: 0.75rem;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.cc-skeleton:nth-child(2) { width: 85%; }
.cc-skeleton:nth-child(3) { width: 70%; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Source row ────────────────────────────────────────────────────────── */
.cc-source-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  color: var(--muted, #a5b0d6);
  padding-top: 0.25rem;
}
.cc-source-row a {
  color: var(--accent, #27e4ff);
  text-decoration: none;
}
.cc-source-row a:hover { text-decoration: underline; }

/* ── Error state ───────────────────────────────────────────────────────── */
.cc-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  color: #f87171;
  font-size: 0.85rem;
}

/* ── Image generation ──────────────────────────────────────────────────── */
.cc-image-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.cc-image-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cc-image-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--muted, #a5b0d6);
}

.cc-btn-genimg {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(192, 132, 252, 0.15));
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.cc-btn-genimg:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(192, 132, 252, 0.25));
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
  transform: translateY(-1px);
}
.cc-btn-genimg:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#image-result {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cc-generated-img {
  width: 100%;
  max-width: 600px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.15), 0 0 80px rgba(192, 132, 252, 0.1);
  display: block;
}

.cc-img-caption {
  font-size: 0.75rem;
  color: var(--muted, #a5b0d6);
  font-style: italic;
  max-width: 600px;
  line-height: 1.45;
}

/* ── Spinner ───────────────────────────────────────────────────────────── */
.cc-loading-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted, #a5b0d6);
  font-size: 0.82rem;
}
.cc-spin {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(39,228,255,0.2);
  border-top-color: var(--accent, #27e4ff);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Cached badge ──────────────────────────────────────────────────────── */
.cc-cached-badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #60a5fa;
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
}

/* ── Callers / Open Lines ──────────────────────────────────────────────── */
.cc-callers-section {
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 1.5rem;
}
.cc-callers-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.cc-callers-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--muted, #a5b0d6);
  text-transform: uppercase;
}
.cc-btn-callers {
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.35);
  color: #c084fc;
}
.cc-btn-callers:hover:not(:disabled) {
  background: rgba(192, 132, 252, 0.22);
  border-color: rgba(192, 132, 252, 0.6);
}
.cc-callers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.cc-caller-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 0 0 18px var(--caller-glow, transparent);
  transition: box-shadow 0.3s;
}
.cc-caller-meta {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.cc-caller-icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.cc-caller-name {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.cc-caller-method {
  font-size: 0.68rem;
  color: var(--muted, #a5b0d6);
  margin-top: 0.1rem;
}
.cc-caller-line {
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
}
.cc-caller-card.loading {
  pointer-events: none;
}
