* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, #090a1b 0%, #0e1024 28%, #14203a 55%, #0d1729 78%, #17243a 100%);
  height: 100vh;
  overflow: hidden;
  position: relative;
  color: rgba(255, 255, 255, 0.9);
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(120, 219, 255, 0.12) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(27deg, rgba(10,10,10,0.9) 5px, transparent 5px) 0 5px,
    linear-gradient(207deg, rgba(10,10,10,0.9) 5px, transparent 5px) 10px 0,
    linear-gradient(27deg, rgba(28,28,28,0.9) 5px, transparent 5px) 0 10px,
    linear-gradient(207deg, rgba(28,28,28,0.9) 5px, transparent 5px) 10px 5px,
    linear-gradient(90deg, rgba(16,16,16,0.9) 10px, transparent 10px),
    linear-gradient(rgba(26,26,26,0.9) 25%, rgba(18,18,18,0.9) 25%, rgba(18,18,18,0.9) 50%, transparent 50%, transparent 75%, rgba(30,30,30,0.9) 75%, rgba(30,30,30,0.9));
  background-size: 20px 20px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

button, input, textarea, select {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(9, 10, 22, 0.82);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 100;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  animation: spinInPlace 20s linear infinite;
  filter: drop-shadow(0 0 15px rgba(120, 219, 255, 0.3));
}

@keyframes spinInPlace {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.3px;
}

.mode-indicator {
  display: none;
}

.mode-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(30px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.mode-badge:hover {
  transform: translateY(-1px) translateZ(0);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.chat-container {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 100px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  z-index: 1;
  scroll-behavior: smooth;
}

.chat-container::-webkit-scrollbar {
  width: 8px;
}

.chat-container::-webkit-scrollbar-track {
  background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.chat-messages {
  max-width: 1050px;
  margin: 0 auto;
  padding-bottom: 40px;
  position: relative;
  left: 40px;
}

.welcome-section {
  text-align: center;
  padding: 80px 120px 40px;
  animation: fadeIn 0.8s ease-out;
  position: relative;
  left: -40px;
}

.welcome-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 28px;
  background: linear-gradient(135deg, rgba(120, 219, 255, 0.15) 0%, rgba(120, 219, 255, 0.05) 100%);
  backdrop-filter: blur(30px);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(120, 219, 255, 0.3);
  box-shadow: 0 10px 40px rgba(120, 219, 255, 0.2);
  animation: float 3s ease-in-out infinite;
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) translateZ(0); }
  50% { transform: translateY(-10px) translateZ(0); }
}

.welcome-icon img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.welcome-section h2 {
  font-size: 32px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.welcome-section p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin-bottom: 24px;
}

.message {
  display: flex;
  margin-bottom: 24px;
  animation: messageSlideIn 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  gap: 12px;
  align-items: flex-start;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  justify-content: flex-end;
}

.message.ai {
  justify-content: flex-start;
  position: relative;
}

.message.ai .message-icon {
  position: absolute;
  left: -48px;
}

.message-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.message-icon img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.message-icon svg {
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.7);
}

.message.user .message-icon {
  order: 2;
}

.message-content {
  padding: 16px 20px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.7;
  position: relative;
  word-wrap: break-word;
  letter-spacing: 0.2px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.message-content .bf-underlay {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: backdrop-filter 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), -webkit-backdrop-filter 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: backdrop-filter;
}

.message-content.bf-loaded .bf-underlay {
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
}

.message.user .message-content {
  max-width: 70%;
  width: 70%;
  background: rgba(120, 219, 255, 0.12);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(120, 219, 255, 0.25);
  box-shadow: 0 6px 24px rgba(76, 196, 240, 0.09);
  order: 1;
}

.message.ai .message-content {
  max-width: 1000px;
  width: 1000px;
  background: rgba(255, 255, 255, 0.065);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.message-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #7dd3fc;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.15);
  letter-spacing: 0.01em;
}

.message-content h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: #c4b5fd;
  margin: 24px 0 8px 0;
  padding-top: 12px;
  border-top: 1px solid rgba(196, 181, 253, 0.1);
  letter-spacing: 0.01em;
}

.message-content h3:first-of-type {
  margin-top: 10px;
}

.message-content p {
  margin: 0 0 10px 0;
  line-height: 1.65;
}

.message-content ul,
.message-content ol {
  margin: 4px 0 14px 0;
  padding-left: 18px;
}

