/* Inner Council (İç Konsey) — Çoklu Arketip Simülasyonu Stilleri */

/* Container & Viewport Lock: Keep all elements strictly within screen height (No Outer Page Scrolling) */
body.has-council-page {
  overflow: hidden !important;
}
body.has-council-page .main-wrapper,
.main-wrapper:has(.council-chamber) {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}
body.has-council-page .main-content,
.main-content:has(.council-chamber) {
  height: calc(100vh - 64px) !important;
  max-height: calc(100vh - 64px) !important;
  padding: 10px 18px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
}

/* Chill Ambient Chamber - Strictly fits available viewport height */
.council-chamber {
  position: relative;
  background: radial-gradient(circle at 50% 15%, rgba(28, 25, 44, 0.75) 0%, rgba(10, 11, 15, 0.96) 65%, #000000 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: 12px 18px;
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  height: 100% !important;
  max-height: 100% !important;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0 !important;
  box-sizing: border-box;
}

/* Ambient Subtle Aura Glow */
.council-chamber::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 350px;
  background: radial-gradient(ellipse, rgba(139, 92, 246, 0.12), rgba(59, 130, 246, 0.05) 50%, transparent 80%);
  filter: blur(60px);
  pointer-events: none;
  animation: chamberPulse 8s ease-in-out infinite alternate;
}

@keyframes chamberPulse {
  0% { opacity: 0.5; transform: translateX(-50%) scale(0.95); }
  100% { opacity: 0.9; transform: translateX(-50%) scale(1.05); }
}

/* Header & Controls */
.council-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.council-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.council-emblem {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.council-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}

.council-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.council-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Chill Ambience Audio Toggle Button */
.btn-chill-ambient {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e4e4e7;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-chill-ambient:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-chill-ambient.playing {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
}

/* Ambient Environment Controls Dock */
.ambient-controls-dock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 12, 18, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
  font-size: 11px;
}

.ambient-sound-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.ambient-sound-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.ambient-sound-pill.active {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.ambient-volume-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #a1a1aa;
  padding: 0 4px;
}

.ambient-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

.ambient-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
  cursor: pointer;
}

.ambient-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
  cursor: pointer;
  border: none;
}

/* Audio wave bars animation */
.sound-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.sound-bar {
  width: 2.5px;
  background: currentColor;
  border-radius: 1px;
  height: 4px;
  transition: height 0.2s;
}

.playing .sound-bar:nth-child(1) { animation: soundWave 0.7s ease-in-out infinite alternate; }
.playing .sound-bar:nth-child(2) { animation: soundWave 1.0s ease-in-out infinite alternate 0.15s; }
.playing .sound-bar:nth-child(3) { animation: soundWave 0.85s ease-in-out infinite alternate 0.3s; }

@keyframes soundWave {
  0% { height: 3px; }
  100% { height: 14px; }
}

/* =========================================================
   AMBIENT ENVIRONMENT TRANSFORMATION (ORTAM DEĞİŞİKLİĞİ)
   ========================================================= */
