/* ─────────────────────────────────────────
   PSYOP Agent — Global Styles (Dark Theme)
   ───────────────────────────────────────── */

/* Header */
.header-glass {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #0fffc80a;
}

/* Card (ehemals Glass Card) */
.glass-card,
.card {
  background: #030705;
  border: 1px solid #0fffc80a;
  border-radius: 14px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.glass-card:hover,
.card:hover {
  border-color: #0fffc825;
  box-shadow: 0 0 20px rgba(15, 255, 200, 0.03);
}

/* Mode Tabs */
.mode-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #667;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.mode-tab:hover {
  color: #0fffc8;
}
.mode-tab.active {
  color: #0fffc8;
  border-bottom-color: #0fffc8;
  font-weight: 600;
}

/* Header Links */
.header-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #667;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.header-link:hover {
  color: #0fffc8;
  background: rgba(15, 255, 200, 0.08);
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scoreRingFill {
  from { stroke-dashoffset: 565.48; }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Loading Ring */
.loading-ring-spin {
  animation: spin 1.2s linear infinite;
  transform-origin: 32px 32px;
}

/* Neon Glow Divider */
.glow-divider {
  width: 100%;
  height: 1px;
  position: relative;
  overflow: hidden;
  background: #060a08;
}
.glow-divider::after {
  content: '';
  position: absolute;
  top: 0;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #0fffc840, #0fffc8, #0fffc840, transparent);
  animation: dividerLTR 4s ease-in-out infinite;
}
@keyframes dividerLTR {
  0% { left: -30%; }
  100% { left: 100%; }
}

/* Ambient Glow */
.ambient-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
  z-index: 0;
  opacity: 0.3;
}

/* Card Neon Glow on Hover */
.glass-card, .card {
  position: relative;
  overflow: hidden;
}
.glass-card::before, .card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(15, 255, 200, 0.03) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.glass-card:hover::before, .card:hover::before {
  opacity: 1;
}

.fade-in {
  animation: fadeInUp 0.5s ease-out forwards;
}
.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-delay-4 { animation-delay: 0.4s; opacity: 0; }

.score-ring-fg {
  animation: scoreRingFill 1.5s ease-out forwards;
}

/* Loading Shimmer */
.shimmer {
  background: linear-gradient(90deg, #060a09 25%, #111 50%, #060a09 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #111;
  border-top-color: #0fffc8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Primary Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #0fffc8;
  color: #000;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 0 20px rgba(15, 255, 200, 0.15);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(15, 255, 200, 0.25);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-primary:disabled {
  background: #0fffc830;
  color: #000;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Secondary Button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #060a09;
  color: #889;
  font-weight: 500;
  border-radius: 10px;
  border: 1px solid #0fffc812;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}
.btn-secondary:hover {
  border-color: #0fffc840;
  color: #0fffc8;
  background: #0fffc808;
}

/* Chat Styles */
.chat-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
}
.chat-bubble {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
}
.chat-bubble.system {
  align-self: flex-start;
  background: #080c0b;
  border: 1px solid #0fffc80a;
  color: #bbc;
  border-bottom-left-radius: 4px;
}
.chat-bubble.user {
  align-self: flex-end;
  background: #0fffc810;
  border: 1px solid #0fffc820;
  color: #dde;
  border-bottom-right-radius: 4px;
}

/* Principle Tag */
.principle-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  transition: transform 0.15s;
  cursor: default;
}
.principle-tag:hover {
  transform: scale(1.05);
}
.principle-tag.active {
  background: #0fffc80f;
  color: #0fffc8;
  border: 1px solid #0fffc818;
}
.principle-tag.missing {
  background: rgba(249, 115, 22, 0.1);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.2);
}

/* Strategy Phase Card */
.strategy-phase {
  position: relative;
  padding-left: 32px;
}
.strategy-phase::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 32px;
  bottom: -16px;
  width: 2px;
  background: #0fffc815;
}
.strategy-phase:last-child::before {
  display: none;
}
.strategy-phase-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0fffc8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 11px;
  font-weight: 700;
}

/* Quick Win Card */
.quick-win-card {
  border-left: 3px solid #0fffc8;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: #0fffc830; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #0fffc850; }

/* Textarea */
.text-input-main {
  width: 100%;
  min-height: 200px;
  padding: 16px;
  border: 2px solid #0fffc812;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #080c0b;
  color: #ccc;
  font-family: 'Inter', sans-serif;
}
.text-input-main:focus {
  outline: none;
  border-color: #0fffc8;
  box-shadow: 0 0 0 4px rgba(15, 255, 200, 0.08);
}
.text-input-main::placeholder {
  color: #445;
}

/* Select / Input */
.input-field {
  padding: 8px 12px;
  border: 1px solid #0fffc812;
  border-radius: 8px;
  font-size: 13px;
  background: #080c0b;
  color: #ccc;
  transition: border-color 0.2s;
  font-family: 'Inter', sans-serif;
}
.input-field:focus {
  outline: none;
  border-color: #0fffc8;
}
.input-field::placeholder {
  color: #445;
}

/* Select styling */
select.input-field {
  background: #080c0b;
  color: #ccc;
}
select.input-field option {
  background: #080c0b;
  color: #ccc;
}

/* Typing indicator */
.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0fffc850;
  animation: pulse-soft 1.4s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Score Label */
.score-label-excellent { color: #0fffc8; }
.score-label-good { color: #F59E0B; }
.score-label-weak { color: #EF4444; }

/* Responsive */
@media (max-width: 768px) {
  .mode-tab { padding: 10px 14px; font-size: 13px; }
  .mode-tab svg { display: none; }
  .chat-bubble { max-width: 92%; }
  .text-input-main { min-height: 150px; font-size: 14px; }
  .btn-primary { padding: 10px 20px; font-size: 14px; }
  .glass-card { padding: 12px; }
}

@media (max-width: 480px) {
  .mode-tab { padding: 8px 10px; font-size: 12px; }
  h1 { font-size: 1.5rem !important; }
}

/* Print */
@media print {
  .header-glass, .mode-tab, footer, .btn-primary, .btn-secondary { display: none !important; }
  .glass-card { background: #030705 !important; border: 1px solid #0fffc80a !important; }
  body { background: #000 !important; }
}
