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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: #333;
  overflow-x: hidden;
}

.berry-bg {
  background: linear-gradient(135deg, #FFF4E6 0%, #FFE0D4 50%, #FFB4B4 100%);
  min-height: 100vh;
  position: relative;
}

.floating-berry {
  position: fixed;
  font-size: 2rem;
  pointer-events: none;
  animation: float 20s infinite ease-in-out;
  opacity: 0.3;
  z-index: 1;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-50px) rotate(90deg);
  }
  50% {
    transform: translateY(0) rotate(180deg);
  }
  75% {
    transform: translateY(-30px) rotate(270deg);
  }
}

.app {
  position: relative;
  z-index: 2;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 3rem;
  animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.title {
  font-size: 3rem;
  font-weight: 800;
  color: #8B0000;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
  font-size: 1.5rem;
  color: #FF6B6B;
  font-weight: 600;
}

.sparkle {
  display: inline-block;
  animation: sparkle 1.5s infinite;
}

@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.2) rotate(180deg); }
}

.motivational {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: #666;
  font-style: italic;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  align-items: start;
}

.leaderboard-section {
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.podium {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: end;
}

.spotlight-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.creator-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 1.5rem;
  padding: 1.5rem;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 107, 107, 0.2);
  animation: slideUp 0.5s ease-out backwards;
}

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

.creator-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(255, 107, 107, 0.3);
  border-color: #FF6B6B;
}

.spotlight {
  min-height: 320px;
}

.podium-first {
  animation-delay: 0.2s;
  order: 2;
}

.podium-second {
  animation-delay: 0.1s;
  order: 1;
  margin-top: 2rem;
}

.podium-third {
  animation-delay: 0.3s;
  order: 3;
  margin-top: 2rem;
}

.podium-first:hover {
  box-shadow: 0 12px 40px rgba(255, 215, 0, 0.4);
}

.medal {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3rem;
  animation: bounce 2s infinite;
}

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

.rank-number {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #FF6B6B, #FFB4B4);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: block;
  border: 3px solid #FF6B6B;
  object-fit: cover;
}

.creator-info {
  text-align: center;
}

.username {
  font-size: 1.2rem;
  font-weight: 700;
  color: #8B0000;
  margin-bottom: 0.3rem;
}

.platform {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #FF6B6B;
}

.stat-label {
  font-size: 0.85rem;
  color: #666;
}

.app-previews {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0;
}

.app-thumbnail {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  object-fit: cover;
  transition: transform 0.2s;
  border: 2px solid rgba(255, 107, 107, 0.2);
}

.app-thumbnail:hover {
  transform: scale(1.2);
  border-color: #FF6B6B;
}

.badges-mini {
  display: flex;
  gap: 0.3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  transition: all 0.2s;
  cursor: pointer;
}

.badge.unlocked {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #8B0000;
}

.badge.locked {
  background: #e0e0e0;
  color: #999;
  opacity: 0.5;
}

.badge-emoji {
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}

.badge-name {
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.badge:hover {
  transform: scale(1.1);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 2rem;
}

.reward-voting {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 1.5rem;
  padding: 1.5rem;
  border: 2px solid rgba(255, 107, 107, 0.2);
}

.reward-voting h3 {
  color: #8B0000;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.reward-desc {
  color: #666;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.vote-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.vote-btn {
  background: white;
  border: 2px solid #FFB4B4;
  border-radius: 0.75rem;
  padding: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.vote-btn:hover:not(:disabled) {
  border-color: #FF6B6B;
  transform: translateX(4px);
}

.vote-btn.voted {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  border-color: #FFD700;
}

.vote-btn:disabled {
  cursor: default;
}

.vote-emoji {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.vote-label {
  font-weight: 600;
  color: #8B0000;
  margin-bottom: 0.5rem;
}

.vote-bar {
  width: 100%;
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.vote-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF6B6B, #FFB4B4);
  transition: width 0.5s ease;
}

.vote-count {
  font-size: 0.85rem;
  color: #666;
  font-weight: 600;
}

.stats-widget {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 1.5rem;
  padding: 1.5rem;
  border: 2px solid rgba(255, 107, 107, 0.2);
}

.stats-widget h3 {
  color: #8B0000;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.widget-stat {
  text-align: center;
  padding: 1rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #FFF4E6, #FFE0D4);
  border-radius: 0.75rem;
}

.widget-value {
  font-size: 2rem;
  font-weight: 800;
  color: #FF6B6B;
}

.widget-label {
  font-size: 0.9rem;
  color: #666;
  font-weight: 600;
}

.cta-box {
  background: linear-gradient(135deg, #FF6B6B, #FFB4B4);
  color: white;
  border-radius: 1.5rem;
  padding: 1.5rem;
  text-align: center;
}

.cta-box h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.cta-box p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.cta-links {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
}

.cta-link {
  background: white;
  color: #FF6B6B;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.cta-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  animation: fadeIn 0.2s;
}

.modal-content {
  background: white;
  border-radius: 2rem;
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease-out;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #f0f0f0;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: #FF6B6B;
  color: white;
  transform: rotate(90deg);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.modal-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid #FF6B6B;
}

.modal-header h2 {
  color: #8B0000;
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
}

.modal-rank {
  color: #FF6B6B;
  font-weight: 700;
  font-size: 1.2rem;
}

.modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.modal-stat {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #FFF4E6, #FFE0D4);
  border-radius: 1rem;
}

.modal-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: #FF6B6B;
  margin-bottom: 0.3rem;
}

.modal-stat-label {
  font-size: 0.9rem;
  color: #666;
  font-weight: 600;
}

.modal-section {
  margin-bottom: 2rem;
}

.modal-section h3 {
  color: #8B0000;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.app-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-item {
  text-align: center;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  border: 2px solid #FFB4B4;
  object-fit: cover;
}

.gallery-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #8B0000;
  margin-bottom: 0.2rem;
}

.gallery-type {
  font-size: 0.75rem;
  color: #999;
}

.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confettiFall 3s linear forwards;
}

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

.footer {
  text-align: center;
  margin-top: 4rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
}

.footer a {
  color: #FF6B6B;
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-note {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
  }
  
  .podium {
    grid-template-columns: 1fr;
  }
  
  .podium-second,
  .podium-third {
    margin-top: 0;
  }
  
  .spotlight-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app {
    padding: 1rem;
  }
  
  .title {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 1.2rem;
  }
  
  .modal-content {
    padding: 1.5rem;
  }
  
  .modal-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .badges-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .app-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}