:root {
  --berry-red: #FF6B6B;
  --berry-pink: #FF8ED4;
  --berry-cream: #FFF5F5;
  --berry-dark: #2D1B1B;
  --google-blue: #4285F4;
  --google-gray: #5F6368;
  --success-green: #34A853;
  --warning-yellow: #FBBC05;
  --error-red: #EA4335;
}

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

body {
  font-family: 'Bricolage Grotesque', sans-serif;
  background: linear-gradient(135deg, #1a0a0a 0%, #2d1515 50%, #1a0a0a 100%);
  min-height: 100vh;
  color: #fff;
  overflow-x: hidden;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--berry-red) 0%, var(--berry-pink) 100%);
  padding: 2rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.header-berry {
  font-size: 4rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  display: inline-block;
  position: relative;
  z-index: 1;
}

.header-berry:hover {
  transform: scale(1.1);
}

.header-berry.dancing {
  animation: berryDance 0.5s ease infinite;
}

@keyframes berryDance {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-15deg) scale(1.1); }
  50% { transform: rotate(0deg) scale(1.2); }
  75% { transform: rotate(15deg) scale(1.1); }
}

.header-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  color: white;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
  margin: 0.5rem 0;
  position: relative;
  z-index: 1;
}

.header-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,0.9);
  font-weight: 400;
  position: relative;
  z-index: 1;
}

/* Main content */
.main-content {
  flex: 1;
  padding: 2rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Race button */
.race-button-container {
  text-align: center;
  margin-bottom: 2rem;
}

.race-button {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  padding: 1rem 3rem;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--berry-red) 0%, var(--berry-pink) 100%);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
}

.race-button:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(255, 107, 107, 0.5);
}

.race-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.race-button.racing {
  animation: pulse 1s ease infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Comparison container */
.comparison-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .comparison-container {
    grid-template-columns: 1fr;
  }
}

.comparison-side {
  background: rgba(255,255,255,0.05);
  border-radius: 24px;
  padding: 1.5rem;
  min-height: 450px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}

.hard-way {
  background: linear-gradient(135deg, rgba(66,133,244,0.1) 0%, rgba(95,99,104,0.1) 100%);
}

.berrry-way {
  background: linear-gradient(135deg, rgba(255,107,107,0.1) 0%, rgba(255,142,212,0.1) 100%);
}

.side-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}

.side-title.hard {
  color: var(--google-gray);
}

.side-title.berrry {
  color: var(--berry-pink);
}

/* Google modals */
.modals-container {
  position: relative;
  height: 300px;
  perspective: 1000px;
}

.placeholder-text {
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  padding: 2rem;
}

.berrry-placeholder {
  color: rgba(255,142,212,0.7);
}

.google-modal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  animation: slideIn 0.4s ease forwards;
  overflow: hidden;
}

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

.modal-header {
  background: #f1f3f4;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.url-bar {
  flex: 1;
  background: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--google-gray);
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lock-icon {
  font-size: 0.7rem;
}

.modal-content {
  padding: 1.5rem;
  text-align: center;
  color: var(--berry-dark);
}

.google-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #4285F4 25%, #34A853 25%, #34A853 50%, #FBBC05 50%, #FBBC05 75%, #EA4335 75%);
  border-radius: 4px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--google-gray);
}

.spinner-container {
  padding: 1rem;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e0e0e0;
  border-top-color: var(--google-blue);
  border-radius: 50%;
  margin: 0 auto 0.5rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 0.85rem;
  color: var(--google-gray);
}

.error-box {
  background: #fce8e6;
  color: var(--error-red);
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
}

.fake-input {
  background: #f1f3f4;
  border: 1px solid #dadce0;
  border-radius: 4px;
  padding: 0.75rem;
  margin-bottom: 1rem;
  color: var(--google-gray);
  font-size: 0.9rem;
}

.fake-button {
  background: var(--google-blue);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.fake-button.disabled {
  opacity: 0.5;
}

.captcha-hint {
  font-size: 0.75rem;
  color: var(--google-gray);
}

/* Progress bar */
.progress-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--error-red), var(--warning-yellow));
  transition: width 0.3s ease;
}

.step-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.5rem;
  text-align: center;
}

/* Tweet composer */
.tweet-container {
  height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tweet-composer {
  background: #15202b;
  border-radius: 16px;
  padding: 1.5rem;
  animation: fadeIn 0.5s ease;
}

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

.tweet-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--berry-red), var(--berry-pink));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.tweet-user {
  display: flex;
  flex-direction: column;
}

.name {
  font-weight: 700;
  color: white;
}

.handle {
  font-size: 0.85rem;
  color: #8899a6;
}

.tweet-input {
  font-size: 1.25rem;
  color: white;
  min-height: 60px;
  line-height: 1.5;
}

.tweet-text {
  color: #1d9bf0;
}

.cursor {
  animation: blink 0.8s ease infinite;
  color: #1d9bf0;
}

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

.success-container {
  margin-top: 1.5rem;
  text-align: center;
  animation: successPop 0.5s ease;
}

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

.sparkles {
  font-size: 2rem;
  animation: sparkle 1s ease infinite;
}

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

.success-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--success-green), #27ae60);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 700;
  margin: 0.75rem 0;
}

.check {
  font-size: 1.2rem;
}

.happy-berry {
  font-size: 3rem;
  animation: bounce 0.5s ease infinite;
}

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

.success-subtext {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.winner-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 800;
  animation: winnerPop 0.5s ease;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
}

@keyframes winnerPop {
  0% { transform: scale(0) rotate(-10deg); }
  50% { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Try it button */
.try-it-container {
  text-align: center;
  margin: 2rem 0;
}

.try-it-button {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 1rem 2rem;
  border: 2px solid #1d9bf0;
  border-radius: 50px;
  background: transparent;
  color: #1d9bf0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.try-it-button:hover {
  background: #1d9bf0;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(29, 155, 240, 0.3);
}

/* Stats */
.stats-section {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  padding: 2rem;
  background: rgba(255,255,255,0.03);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--berry-pink);
  font-family: 'JetBrains Mono', monospace;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  background: rgba(0,0,0,0.3);
}

.footer-link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--berry-pink);
}

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.confetti-particle {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

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

/* Mobile adjustments */
@media (max-width: 600px) {
  .header {
    padding: 1.5rem 1rem;
  }
  
  .header-berry {
    font-size: 3rem;
  }
  
  .race-button {
    font-size: 1.25rem;
    padding: 0.75rem 2rem;
  }
  
  .comparison-side {
    min-height: 400px;
    padding: 1rem;
  }
  
  .stats-section {
    gap: 1.5rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
}