:root {
  --bg-dark: #0a0f1a;
  --panel-bg: #141b2d;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --accent-glow: #38bdf8;
  --accent-purple: #818cf8;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: "Caladea", serif;
  background-image: radial-gradient(
    circle at 50% 0%,
    rgba(56, 189, 248, 0.1),
    transparent 50%
  );
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

header h1 {
  font-family: "Caladea", serif;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(
    to right,
    var(--accent-glow),
    var(--accent-purple)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.input-panel,
.output-panel {
  background-color: var(--panel-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.control-group {
  margin-bottom: 1.5rem;
}

.control-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

select,
textarea {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 1rem;
  font-family: "Caladea", serif;
  transition: all 0.3s ease;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

textarea::placeholder,
textarea::-webkit-input-placeholder,
textarea::-moz-placeholder,
textarea:-ms-input-placeholder {
  color: #a0b4c8 !important;
  opacity: 1 !important;
}

select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-glow);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

button {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-glow));
  color: white;
  border: none;
  padding: 1rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

.output-panel h2 {
  font-family: "Caladea", serif;
  margin-top: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(74, 144, 226, 0.3);
}

.placeholder-text {
  color: var(--text-muted);
  font-style: italic;
}

.hidden {
  display: none !important;
}

/* Mode Selector Buttons */
.mode-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
}

.mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--accent-glow);
  color: var(--accent-glow);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  width: 50%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.mode-btn.active {
  background: var(--accent-glow);
  color: var(--bg-dark);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.mode-btn.active .mode-check {
  display: inline-block;
  color: #ED0049;
  font-size: x-large;
}

.mode-btn.dimmed {
  opacity: 0.4;
  border-color: var(--text-muted);
  color: var(--text-muted);
}

.mode-btn:hover:not(.dimmed) {
  background: rgba(56, 189, 248, 0.2);
  transform: none;
  box-shadow: none;
}

.mode-btn.active:hover {
  background: var(--accent-glow);
}

.mode-check {
  display: none;
  font-size: 1rem;
}

.mode-icon {
  font-size: 1rem;
}
.mode-icon img {
  width: 18px;
  height: 18px;
}

.mode-text {
  white-space: nowrap;
  font-size: 0.8rem;
}

/* Loading animasyonu */
#loading {
  text-align: center;
  color: var(--accent-glow);
  padding: 2rem 0;
}

.spinner {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem auto;
}

.spinner::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background-color: var(--accent-glow);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent-glow), 0 0 30px var(--accent-glow);
  animation: pulse-center 1.5s ease-in-out infinite;
}

.thought-particle {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: rotate-thought 2s linear infinite;
}

.particle-1 {
  animation-delay: 0s;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}
.particle-2 {
  animation-delay: -0.5s;
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
}
.particle-3 {
  animation-delay: -1s;
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
}
.particle-4 {
  animation-delay: -1.5s;
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
}

@keyframes rotate-thought {
  0% {
    transform: rotate(0deg);
    border-top-color: rgba(255, 255, 255, 0.1);
  }
  50% {
    border-top-color: var(--accent-glow);
  }
  100% {
    transform: rotate(360deg);
    border-top-color: rgba(255, 255, 255, 0.1);
  }
}

@keyframes pulse-center {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
}

/* Loading dots animasyonu - birer birer belirme */
.loading-dots {
  display: inline-flex;
  margin-left: 2px;
}

.loading-dots .dot {
  width: 4px;
  height: 4px;
  background-color: var(--accent-glow);
  border-radius: 50%;
  margin: 0 1px;
  opacity: 0;
  animation: dot-appear 1.5s infinite;
}

.loading-dots .dot:nth-child(1) {
  animation-delay: 0s;
}
.loading-dots .dot:nth-child(2) {
  animation-delay: 0.5s;
}
.loading-dots .dot:nth-child(3) {
  animation-delay: 1s;
}