.message-content li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.message-content a {
  color: #67e8f9;
  text-decoration: none;
  border-bottom: 1px solid rgba(103, 232, 249, 0.25);
  transition: border-color 0.2s ease;
}

.message-content a:hover {
  border-bottom-color: rgba(103, 232, 249, 0.6);
}

.message-content strong {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.typing-indicator .message-content {
  padding: 16px 24px;
  min-width: 200px;
  transition: all 0.4s ease;
}

.typing-animation {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.4s ease;
}

.typing-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(120, 219, 255, 0.9);
  font-style: italic;
  font-size: 13px;
}

.reasoning-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  min-height: 24px;
  transition: all 0.4s ease;
}

.reasoning-step {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-style: italic;
  padding-left: 4px;
  animation: fadeInStep 0.4s ease;
  transition: opacity 0.3s ease;
}

.reasoning-step.fade-out {
  opacity: 0.3;
}

.reasoning-step.complete {
  color: rgba(34, 197, 94, 0.9);
  font-weight: 500;
  opacity: 1;
}

@keyframes fadeInStep {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.response-progress {
  width: 100%;
  height: 4px;
  background: rgba(120, 219, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.response-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.8), rgba(34, 197, 94, 1));
  border-radius: 2px;
  transition: width 0.6s ease;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: rgba(120, 219, 255, 0.8);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

.processing-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(79, 195, 247, 0.08);
  backdrop-filter: blur(30px);
  border-radius: 12px;
  margin: 16px auto;
  border: 1px solid rgba(79, 195, 247, 0.2);
  font-size: 13px;
  color: rgba(120, 219, 255, 0.9);
  max-width: fit-content;
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(79, 195, 247, 0.2);
  border-top: 2px solid #4fc3f7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.status-indicator {
  display: none;
  max-width: 900px;
  margin: 0 auto;
}

.feedback-block {
  margin: 12px 0 24px 0;
  animation: fadeIn 0.4s ease;
  display: flex;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.feedback-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(34, 197, 94, 0.08);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 14px;
  padding: 12px 16px;
  max-width: 85%;
  gap: 16px;
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.feedback-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  flex: 1;
}

.feedback-text strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.feedback-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.feedback-btn {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.feedback-btn:hover:not(:disabled) {
  transform: scale(1.1) translateZ(0);
  background: rgba(255, 255, 255, 0.12);
}

.feedback-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.improve-btn {
  background: rgba(255, 193, 7, 0.15);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 10px;
  padding: 8px 14px;
  color: #ffc107;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.improve-btn:hover {
  background: rgba(255, 193, 7, 0.25);
  transform: scale(1.05);
}

.input-area {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(9, 10, 22, 0.82);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 24px;
  z-index: 100;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.input-wrapper {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.input-wrapper:focus-within {
  border-color: rgba(120, 219, 255, 0.4);
  box-shadow: 0 8px 34px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(120, 219, 255, 0.07);
  background: rgba(255, 255, 255, 0.08);
}

#messageInput {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.95);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  resize: none;
  max-height: 120px;
  line-height: 1.5;
  padding: 4px 0;
}

#messageInput::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

#messageInput::-webkit-scrollbar {
  width: 4px;
}

#messageInput::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.input-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.char-count {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  min-width: 50px;
  text-align: right;
}

#clearButton, #sendButton {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  color: rgba(255, 255, 255, 0.7);
}

#clearButton:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
  transform: scale(1.05);
}

#sendButton {
  background: linear-gradient(135deg, rgba(120, 219, 255, 0.25) 0%, rgba(120, 219, 255, 0.15) 100%);
  border-color: rgba(120, 219, 255, 0.3);
  color: #4fc3f7;
}

#sendButton:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(120, 219, 255, 0.35) 0%, rgba(120, 219, 255, 0.25) 100%);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(120, 219, 255, 0.3);
}

#sendButton:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.footer-text {
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 12px;
  letter-spacing: 0.3px;
  font-weight: 400;
}

.mode-selector-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 15%, rgba(34, 56, 91, 0.32), transparent 42%), rgba(4, 5, 12, 0.93);
  backdrop-filter: blur(30px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  animation: fadeIn 0.3s ease-out;
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.mode-selector-container {
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.98) 0%, rgba(15, 15, 25, 0.95) 100%);
  backdrop-filter: blur(60px);
  position: relative;
  width: min(820px, 100%);
  margin: auto;
  padding: 44px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  text-align: center;
  max-width: 820px;
  animation: slideInUp 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.mode-selector-eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mode-selector-container h2 {
  color: rgba(255, 255, 255, 0.95);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.7px;
}

