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

/* Chill Ambient Chamber */
.council-chamber {
  position: relative;
  background: radial-gradient(circle at 50% 20%, rgba(30, 27, 46, 0.6) 0%, rgba(10, 11, 15, 0.95) 70%, #000000 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

/* 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: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 2;
}

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

.council-emblem {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  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: 22px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.council-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0;
}

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

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

/* Chill Ambience Audio Toggle Button */
.btn-chill-ambient {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e4e4e7;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  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.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

/* 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;
}

.playing .sound-bar:nth-child(1) { animation: soundWave 0.8s ease-in-out infinite alternate; }
.playing .sound-bar:nth-child(2) { animation: soundWave 1.1s ease-in-out infinite alternate 0.2s; }
.playing .sound-bar:nth-child(3) { animation: soundWave 0.9s ease-in-out infinite alternate 0.4s; }

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

/* 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: 14px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.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: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 540px;
  scroll-behavior: smooth;
}

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

/* 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;
}

/* 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: 12px 0;
  background: linear-gradient(135deg, rgba(30, 20, 48, 0.95), rgba(18, 14, 28, 0.98));
  border: 2px solid rgba(168, 85, 247, 0.5);
  box-shadow: 0 10px 40px rgba(168, 85, 247, 0.25), inset 0 0 30px rgba(168, 85, 247, 0.1);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  animation: manifestoGlow 3s ease-in-out infinite alternate;
}

@keyframes manifestoGlow {
  0% { border-color: rgba(168, 85, 247, 0.4); box-shadow: 0 8px 30px rgba(168, 85, 247, 0.2); }
  100% { border-color: rgba(251, 191, 36, 0.6); box-shadow: 0 12px 45px rgba(251, 191, 36, 0.25); }
}

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

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

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

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

/* 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: center;
}

.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-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;
}
