:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --accent-pink: #e91e8c;
  --accent-purple: #6b21a8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg-primary);
  background-image: 
    radial-gradient(ellipse at top, rgba(233, 30, 140, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(107, 33, 168, 0.08) 0%, transparent 50%);
  min-height: 100vh;
  color: #fff;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Header Glass Effect */
.header-glass {
  background: rgba(17, 17, 24, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Berry Icon Animation */
.berry-icon {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, rgba(17, 17, 24, 0.95) 0%, rgba(10, 10, 15, 0.98) 100%);
}

.session-item:hover .delete-btn {
  opacity: 1;
}

/* Messages */
.user-message {
  background: linear-gradient(135deg, #e91e8c 0%, #a21caf 100%);
  border-radius: 20px 20px 4px 20px;
}

.ai-message {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px 20px 20px 4px;
}

.message {
  animation: messageIn 0.3s ease-out;
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typing Indicator */
.typing-dot {
  width: 8px;
  height: 8px;
  background: #e91e8c;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-8px); opacity: 1; }
}

/* Code Block */
.code-block {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.code-block pre {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.code-block pre::-webkit-scrollbar {
  height: 6px;
}

.code-block pre::-webkit-scrollbar-track {
  background: transparent;
}

.code-block pre::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* Launch Button */
.launch-btn {
  box-shadow: 0 2px 10px rgba(233, 30, 140, 0.3);
}

.launch-btn:hover {
  box-shadow: 0 4px 20px rgba(233, 30, 140, 0.5);
}

/* Inline Code */
.inline-code {
  background: rgba(233, 30, 140, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  color: #f472b6;
}

/* Input Container */
.input-container {
  background: rgba(17, 17, 24, 0.9);
  backdrop-filter: blur(20px);
}

.input-wrapper:focus-within {
  box-shadow: 0 0 0 2px rgba(233, 30, 140, 0.3);
}

textarea {
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Settings Modal */
.settings-modal {
  animation: modalIn 0.3s ease-out;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Range Input */
input[type="range"] {
  -webkit-appearance: none;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #e91e8c, #a21caf);
  border-radius: 50%;
  cursor: pointer;
}

/* Select Dropdown */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23888'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

select option {
  background: #1a1a24;
  color: white;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .sidebar {
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.5);
  }
}

/* Prose Styles */
.prose strong {
  color: #f472b6;
  font-weight: 600;
}

.prose em {
  color: #c084fc;
}

/* Light Mode (optional) */
.light body {
  background: #fafafa;
  color: #1a1a2e;
}

.light .header-glass,
.light .sidebar,
.light .input-container {
  background: rgba(255, 255, 255, 0.9);
}

.light .ai-message {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}