.mode-selector-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  margin-bottom: 34px;
}

.mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.mode-options .mode-option.coming-soon {
  grid-column: 1 / -1;
  width: min(360px, 100%);
  justify-self: center;
}

.mode-option {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 32px 24px;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.mode-option:hover {
  transform: translateY(-4px) translateZ(0);
  border-color: rgba(120, 219, 255, 0.5);
  box-shadow: 0 18px 44px rgba(62, 176, 230, 0.14);
  background: linear-gradient(145deg, rgba(120, 219, 255, 0.11), rgba(255, 255, 255, 0.05));
}

.mode-option:focus-visible {
  outline: none;
  border-color: rgba(120, 219, 255, 0.75);
  box-shadow: 0 0 0 4px rgba(120, 219, 255, 0.12), 0 18px 44px rgba(62, 176, 230, 0.12);
}

.mode-option img {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), filter 0.25s ease;
}

.mode-option:hover img {
  transform: scale(1.06);
}

.mode-option h3 {
  color: rgba(255, 255, 255, 0.95);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.mode-option p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.mode-option.coming-soon {
  pointer-events: none;
  position: relative;
  opacity: 0.42;
  filter: grayscale(100%);
}

.coming-soon-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border-radius: inherit;
}

.coming-soon-overlay span {
  background: rgba(0, 0, 0, 0.7);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.mode-switch-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.mode-switch-content {
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.98) 0%, rgba(15, 15, 25, 0.95) 100%);
  backdrop-filter: blur(60px);
  padding: 40px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
  max-width: 520px;
  width: 90%;
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.mode-switch-content h3 {
  color: rgba(255, 255, 255, 0.95);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}

.mode-switch-content p {
  text-align: center;
}

.mode-switch-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.mode-switch-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.mode-switch-btn img {
  width: 48px;
  height: 48px;
}