@keyframes dot-appear {
  0% {
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Checkbox grid - scroll ile */
.checkbox-grid {
  max-height: 300px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Scrollbar stili */
.checkbox-grid::-webkit-scrollbar {
  width: 6px;
}
.checkbox-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
.checkbox-grid::-webkit-scrollbar-thumb {
  background: var(--accent-glow);
}

/* Checkbox container */
.cb-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 32px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
  color: var(--text-main);
  min-height: 24px;
}

.cb-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 18px;
  width: 18px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--accent-glow);
}

.cb-container:hover input ~ .checkmark {
  background-color: rgba(56, 189, 248, 0.2);
}
.cb-container input:checked ~ .checkmark {
  background-color: var(--accent-glow);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.cb-container input:checked ~ .checkmark:after {
  display: block;
}

.cb-container .checkmark:after {
  left: 6px;
  top: 2px;
  width: 4px;
  height: 9px;
  border: solid #ED0049;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.members {
  align-self: center;
  line-height: 1;
  margin-right: 4px;
  vertical-align: -webkit-baseline-middle;
}

.member-trait {
  color: #94a3b8;
  font-size: 0.85em;
  font-weight: normal;
  opacity: 0.7;
  font-style: italic;
  align-self: center;
  line-height: 1;
  vertical-align: -webkit-baseline-middle;
}

/* Selection Warning Balloon */
.selection-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 165, 0, 0.15);
  border: 1px solid rgba(255, 165, 0, 0.5);
  padding: 10px 15px;
  margin-top: 10px;
  animation: fadeInWarning 0.3s ease;
}

@keyframes fadeInWarning {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.selection-warning.hidden {
  display: none;
}

.warning-icon {
  font-size: 1.2rem;
  color: #ffcc00;
}
.warning-text {
  color: #ffcc00;
  font-size: 0.85rem;
  font-weight: 500;
}

.limit-warning {
  background: rgba(255, 165, 0, 0.1);
  border: 1px solid orange;
  color: #ffcc00;
  padding: 15px;
  text-align: center;
  line-height: 1.6;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 165, 0, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 165, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 165, 0, 0);
  }
}