.council-chamber.ambient-mode-active {
  border-color: rgba(16, 185, 129, 0.35) !important;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(16, 185, 129, 0.15), inset 0 1px 0 rgba(16, 185, 129, 0.35) !important;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.council-chamber.ambient-mode-active::before {
  background: radial-gradient(ellipse at 50% 15%, rgba(16, 185, 129, 0.25), rgba(139, 92, 246, 0.18) 45%, rgba(245, 158, 11, 0.08) 75%, transparent 90%) !important;
  filter: blur(75px) !important;
  animation: chamberAurora 9s ease-in-out infinite alternate !important;
}

@keyframes chamberAurora {
  0% { opacity: 0.65; transform: translateX(-54%) scale(0.96); filter: blur(70px) hue-rotate(0deg); }
  50% { opacity: 0.95; transform: translateX(-48%) scale(1.06); filter: blur(85px) hue-rotate(25deg); }
  100% { opacity: 0.75; transform: translateX(-52%) scale(1.00); filter: blur(75px) hue-rotate(-15deg); }
}

/* Floating Fireflies / Stardust Particles Layer */
.ambient-particles-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.council-chamber.ambient-mode-active .ambient-particles-layer {
  opacity: 1;
}

.ambient-firefly {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 8px #34d399, 0 0 16px #10b981;
  animation: floatFirefly 9s ease-in-out infinite;
}

.ambient-firefly:nth-child(2) {
  width: 5px; height: 5px; background: #a78bfa;
  box-shadow: 0 0 10px #a78bfa, 0 0 20px #8b5cf6;
  animation-duration: 12s; animation-delay: 2s;
}
.ambient-firefly:nth-child(3) {
  width: 3.5px; height: 3.5px; background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24, 0 0 16px #f59e0b;
  animation-duration: 10s; animation-delay: 4s;
}
.ambient-firefly:nth-child(4) {
  width: 4px; height: 4px; background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8, 0 0 16px #0ea5e9;
  animation-duration: 11s; animation-delay: 1.5s;
}
.ambient-firefly:nth-child(5) {
  width: 3px; height: 3px; background: #34d399;
  box-shadow: 0 0 6px #34d399;
  animation-duration: 8s; animation-delay: 5s;
}
.ambient-firefly:nth-child(6) {
  width: 5px; height: 5px; background: #f472b6;
  box-shadow: 0 0 10px #f472b6;
  animation-duration: 13s; animation-delay: 3s;
}

@keyframes floatFirefly {
  0% { transform: translate(0, 0) scale(0.6); opacity: 0; }
  20% { opacity: 0.9; }
  50% { transform: translate(35px, -60px) scale(1.1); opacity: 1; }
  80% { opacity: 0.7; }
  100% { transform: translate(-25px, -130px) scale(0.5); opacity: 0; }
}

/* Ambient Mode Table and Archetype Glow */
.council-chamber.ambient-mode-active .archetype-card {
  border-color: rgba(255, 255, 255, 0.16) !important;
  background: rgba(18, 20, 29, 0.88) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 18px rgba(16, 185, 129, 0.08) !important;
  transition: all 0.6s ease;
}

.council-chamber.ambient-mode-active .round-table-surface {
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.22), inset 0 0 25px rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  transition: all 0.6s ease;
}

/* Ambient Banner Notification */
.ambient-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), rgba(139, 92, 246, 0.12));
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 6px 14px;
  margin-top: 6px;
  font-size: 11px;
  color: #e4e4e7;
  animation: slideDown 0.3s ease;
}

/* Round Table & Characters Stage */
.council-stage {
  padding: 24px 0 16px 0;
  position: relative;
  z-index: 2;
}

.archetype-cards-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 992px) {
  .archetype-cards-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .archetype-cards-row {
    grid-template-columns: 1fr;
  }
}

.archetype-card {
  position: relative;
  background: rgba(18, 20, 26, 0.7);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.archetype-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid transparent;
  transition: border-color 0.3s ease;
}

/* Specific Archetype Color Theming */
.archetype-card.archetype-gungormus {
  border-left: 3px solid #f59e0b;
}
.archetype-card.archetype-gungormus:hover,
.archetype-card.archetype-gungormus.is-speaking {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.archetype-card.archetype-sefkatli {
  border-left: 3px solid #10b981;
}
.archetype-card.archetype-sefkatli:hover,
.archetype-card.archetype-sefkatli.is-speaking {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.archetype-card.archetype-stoaci {
  border-left: 3px solid #6366f1;
}
.archetype-card.archetype-stoaci:hover,
.archetype-card.archetype-stoaci.is-speaking {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

.archetype-card.archetype-kurator {
  border-left: 3px solid #a855f7;
}
.archetype-card.archetype-kurator:hover,
.archetype-card.archetype-kurator.is-speaking {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.18);
}

.archetype-card.archetype-kurator.silent-mode {
  opacity: 0.65;
  filter: grayscale(25%);
}

/* Speaking Bobbing Animation (hafif aşağı yukarı hızlı ve kısa) */
.archetype-card.is-speaking .archetype-avatar {
  animation: characterTalkingBob 0.38s ease-in-out infinite alternate;
  box-shadow: 0 0 16px currentColor;
}

@keyframes characterTalkingBob {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.04);
  }
  100% {
    transform: translateY(1px) scale(0.98);
  }
}

/* Avatar styling */
.archetype-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.archetype-gungormus .archetype-avatar {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #f59e0b;
}

.archetype-sefkatli .archetype-avatar {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.archetype-stoaci .archetype-avatar {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.4);
  color: #6366f1;
}