.mode-switch-btn:hover {
  transform: translateX(4px);
  border-color: rgba(120, 219, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

.mode-switch-btn.active {
  border-color: #4fc3f7;
  background: rgba(79, 195, 247, 0.15);
}

.mode-switch-cancel {
  width: 100%;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mode-switch-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
}

.admin-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.admin-modal-content {
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.98) 0%, rgba(15, 15, 25, 0.95) 100%);
  backdrop-filter: blur(60px);
  margin: 3% auto;
  padding: 0;
  width: 90%;
  max-width: 750px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.admin-modal-header {
  padding: 28px 32px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-modal-header h3 {
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.admin-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 36px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 6px;
  border-radius: 10px;
}

.admin-close:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(90deg);
}

.admin-modal-body {
  padding: 32px;
}

.admin-modal-body label {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 14px;
}

.admin-modal-body input, 
.admin-modal-body textarea {
  width: 100%;
  padding: 18px 20px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.95);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  transition: all 0.3s ease;
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.admin-modal-body input:focus, 
.admin-modal-body textarea:focus {
  outline: none;
  border-color: rgba(120, 219, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 30px rgba(120, 219, 255, 0.2);
}

.admin-modal-body textarea {
  min-height: 150px;
  resize: vertical;
}

.readonly-field {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.7);
  max-height: 150px;
  overflow-y: auto;
  font-size: 14px;
}

.admin-modal-actions {
  display: flex;
  gap: 18px;
  margin-top: 32px;
  justify-content: flex-end;
}

.admin-modal-actions button,
#adminPasswordSection button {
  padding: 16px 32px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.admin-modal-actions button:first-child,
#adminPasswordSection button {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.admin-modal-actions button:first-child:hover,
#adminPasswordSection button:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.admin-modal-actions button:last-child {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.admin-modal-actions button:last-child:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .app-header {
    height: 56px;
    padding: 0 16px;
  }

  .header-logo {
    width: 32px;
    height: 32px;
  }

  .header-title {
    font-size: 16px;
  }

  .chat-container {
    top: 56px;
    bottom: 90px;
    padding: 16px;
  }

  .welcome-section {
    padding: 40px 16px 32px;
  }

  .welcome-icon {
    width: 64px;
    height: 64px;
  }

  .welcome-icon img {
    width: 40px;
    height: 40px;
  }

  .welcome-section h2 {
    font-size: 24px;
  }

  .welcome-section p {
    font-size: 14px;
  }

  .message {
    gap: 8px;
  }

  .message-icon {
    width: 32px;
    height: 32px;
    display: none;
  }

  .message-content {
    padding: 12px 16px;
    font-size: 13px;
  }

  .message.user .message-content {
    max-width: 80%;
  }

  .message.ai .message-content {
    max-width: 90%;
  }

  .input-area {
    padding: 12px 16px;
  }

  .input-wrapper {
    padding: 10px 12px;
  }

  #messageInput {
    font-size: 14px;
  }

  .char-count {
    font-size: 10px;
  }

  #clearButton, #sendButton {
    width: 36px;
    height: 36px;
  }

  .mode-selector-container {
    padding: 24px 18px;
    max-width: calc(100vw - 24px);
  }
  .mode-selector-container h2 {
    font-size: 18px;
    margin-bottom: 6px;
  }
  .mode-selector-subtitle {
    font-size: 12px;
    margin-bottom: 20px;
  }
  .mode-options {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .mode-options .mode-option.coming-soon {
    grid-column: auto;
    width: 100%;
  }
  .mode-option {
    padding: 16px 14px;
  }
  .mode-option img {
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
  }
  .mode-option h3 {
    font-size: 15px;
    margin-bottom: 4px;
  }
  .mode-option p {
    font-size: 11px;
  }

  .feedback-content {
    flex-direction: column;
    align-items: flex-start;
    max-width: 90%;
    gap: 12px;
  }

  .feedback-buttons {
    align-self: flex-end;
  }

  .footer-text {
    font-size: 9px;
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.message.confidence {
  display: none !important;
}

.discord-auth-container {
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.98) 0%, rgba(15, 15, 25, 0.95) 100%);
  backdrop-filter: blur(60px);
  padding: 48px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
  text-align: center;
  max-width: 650px;
  animation: slideInUp 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: transform;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

.auth-header h2 {
  color: rgba(255, 255, 255, 0.95);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.auth-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  margin-bottom: 32px;
}

.auth-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.auth-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.2) 0%, rgba(88, 101, 242, 0.1) 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(88, 101, 242, 0.3);
  color: #5865F2;
  animation: float 3s ease-in-out infinite;
}

.auth-icon svg {
  width: 48px;
  height: 48px;
}

.auth-description {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  line-height: 1.8;
  max-width: 520px;
}

.auth-description strong {
  color: rgba(34, 197, 94, 0.95);
  font-weight: 600;
}

.discord-auth-button {
  background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
  border: none;
  border-radius: 14px;
  padding: 18px 36px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.3);
}

.discord-auth-button:hover {
  background: linear-gradient(135deg, #4752C4 0%, #3C45A3 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(88, 101, 242, 0.4);
}

.discord-auth-button svg {
  width: 24px;
  height: 24px;
}

.auth-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
  animation: fadeIn 0.4s ease;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(88, 101, 242, 0.2);
  border-top: 4px solid #5865F2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.auth-loading p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-style: italic;
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 2px solid rgba(120, 219, 255, 0.4);
  box-shadow: 0 0 15px rgba(120, 219, 255, 0.3);
  transition: all 0.3s ease;
}

.user-avatar:hover {
  transform: scale(1.1);
  border-color: rgba(120, 219, 255, 0.6);
  box-shadow: 0 0 25px rgba(120, 219, 255, 0.5);
}

.phone-disclaimer {
  color: rgba(255, 193, 7, 0.9);
  font-size: 12px;
  margin-top: 12px;
  padding: 8px 16px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
  display: none;
}

@media (max-width: 768px) {
  .discord-auth-container {
      padding: 32px 24px;
      margin: 20px;
      max-width: calc(100vw - 40px);
  }

  .auth-header h2 {
      font-size: 24px;
  }

  .auth-subtitle {
      font-size: 14px;
  }

  .auth-icon {
      width: 64px;
      height: 64px;
  }

  .auth-icon svg {
      width: 36px;
      height: 36px;
  }

  .auth-description {
      font-size: 11px;
  }

  .discord-auth-button {
      padding: 16px 28px;
      font-size: 14px;
  }

  .user-avatar {
      width: 32px;
      height: 32px;
  }
}
.logout-popup {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 30, 0.98);
  backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 10001;
  animation: slideDown 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  min-width: 200px;
  text-align: center;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
}

