:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a24;
  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
  --accent-coral: #ff6b6b;
  --accent-gold: #ffd93d;
  --accent-teal: #4ecdc4;
  --accent-purple: #a855f7;
  --accent-blue: #3b82f6;
  --success: #22c55e;
  --error: #ef4444;
}

.dark {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a24;
  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
}

.light {
  --bg-primary: #f5f5fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #6b6b80;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

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

@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.3); }
  50% { box-shadow: 0 0 40px rgba(168, 85, 247, 0.6); }
}

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

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes copied {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.animate-sparkle {
  animation: sparkle 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-slide-up {
  animation: slide-up 0.5s ease-out forwards;
}

.animate-copied {
  animation: copied 0.3s ease-out;
}

.gradient-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
}

.gradient-border {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
  padding: 2px;
}

.card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.pill-btn {
  border-radius: 50px;
  padding: 10px 20px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.pill-btn:active {
  transform: translateY(0);
}

.tone-btn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid transparent;
  padding: 12px 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.tone-btn:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
}

.tone-btn.active {
  border-color: var(--accent-purple);
  background: rgba(168, 85, 247, 0.15);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.influencer-btn {
  background: var(--bg-secondary);
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  min-width: 100px;
}

.influencer-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.influencer-btn.active {
  border-color: var(--accent-gold);
  box-shadow: 0 0 25px rgba(255, 217, 61, 0.3);
}

.textarea-wrapper {
  position: relative;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.3s ease;
}

.textarea-wrapper:focus-within {
  border-color: var(--accent-purple);
}

.textarea-wrapper textarea {
  width: 100%;
  min-height: 200px;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  padding: 20px;
  padding-right: 50px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

.textarea-wrapper textarea::placeholder {
  color: var(--text-secondary);
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  transition: stroke-dashoffset 0.5s ease;
}

.tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent-purple);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-purple);
  border-radius: 3px 3px 0 0;
}

.diff-added {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
  padding: 2px 4px;
  border-radius: 4px;
}

.diff-removed {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
  text-decoration: line-through;
  padding: 2px 4px;
  border-radius: 4px;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

.slider-track {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-secondary);
  outline: none;
}

.slider-track::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-purple);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.slider-track::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.loading-dots::after {
  content: '';
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

@media (max-width: 768px) {
  .pill-btn {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .tone-btn, .influencer-btn {
    padding: 10px 12px;
    font-size: 14px;
  }
}