.triads-container {
  margin-bottom: 15px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.triads-container p {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.t1 {
  text-transform: uppercase;
  letter-spacing: 1px;
}

.t2 {
  text-transform: none;
  color: var(--text-muted);
}

.t2.exhausted {
  color: #ff4444;
  font-weight: bold;
}

.triad-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  justify-content: flex-start;
}

.triad-buttons::-webkit-scrollbar {
  width: 6px;
}
.triad-buttons::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
.triad-buttons::-webkit-scrollbar-thumb {
  background: var(--accent-glow);
}

.triad-btn {
  background: transparent;
  border: 1px solid var(--accent-glow);
  color: var(--accent-glow);
  padding: 6px 16px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: "Caladea", serif;
  transition: all 0.3s ease;
  white-space: nowrap;
  width: auto;
  min-width: max-content;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.triad-btn.selected {
  background: var(--accent-glow);
  color: var(--bg-dark);
}

.triad-btn:hover {
  background: var(--accent-glow);
  color: var(--bg-dark);
}

/* Deliberation Rounds */
.deliberation-round {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--accent-purple);
}

.deliberation-round h4 {
  margin: 0 0 15px 0;
  color: var(--accent-purple);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.deliberation-round.cross-exam {
  border-left: 3px solid var(--accent-glow);
  background: rgba(56, 189, 248, 0.05);
}

.deliberation-round.cross-exam h4 {
  color: var(--accent-glow);
}

.member-response {
  margin-top: 0;
  padding: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.member-response:first-child {
  border-top: none;
}
.member-response.cross-exam {
  background: rgba(56, 189, 248, 0.03);
}

.member-response h3 {
  margin: 0 0 8px 0;
  color: #4a90e2;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.member-content {
  color: #bac2cd;
  line-height: 1.6;
  font-size: 16px;
}

.member-content strong {
  color: var(--accent-glow);
  font-weight: 700;
}
.member-content em {
  color: var(--accent-purple);
  font-style: italic;
}

.member-content h2 {
  color: var(--accent-glow);
  font-size: 1.3rem;
  margin: 1rem 0 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.3rem;
}

.member-content h3 {
  color: var(--accent-purple);
  font-size: 1.1rem;
  margin: 0.8rem 0 0.4rem;
}
.member-content h4 {
  color: var(--text-main);
  font-size: 1rem;
  margin: 0.6rem 0 0.3rem;
}

.member-content blockquote {
  border-left: 3px solid var(--accent-purple);
  padding-left: 1rem;
  margin: 0.8rem 0;
  color: var(--text-muted);
  font-style: italic;
  background: rgba(129, 140, 248, 0.05);
  padding: 0.5rem 1rem;
  border-radius: 0 4px 4px 0;
}

.member-content ul,
.member-content ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}
.member-content li {
  margin: 0.4rem 0;
  color: #bac2cd;
}
.member-content li .list-number {
  color: var(--accent-glow);
  font-weight: 700;
}

.member-content code {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.9em;
  color: var(--accent-glow);
}

.member-content pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0.8rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.member-content pre code {
  background: none;
  padding: 0;
  color: var(--text-main);
}

.output-panel {
  padding-top: 1rem;
}

.response-box {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.response-box p {
  color: #bac2cd;
  line-height: 20px;
  font-size: 16px;
}

.final-verdict {
  margin-top: 15px;
  padding: 15px;
  border-top: 2px solid var(--accent-glow);
  background: rgba(56, 189, 248, 0.05);
}

.final-verdict h3 {
  margin: 0 0 10px 0;
  color: var(--accent-glow);
  font-size: 1.2rem;
}

.verdict-content {
  color: #bac2cd;
  line-height: 1.6;
  font-size: 16px;
}

.verdict-content strong {
  color: var(--accent-glow);
  font-weight: 700;
}
.verdict-content em {
  color: var(--accent-purple);
}

.verdict-content blockquote {
  border-left: 3px solid var(--accent-glow);
  padding-left: 1rem;
  margin: 0.8rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.verdict-content h2,
.verdict-content h3,
.verdict-content h4 {
  color: var(--accent-glow);
  margin: 0.8rem 0 0.4rem;
}

.verdict-content ul,
.verdict-content ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}
.verdict-content li {
  margin: 0.4rem 0;
}

.verdict-content code {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.9em;
  color: var(--accent-glow);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.8);
  transform: none;
  box-shadow: none;
}

html {
  scroll-behavior: smooth;
}

/* Tanıtım Kutusu Stilleri */
.intro-box {
  position: fixed;
  bottom: 20px;
  left: 20px;
  max-width: 320px;
  background: var(--panel-bg);
  border: 1px solid var(--accent-glow);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.intro-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  width: auto;
  padding: 0;
}

.intro-close:hover {
  color: var(--text-main);
}

.intro-content h3 {
  margin: 0 0 12px 0;
  color: var(--accent-glow);
  font-size: 1.1rem;
}

.intro-content p {
  margin: 0 0 10px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-main);
}

.intro-content a {
  color: var(--accent-glow);
  text-decoration: none;
}

.intro-content a:hover {
  text-decoration: underline;
}

/* Mobile ve Tablet için Media Queries */
@media (max-width: 768px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  .container {
    padding: 0.5rem;
  }
  .input-panel,
  .output-panel {
    padding: 0;
  }
  .triads-container p {
    font-size: 0.7rem;
  }
  .t2 {
    font-size: 0.6rem;
  }
  .output-panel h2,
  .response-box p {
    padding-left: 12px;
    padding-top: 12px;
  }
}

@media (min-width: 769px) {
  .container {
    padding: 2rem;
  }
  .input-panel,
  .output-panel {
    padding: 2rem;
  }
  .triads-container p {
    font-size: 0.85rem;
  }
  .t2 {
    font-size: 0.8rem;
  }
}

@media (max-width: 500px) {
  .intro-box {
    left: 10px;
    right: 10px;
    max-width: none;
    bottom: 10px;
  }
}