@keyframes slideDown {
  from {
      opacity: 0;
      transform: translateX(-50%) translateY(-20px);
  }
  to {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
  }
}

.logout-popup p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  margin-bottom: 16px;
}

.logout-button {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.logout-button:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.user-avatar {
  cursor: pointer;
}

.logout-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background: transparent;
}

.unauthorized-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.admin-modal-body #adminLoginError {
  margin-bottom: 16px;
  margin-top: -8px;
}

.ban-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 15, 25, 0.98) 0%, rgba(10, 10, 20, 0.98) 100%);
  backdrop-filter: blur(20px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.4s ease;
}

.ban-popup {
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.98) 0%, rgba(15, 15, 25, 0.95) 100%);
  backdrop-filter: blur(60px);
  border: 2px solid rgba(239, 68, 68, 0.5);
  border-radius: 24px;
  padding: 48px;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 30px 100px rgba(239, 68, 68, 0.3);
  animation: slideInUp 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.ban-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
  background: rgba(239, 68, 68, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(239, 68, 68, 0.4);
  animation: pulseRed 2s ease-in-out infinite;
}

@keyframes pulseRed {
  0%, 100% {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.6);
    transform: scale(1.05);
  }
}

.ban-icon svg {
  width: 56px;
  height: 56px;
  color: #ef4444;
}

.ban-popup h2 {
  color: #ef4444;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.ban-message {
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.ban-details {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.ban-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ban-detail-item:last-child {
  border-bottom: none;
}

.ban-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
}

.ban-value {
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  font-weight: 600;
}

.ban-footer {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  line-height: 1.5;
  font-style: italic;
}

@media (max-width: 768px) {
  .ban-popup {
    margin: 20px;
    padding: 32px 24px;
    max-width: calc(100vw - 40px);
  }

  .ban-icon {
    width: 80px;
    height: 80px;
  }

  .ban-icon svg {
    width: 44px;
    height: 44px;
  }

  .ban-popup h2 {
    font-size: 24px;
  }

  .ban-message {
    font-size: 14px;
  }

  .ban-details {
    padding: 16px;
  }

  .ban-label, .ban-value {
    font-size: 12px;
  }

  .ban-footer {
    font-size: 11px;
  }
  }

.context-required-container {
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.98) 0%, rgba(15, 15, 25, 0.95) 100%);
  backdrop-filter: blur(60px);
  padding: 48px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
  text-align: center;
  max-width: 700px;
  width: 95%;
  animation: slideInUp 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.context-required-container::-webkit-scrollbar {
  display: none;
}

.context-header h2 {
  color: rgba(255, 255, 255, 0.95);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.context-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  margin-bottom: 28px;
}

.context-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.context-warning {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.25);
  border-radius: 14px;
  padding: 16px 20px;
  text-align: left;
}

.warning-icon-custom {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 152, 0, 0.15) 100%);
  border: 2px solid rgba(255, 193, 7, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #ffc107;
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
  box-shadow: 0 0 15px rgba(255, 193, 7, 0.2);
}

.context-warning span:not(.warning-icon-custom span) {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  line-height: 1.5;
}

.context-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.context-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: -8px;
}

.game-select-label {
  margin-bottom: 4px;
}

.required-label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.required-star {
  color: #ef4444;
  font-weight: 700;
}

.context-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.95);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  transition: all 0.3s ease;
}

.context-input:focus {
  outline: none;
  border-color: rgba(120, 219, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(120, 219, 255, 0.15);
}

.anticheat-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.anticheat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.anticheat-btn:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 219, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
}

.anticheat-btn.selected {
  border-color: #4fc3f7;
  background: rgba(79, 195, 247, 0.15);
  box-shadow: 0 0 25px rgba(79, 195, 247, 0.25);
}

.ac-icon-wrapper {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ac-icon {
  object-fit: contain;
  border-radius: 6px;
}

.ac-name {
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  font-weight: 600;
}

.ac-games {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  text-align: center;
}

.game-selection-area {
  margin-top: 12px;
  animation: fadeIn 0.3s ease;
}

.game-dropdown {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.95);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  transition: all 0.3s ease;
  margin-top: 4px;
}