.archetype-kurator .archetype-avatar {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.4);
  color: #a855f7;
}

.archetype-meta {
  flex: 1;
  min-width: 0;
}

.archetype-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.archetype-title {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.3;
}

.archetype-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.is-speaking .archetype-status-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.is-speaking .status-dot {
  animation: dotGlow 0.8s ease-in-out infinite alternate;
}

@keyframes dotGlow {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* Discussion Board Container */
.council-discussion-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(10, 11, 15, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  min-height: 400px;
}

/* Active Case Banner */
.active-case-banner {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.case-info-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.round-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* Messages Stream */
.dialogue-stream {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 480px;
  max-height: calc(100vh - 350px);
  scroll-behavior: smooth;
}

.dialogue-stream::-webkit-scrollbar {
  width: 6px;
}
.dialogue-stream::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Loading spinner ring for status hint */
.loading-spin-ring {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spinRing 0.75s linear infinite;
  vertical-align: -1px;
  margin-right: 4px;
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

/* Live Thinking Bubble (Konsey Tartışıyor Animasyon Kartı) */
.council-thinking-bubble {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 80%;
  background: linear-gradient(135deg, rgba(26, 22, 38, 0.9), rgba(15, 14, 22, 0.95));
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.15);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  animation: bubbleSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.thinking-avatar-pulse {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #c084fc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  animation: avatarPulseGlow 1.4s ease-in-out infinite alternate;
}

@keyframes avatarPulseGlow {
  0% { transform: scale(0.96); box-shadow: 0 0 4px rgba(168, 85, 247, 0.2); }
  100% { transform: scale(1.08); box-shadow: 0 0 16px rgba(168, 85, 247, 0.6); }
}

.thinking-content {
  flex: 1;
}

.thinking-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #f4f4f5;
  margin-bottom: 4px;
}

.thinking-dots {
  display: inline-flex;
  gap: 4px;
}

.thinking-dots .dot {
  width: 5px;
  height: 5px;
  background: #c084fc;
  border-radius: 50%;
  animation: dotBlink 1.2s infinite ease-in-out both;
}

.thinking-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.thinking-dots .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes dotBlink {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.3; }
  40% { transform: scale(1.2); opacity: 1; }
}

.thinking-sub {
  font-size: 12px;
  color: #a1a1aa;
  line-height: 1.5;
  margin-bottom: 10px;
}

.thinking-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.thinking-progress-bar {
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #a855f7, #3b82f6);
  border-radius: 2px;
  animation: progressShimmer 1.8s infinite ease-in-out;
}

@keyframes progressShimmer {
  0% { transform: translateX(-100%); }
  50% { width: 60%; }
  100% { transform: translateX(250%); }
}

/* Individual Speech Bubble Item */
.speech-bubble-item {
  display: flex;
  gap: 14px;
  max-width: 90%;
  animation: bubbleSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes bubbleSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.speech-bubble-item.speaker-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.bubble-avatar-mini {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 4px;
}

.bubble-content-wrap {
  flex: 1;
}

.bubble-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.speaker-user .bubble-header {
  justify-content: flex-end;
}

.bubble-speaker-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.bubble-round-badge {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.bubble-body {
  position: relative;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.65;
  background: rgba(22, 25, 34, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Tail accents per archetype */
.speaker-gungormus .bubble-body {
  border-left: 3px solid #f59e0b;
  background: rgba(26, 23, 18, 0.85);
}

.speaker-sefkatli .bubble-body {
  border-left: 3px solid #10b981;
  background: rgba(16, 26, 22, 0.85);
}

.speaker-stoaci .bubble-body {
  border-left: 3px solid #6366f1;
  background: rgba(18, 20, 32, 0.85);
}

.speaker-user .bubble-body {
  border-right: 3px solid #ffffff;
  background: rgba(30, 32, 40, 0.9);
  color: #ffffff;
}

/* Character action cue & dialogue styling */
.character-action-cue {
  font-style: italic;
  font-size: 13px;
  color: #a1a1aa;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Karakter İç Analiz & Zihinsel Arka Plan (Thought Process) */
.bubble-thought-container {
  margin-bottom: 12px;
}

.btn-thought-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a1a1aa;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.btn-thought-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-thought-toggle.open {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.thought-toggle-icon {
  font-size: 12px;
}

.thought-toggle-chevron {
  font-size: 10px;
  margin-left: 2px;
  opacity: 0.7;
}

.bubble-thought-content {
  animation: fadeIn 0.25s ease-out;
  margin-top: 8px;
}

.thought-box-inner {
  background: rgba(10, 12, 18, 0.75);
  border: 1px dashed rgba(161, 161, 170, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.thought-box-header {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a1a1aa;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.thought-box-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: #cbd5e1;
  font-style: italic;
}

.character-spoken-text {
  color: #e4e4e7;
  line-height: 1.65;
}

/* Typing cursor animation */
.typing-cursor {
  display: inline-block;
  width: 7px;
  height: 15px;
  background: #ffffff;
  margin-left: 3px;
  vertical-align: -2px;
  animation: blinkCursor 0.6s infinite alternate;
}

@keyframes blinkCursor {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* KÜRATÖR MANİFESTO KARTI (ÖZEL KONSENSÜS MÜHRÜ) */
.manifesto-box {
  width: 100%;
  margin: 16px 0 10px 0;
  background: linear-gradient(135deg, rgba(32, 22, 52, 0.95), rgba(16, 13, 26, 0.98));
  border: 2px solid rgba(245, 158, 11, 0.55);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.75), 0 0 40px rgba(245, 158, 11, 0.15);
  border-radius: var(--radius-xl);
  padding: 26px 28px;
  position: relative;
  overflow: visible;
  scroll-margin-top: 30px;
  animation: manifestoGlow 4s ease-in-out infinite alternate;
}

@keyframes manifestoGlow {
  0% { border-color: rgba(168, 85, 247, 0.5); box-shadow: 0 8px 30px rgba(168, 85, 247, 0.2); }
  100% { border-color: rgba(251, 191, 36, 0.7); box-shadow: 0 16px 50px rgba(251, 191, 36, 0.3); }
}

.manifesto-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.manifesto-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.manifesto-title {
  font-size: 18px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
}

.manifesto-seal {
  font-size: 26px;
}

.manifesto-badge-seal {
  display: inline-flex;
  align-items: center;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.manifesto-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.manifesto-action-cue {
  font-style: italic;
  color: #fbbf24;
  font-size: 13.5px;
  margin-bottom: 12px;
  opacity: 0.95;
}

.manifesto-intro {
  font-size: 14.5px;
  line-height: 1.75;
  color: #f4f4f5;
  font-weight: 500;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.manifesto-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 18px 0;
}

@media (max-width: 900px) {
  .manifesto-pillars-grid {
    grid-template-columns: 1fr;
  }
}

.manifesto-pillar-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.manifesto-pillar-card:hover {
  transform: translateY(-2px);
}

.manifesto-pillar-card.pillar-gungormus {
  border-left: 3px solid #f59e0b;
}

.manifesto-pillar-card.pillar-sefkatli {
  border-left: 3px solid #10b981;
}

.manifesto-pillar-card.pillar-stoaci {
  border-left: 3px solid #6366f1;
}

.manifesto-pillar-header {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pillar-gungormus .manifesto-pillar-header { color: #f59e0b; }
.pillar-sefkatli .manifesto-pillar-header { color: #34d399; }
.pillar-stoaci .manifesto-pillar-header { color: #818cf8; }

.manifesto-pillar-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: #e4e4e7;
}

.manifesto-roadmap-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 18px;
}

.manifesto-roadmap-title {
  font-size: 13px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.manifesto-roadmap-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.manifesto-roadmap-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #f4f4f5;
}

.manifesto-step-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000000;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.manifesto-body {
  font-size: 14px;
  line-height: 1.8;
  color: #f4f4f5;
}

.manifesto-modal-card {
  max-width: 820px !important;
  width: 95% !important;
}

/* Master Admin Interactive Console (Bottom bar) */
.council-bottom-bar {
  padding: 16px 20px;
  background: rgba(14, 16, 22, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.council-action-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.council-input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.council-input-field {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all var(--transition-fast);
}

.council-textarea-field {
  min-height: 44px;
  max-height: 140px;
  resize: none;
  line-height: 1.5;
  overflow-y: auto;
}

.btn-council-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-submit-icon {
  font-size: 14px;
  opacity: 0.8;
  font-weight: 700;
}

.council-input-field:focus {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.6);
}

/* New Case Modal / Setup Drawer */
.council-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.council-modal-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.preset-cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0 20px 0;
}

@media (max-width: 640px) {
  .preset-cases-grid {
    grid-template-columns: 1fr;
  }
}

.preset-case-chip {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.preset-case-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.preset-case-chip strong {
  display: block;
  color: #ffffff;
  margin-bottom: 2px;
}

/* History Drawer */
.council-history-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: var(--bg-surface);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.8);
  z-index: 1001;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.council-history-drawer.open {
  transform: translateX(0);
}

.history-item-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.history-item-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
}

.history-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.history-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* =========================================================
   COMPREHENSIVE MOBILE & TABLET RESPONSIVENESS (MOBİL UYUM)
   ========================================================= */

@media (max-width: 900px) {
  .council-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .council-top-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .ambient-controls-dock {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  /* Allow natural touch scrolling on mobile without overflow cut-off */
  body.has-council-page {
    overflow: auto !important;
  }

  body.has-council-page .main-wrapper,
  .main-wrapper:has(.council-chamber) {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.has-council-page .main-content,
  .main-content:has(.council-chamber) {
    height: auto !important;
    max-height: none !important;
    padding: 10px 10px 24px 10px !important;
    overflow: visible !important;
  }

  .council-chamber {
    border-radius: var(--radius-lg);
    padding: 12px;
    height: auto !important;
    max-height: none !important;
  }

  .council-title {
    font-size: 15px;
  }

  .council-subtitle {
    font-size: 10.5px;
  }

  /* Make top action buttons compact on mobile */
  .council-top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .btn-chill-ambient {
    padding: 4px 10px;
    font-size: 11px;
  }

  .ambient-controls-dock {
    width: 100%;
    justify-content: space-between;
    padding: 4px 8px;
  }

  .ambient-sound-pill {
    padding: 3px 8px;
    font-size: 10px;
  }

  .ambient-volume-wrap {
    gap: 3px;
  }

  .ambient-volume-slider {
    width: 45px;
  }

  /* Horizontal swipeable stage for archetype cards on mobile */
  .archetype-cards-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .archetype-cards-row::-webkit-scrollbar {
    display: none;
  }

  .archetype-card {
    flex: 0 0 240px;
    scroll-snap-align: start;
    padding: 12px;
    gap: 10px;
  }

  .archetype-avatar {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .archetype-name {
    font-size: 12.5px;
  }

  .archetype-title {
    font-size: 10px;
  }

  /* Discussion stream mobile layout */
  .council-discussion-box {
    min-height: 340px;
    border-radius: var(--radius-md);
  }

  .active-case-banner {
    padding: 10px 12px;
  }

  .case-info-title {
    font-size: 13px;
  }

  .dialogue-stream {
    padding: 14px 10px 24px 10px;
    gap: 14px;
    min-height: 320px;
    max-height: 55vh;
  }

  .speech-bubble-item {
    max-width: 96%;
    gap: 8px;
  }

  .bubble-avatar-mini {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }

  .bubble-body {
    padding: 12px 14px;
    font-size: 13.5px;
  }

  .bubble-speaker-name {
    font-size: 12px;
  }

  /* Mobile bottom bar & input area */
  .council-bottom-bar {
    padding: 12px;
    gap: 10px;
  }

  .council-action-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .quick-action-group {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .quick-action-group button {
    flex: 1;
    font-size: 12px;
    padding: 8px 10px;
    justify-content: center;
  }

  #council-status-hint {
    font-size: 11px;
    text-align: center;
  }

  .council-input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .council-textarea-field {
    font-size: 14px;
    padding: 10px 12px;
    min-height: 48px;
  }

  .btn-council-submit {
    width: 100%;
    height: 42px;
    justify-content: center;
  }

  /* Manifesto card mobile */
  .manifesto-box {
    padding: 16px;
  }

  .manifesto-title {
    font-size: 15px;
  }

  .manifesto-body {
    font-size: 13px;
  }

  /* History drawer on mobile */
  .council-history-drawer {
    width: 100vw;
    max-width: 100vw;
    padding: 18px;
  }

  /* New case modal on mobile */
  .council-modal-card {
    padding: 18px;
    max-height: 94vh;
  }
}
