:root {
  --bg-deep: #0d0d1a;
  --bg-card: #141428;
  --bg-surface: #1a1a35;
  --gold: #d4a535;
  --gold-light: #f0c850;
  --gold-dim: #8a6b1e;
  --red-hot: #e63946;
  --green-go: #2ecc71;
  --yellow-mid: #f1c40f;
  --text-primary: #eee8d5;
  --text-secondary: #8a8a9a;
  --clock-face: #10101f;
}

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

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(212, 165, 53, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(212, 165, 53, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, rgba(20, 20, 40, 1) 0%, rgba(13, 13, 26, 1) 100%);
  pointer-events: none;
  z-index: 0;
}

#root {
  position: relative;
  z-index: 1;
}

@keyframes clockPulse {
  0%, 100% { filter: drop-shadow(0 0 15px rgba(212, 165, 53, 0.2)); }
  50% { filter: drop-shadow(0 0 30px rgba(212, 165, 53, 0.4)); }
}

@keyframes clockShake {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(-8deg); }
  20% { transform: rotate(8deg); }
  30% { transform: rotate(-6deg); }
  40% { transform: rotate(6deg); }
  50% { transform: rotate(-4deg); }
  60% { transform: rotate(4deg); }
  70% { transform: rotate(-2deg); }
  80% { transform: rotate(2deg); }
  90% { transform: rotate(-1deg); }
}

@keyframes confettiFall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

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

@keyframes typewriterBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.clock-running {
  animation: clockPulse 2s ease-in-out infinite;
}

.clock-done {
  animation: clockShake 0.6s ease-in-out;
}

.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confettiFall 3s ease-in forwards;
  z-index: 100;
  border-radius: 2px;
}

.fade-in-up {
  animation: fadeInUp 0.5s ease-out;
}

.typewriter-cursor::after {
  content: '|';
  animation: typewriterBlink 0.7s step-end infinite;
  color: var(--gold);
  font-weight: 700;
}

/* Settings modal animation */
@keyframes settingsSlideIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

.tone-pill {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tone-pill:hover {
  transform: translateY(-2px);
}

.tone-pill.active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(212, 165, 53, 0.3);
}

.start-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, var(--gold) 0%, #c4942e 100%);
}

.start-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 165, 53, 0.4);
}

.start-btn:active:not(:disabled) {
  transform: translateY(0);
}

.start-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tweet-card {
  background: linear-gradient(135deg, rgba(26, 26, 53, 0.9) 0%, rgba(20, 20, 40, 0.95) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 165, 53, 0.15);
}

.copy-btn {
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: rgba(212, 165, 53, 0.15);
}

.history-item {
  transition: all 0.2s ease;
  border: 1px solid rgba(212, 165, 53, 0.08);
}

.history-item:hover {
  border-color: rgba(212, 165, 53, 0.25);
  background: rgba(212, 165, 53, 0.05);
}