.game-dropdown:focus {
  outline: none;
  border-color: rgba(120, 219, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.1);
}

.game-dropdown option {
  background: #1a1a2e;
  color: white;
  padding: 12px;
}

.other-game-input {
  animation: fadeIn 0.3s ease;
}

.other-game-warning {
  color: rgba(255, 193, 7, 0.85);
  font-size: 12px;
  margin-top: 10px;
  padding: 12px 16px;
  background: rgba(255, 193, 7, 0.06);
  border: 1px solid rgba(255, 193, 7, 0.15);
  border-radius: 10px;
  line-height: 1.5;
}

.context-submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, rgba(120, 219, 255, 0.25) 0%, rgba(120, 219, 255, 0.15) 100%);
  border: 1px solid rgba(120, 219, 255, 0.3);
  border-radius: 14px;
  color: #4fc3f7;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  margin-top: 12px;
}

.context-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(120, 219, 255, 0.35) 0%, rgba(120, 219, 255, 0.25) 100%);
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(120, 219, 255, 0.3);
}

.context-submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.reasoning-step.source-primary {
  color: rgba(34, 197, 94, 0.9);
}

.reasoning-step.source-extra {
  color: rgba(255, 193, 7, 0.9);
}

.reference-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.12) 0%, rgba(79, 195, 247, 0.06) 100%);
  border: 1px solid rgba(79, 195, 247, 0.25);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.reference-card:hover {
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.18) 0%, rgba(79, 195, 247, 0.1) 100%);
  border-color: rgba(79, 195, 247, 0.4);
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(79, 195, 247, 0.15);
}

.reference-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: rgba(79, 195, 247, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reference-icon svg {
  width: 18px;
  height: 18px;
  color: #4fc3f7;
}

.reference-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reference-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.reference-topic {
  font-size: 14px;
  color: #4fc3f7;
  font-weight: 600;
}

.reference-arrow {
  margin-left: auto;
  color: rgba(79, 195, 247, 0.6);
  transition: transform 0.3s ease;
}

.reference-card:hover .reference-arrow {
  transform: translateX(4px);
  color: #4fc3f7;
}

@media (max-width: 768px) {
  .context-required-container {
    padding: 28px 20px;
    margin: 12px;
  }

  .context-header h2 {
    font-size: 22px;
  }

  .anticheat-buttons {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .anticheat-btn {
    flex-direction: row;
    justify-content: flex-start;
    padding: 16px;
    gap: 14px;
  }

  .ac-icon {
    font-size: 24px;
  }

  .ac-name {
    font-size: 13px;
  }

  .ac-games {
    font-size: 10px;
    text-align: left;
  }

  .reference-card {
    padding: 12px 14px;
  }

  .reference-topic {
    font-size: 13px;
  }
}

.update-notice-chat {
  max-width: 900px;
  margin: 0 auto 20px auto;
  animation: fadeIn 0.4s ease;
}

.update-notice-content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 193, 7, 0.1);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 14px;
  padding: 16px 20px;
  position: relative;
}

.update-notice-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.update-notice-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.6;
  flex: 1;
}

.update-notice-dismiss {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.update-notice-dismiss:hover {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}
.perm-locked-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(30px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.4s ease-out;
}

.perm-locked-container {
  background: linear-gradient(135deg, rgba(25, 25, 35, 0.98) 0%, rgba(18, 18, 28, 0.95) 100%);
  backdrop-filter: blur(60px);
  padding: 56px 48px;
  border-radius: 28px;
  border: 1px solid rgba(255, 193, 7, 0.25);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7), 0 0 60px rgba(255, 193, 7, 0.1);
  text-align: center;
  max-width: 520px;
  width: 90%;
  animation: slideInUp 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.lock-icon-wrapper {
  width: 120px;
  height: 120px;
  margin: 0 auto 32px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lock-body {
  width: 70px;
  height: 56px;
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 50%, #374151 100%);
  border-radius: 8px;
  position: relative;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  animation: lockPulse 3s ease-in-out infinite;
}

@keyframes lockPulse {
  0%, 100% {
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.4),
      inset 0 2px 4px rgba(255, 255, 255, 0.1),
      inset 0 -2px 4px rgba(0, 0, 0, 0.2),
      0 0 20px rgba(255, 193, 7, 0.15);
  }
  50% {
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.4),
      inset 0 2px 4px rgba(255, 255, 255, 0.1),
      inset 0 -2px 4px rgba(0, 0, 0, 0.2),
      0 0 40px rgba(255, 193, 7, 0.35);
  }
}

