/* === Top Bar === */
.debate-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 1rem;
}

.topbar__logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pro), var(--neutral), var(--con));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.topbar__topic {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge--category {
  background: var(--neutral-glow);
  color: var(--neutral);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.badge--complexity {
  background: rgba(245, 158, 11, 0.1);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.btn-new-topic {
  padding: 0.4rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-new-topic:hover {
  border-color: var(--neutral);
  color: var(--text);
}

/* === Context Banner === */
.context-banner {
  margin: 1rem 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.context-banner__text {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
}

.context-banner__criteria {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  font-style: italic;
}

/* === Split Panel === */
.split-panel {
  display: flex;
  margin: 1rem 1.5rem;
  gap: 0;
  min-height: 400px;
}

.split-panel__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.split-panel__col--pro {
  background: var(--pro-dim);
  border-radius: var(--radius) 0 0 var(--radius);
  animation: slideInLeft 0.6s ease-out;
}

.split-panel__col--con {
  background: var(--con-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
  animation: slideInRight 0.6s ease-out;
}

.split-panel__divider {
  width: 2px;
  background: linear-gradient(180deg, var(--pro), var(--neutral), var(--con));
  flex-shrink: 0;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* === Column Headers === */
.col-header {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.col-header--pro {
  background: var(--pro-glow);
  border-left: 3px solid var(--pro);
}

.col-header--con {
  background: var(--con-glow);
  border-left: 3px solid var(--con);
}

.col-header__label {
  display: inline-block;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.col-header--pro .col-header__label { color: var(--pro); }
.col-header--con .col-header__label { color: var(--con); }

.col-header__thesis {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

/* === Argument Cards === */
.arg-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  animation: fadeSlideUp 0.5s ease-out both;
}

.arg-card:hover {
  border-color: var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.arg-card--pro:hover { border-color: rgba(59, 130, 246, 0.3); }
.arg-card--con:hover { border-color: rgba(239, 68, 68, 0.3); }

.arg-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.arg-card__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.arg-card--pro .arg-card__number {
  background: var(--pro-glow);
  color: var(--pro);
}

.arg-card--con .arg-card__number {
  background: var(--con-glow);
  color: var(--con);
}

.arg-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

/* Strength Bar */
.strength-bar {
  position: relative;
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.strength-bar__fill {
  height: 100%;
  border-radius: 999px;
  width: 0;
  transition: width 1s ease-out;
}

.strength-bar--pro .strength-bar__fill {
  background: linear-gradient(90deg, var(--pro), #60a5fa);
}

.strength-bar--con .strength-bar__fill {
  background: linear-gradient(90deg, var(--con), #f87171);
}

.strength-bar__label {
  position: absolute;
  right: 0;
  top: -20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.arg-card__claim {
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.arg-card__evidence {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.75rem;
  border-radius: var(--radius-xs);
  margin-bottom: 0.75rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.arg-card--pro .arg-card__evidence {
  background: rgba(59, 130, 246, 0.04);
  border-left: 2px solid rgba(59, 130, 246, 0.3);
}

.arg-card--con .arg-card__evidence {
  background: rgba(239, 68, 68, 0.04);
  border-left: 2px solid rgba(239, 68, 68, 0.3);
}

.arg-card__warrant {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.arg-card__impact {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Action Buttons */
.arg-card__actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.btn-action {
  padding: 0.4rem 0.875rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-action--counter {
  color: var(--con);
}

.btn-action--counter:hover {
  background: var(--con-glow);
  border-color: var(--con);
}

.btn-action--steelman {
  color: var(--green);
}

.btn-action--steelman:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: var(--green);
}

/* === Rebuttals Section === */
.section-rebuttals,
.section-clashes,
.section-fallacies {
  margin: 2rem 1.5rem;
  animation: fadeSlideUp 0.6s ease-out both;
}

.section-rebuttals { animation-delay: 0.2s; }
.section-clashes { animation-delay: 0.4s; }
.section-fallacies { animation-delay: 0.6s; }

.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title--rebuttals { color: var(--text); }
.section-title--clashes { color: var(--neutral); }
.section-title--fallacies { color: var(--amber); }

.rebuttals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.rebuttals-col__heading {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rebuttals-col--pro .rebuttals-col__heading { color: var(--pro); }
.rebuttals-col--con .rebuttals-col__heading { color: var(--con); }

.rebuttal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.rebuttal-card__target {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.rebuttal-card__text {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.technique-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.technique-refute { background: rgba(239,68,68,0.15); color: var(--con); }
.technique-mitigate { background: rgba(245,158,11,0.15); color: var(--amber); }
.technique-turn { background: rgba(168,85,247,0.15); color: var(--neutral); }
.technique-outweigh { background: rgba(59,130,246,0.15); color: var(--pro); }

/* === Clashes === */
.clashes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1rem;
}

.clash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  border-top: 2px solid var(--neutral);
}

.clash-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--neutral);
  margin-bottom: 0.5rem;
}

.clash-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.clash-card__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.clash-card__pro,
.clash-card__con {
  padding: 0.75rem;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  line-height: 1.5;
}

.clash-card__pro {
  background: var(--pro-dim);
  border-left: 2px solid var(--pro);
}

.clash-card__con {
  background: var(--con-dim);
  border-left: 2px solid var(--con);
}

.clash-card__label {
  display: block;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.clash-card__pro .clash-card__label { color: var(--pro); }
.clash-card__con .clash-card__label { color: var(--con); }

/* === Fallacies === */
.fallacies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1rem;
}

.fallacy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.fallacy-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.fallacy-card__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--amber);
}

.side-badge {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.side-badge--pro { background: var(--pro-glow); color: var(--pro); }
.side-badge--con { background: var(--con-glow); color: var(--con); }
.side-badge--both { background: var(--neutral-glow); color: var(--neutral); }

.fallacy-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.fallacy-card__example {
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 0.6rem 0.75rem;
  background: rgba(245, 158, 11, 0.04);
  border-radius: var(--radius-xs);
  line-height: 1.5;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .debate-topbar {
    flex-wrap: wrap;
  }

  .topbar__topic {
    order: 3;
    flex-basis: 100%;
    text-align: left;
    white-space: normal;
  }

  .rebuttals-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .split-panel {
    margin: 0.5rem;
  }

  .split-panel__col {
    padding: 0.75rem;
  }

  .debate-topbar {
    padding: 0.75rem 1rem;
  }

  .topbar__badges {
    gap: 0.35rem;
  }

  .context-banner {
    margin: 0.75rem;
  }

  .section-rebuttals,
  .section-clashes,
  .section-fallacies {
    margin: 1.5rem 0.75rem;
  }

  .clashes-grid,
  .fallacies-grid {
    grid-template-columns: 1fr;
  }

  .clash-card__split {
    grid-template-columns: 1fr;
  }
}