.lock-shackle {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 36px;
  border: 8px solid #9ca3af;
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  background: transparent;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    0 -2px 8px rgba(0, 0, 0, 0.3);
  animation: shackleGlow 3s ease-in-out infinite;
}

@keyframes shackleGlow {
  0%, 100% {
    border-color: #9ca3af;
  }
  50% {
    border-color: #d1d5db;
  }
}

.lock-keyhole {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #1f2937;
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.lock-keyhole::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 14px;
  background: #1f2937;
  border-radius: 0 0 3px 3px;
}

.lock-title {
  font-size: 28px;
  font-weight: 700;
  color: rgba(255, 193, 7, 0.95);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.lock-message {
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 28px;
  padding: 0 12px;
}

.lock-discord {
  margin-bottom: 28px;
}

.discord-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
  color: white;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(88, 101, 242, 0.3);
}

.discord-link-btn:hover {
  background: linear-gradient(135deg, #4752C4 0%, #3C45A3 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(88, 101, 242, 0.4);
}

.lock-back-btn {
  width: 100%;
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.lock-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .perm-locked-container {
    padding: 40px 24px;
    margin: 16px;
  }

  .lock-icon-wrapper {
    width: 100px;
    height: 100px;
    margin-bottom: 24px;
  }

  .lock-body {
    width: 56px;
    height: 45px;
  }

  .lock-shackle {
    width: 32px;
    height: 28px;
    border-width: 6px;
    top: -22px;
  }

  .lock-title {
    font-size: 22px;
  }

  .lock-message {
    font-size: 13px;
  }

  .discord-link-btn {
    padding: 12px 22px;
    font-size: 13px;
  }
}

/* ========================================
   FLOATING HINT CLOUD ABOVE INPUT
   ======================================== */

.input-hint-cloud {
  max-width: 900px;
  margin: 0 auto 14px auto;
  position: relative;
  animation: hintCloudEntry 0.8s ease forwards;
  opacity: 0;
}

@keyframes hintCloudEntry {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.hint-cloud-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(120, 219, 255, 0.08) 0%, rgba(168, 85, 247, 0.06) 50%, rgba(120, 219, 255, 0.08) 100%);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(120, 219, 255, 0.2);
  border-radius: 14px;
  padding: 14px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(120, 219, 255, 0.08),
              0 0 0 1px rgba(120, 219, 255, 0.05) inset;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.hint-cloud-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(120, 219, 255, 0.06) 25%,
    rgba(168, 85, 247, 0.04) 50%,
    rgba(120, 219, 255, 0.06) 75%,
    transparent 100%
  );
  animation: hintShimmer 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes hintShimmer {
  0% { transform: translateX(-30%); }
  50% { transform: translateX(30%); }
  100% { transform: translateX(-30%); }
}

.hint-cloud-inner:hover {
  border-color: rgba(120, 219, 255, 0.35);
  box-shadow: 0 6px 32px rgba(120, 219, 255, 0.12),
              0 0 0 1px rgba(120, 219, 255, 0.08) inset;
}

.hint-cloud-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: linear-gradient(135deg, rgba(120, 219, 255, 0.2) 0%, rgba(120, 219, 255, 0.1) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4fc3f7;
  box-shadow: 0 0 8px rgba(120, 219, 255, 0.15);
}

.hint-cloud-text {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  letter-spacing: 0.1px;
}

.hint-cloud-text strong {
  color: #4fc3f7;
  font-weight: 600;
}

.hint-cloud-text a {
  color: #4fc3f7;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.hint-cloud-text a:hover {
  color: #81d4fa;
}

.hint-cloud-tail {
  display: none;
}

.input-hint-cloud.hidden {
  animation: hintCloudExit 0.4s ease forwards;
  pointer-events: none;
}

@keyframes hintCloudExit {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 768px) {
  .input-hint-cloud {
    margin: 0 0 10px 0;
  }

  .hint-cloud-inner {
    padding: 12px 14px;
    gap: 10px;
  }

  .hint-cloud-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }

  .hint-cloud-icon svg {
    width: 14px;
    height: 14px;
  }

  .hint-cloud-text {
    font-size: 11px;
  }
}
