// Error handling for wallet extension conflicts
(function() {
  // Prevent wallet extension errors from breaking the page
  const originalError = window.onerror;
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 0;
}

.app {
  min-height: 100vh;
  background: linear-gradient(135deg, #1A1A1A 0%, #1E1E1E 50%, #1A1A1A 100%);
  color: white;
  position: relative;
  overflow-x: hidden;
}

/* Floating background elements */
.floating-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floating-element {
  position: absolute;
  background: #60B796;
  border-radius: 50%;
  filter: blur(40px);
}

.floating-1 {
  top: 5rem;
  left: 2.5rem;
  width: 5rem;
  height: 5rem;
  opacity: 0.05;
  animation: pulse 2s infinite;
}

.floating-2 {
  top: 10rem;
  right: 5rem;
  width: 8rem;
  height: 8rem;
  opacity: 0.03;
  filter: blur(80px);
  animation: pulse 2s infinite 1s;
}

.floating-3 {
  bottom: 10rem;
  left: 5rem;
  width: 6rem;
  height: 6rem;
  opacity: 0.04;
  animation: pulse 2s infinite 0.5s;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.05;
  }
  50% {
    opacity: 0.1;
  }
}

/* Sticky Header */
.sticky-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(96, 183, 150, 0.2);
  overflow: hidden;
}

.header-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.header-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  filter: blur(2px);
  transform: scale(1.1);
}

.header-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(96, 183, 150, 0.8) 0%, rgba(96, 183, 150, 0.6) 50%, rgba(123, 202, 163, 0.8) 100%);
}

.header-content {
  position: relative;
  z-index: 10;
  padding: 0.75rem;
}

.header-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 80rem;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex: 1;
}

.logo-btn {
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.logo-btn:hover {
  transform: scale(1.05);
}

.logo-container {
  position: relative;
}

.logo {
  height: 3rem;
  width: 3rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  transition: border-color 0.3s;
}

.logo-btn:hover .logo {
  border-color: rgba(255, 255, 255, 0.8);
}

.logo-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: white;
  opacity: 0;
  transition: opacity 0.3s;
}

.logo-btn:hover .logo-overlay {
  opacity: 0.2;
}

.ca-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

.ca-text {
  color: white;
  font-family: monospace;
  font-size: 0.75rem;
  font-weight: 500;
}

.copy-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 9999px;
  transition: all 0.2s;
}

.copy-btn:hover {
  color: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.1);
}

.header-center {
  display: flex;
  justify-content: center;
  flex: 1;
}

.buy-btn {
  position: relative;
  background: white;
  color: #1A1A1A;
  font-weight: bold;
  font-size: 1.125rem;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.buy-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.buy-btn-overlay {
  position: absolute;
  inset: 0;
  background: #f0f0f0;
  opacity: 0;
  transition: opacity 0.3s;
}

.buy-btn:hover .buy-btn-overlay {
  opacity: 1;
}

.buy-btn-text {
  position: relative;
  z-index: 10;
}

.header-right {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.social-link {
  transition: all 0.2s;
  padding: 0.5rem;
  border-radius: 0.25rem;
}

.social-link:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.1);
}

.social-icon {
  height: 1.5rem;
  width: 1.5rem;
}

/* Main Content */
.main-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0.75rem 3rem;
}

/* Live Stream Section */
.stream-section {
  width: 100%;
  max-width: 64rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.stream-banner-container {
  width: 100%;
  position: relative;
}

.stream-banner {
  aspect-ratio: 3/1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  background: linear-gradient(90deg, rgba(45, 45, 45, 0.5) 0%, rgba(61, 61, 61, 0.5) 100%);
  transition: transform 0.7s ease;
}

.stream-banner:hover {
  transform: scale(1.05);
}

.stream-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stream-overlay {
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, transparent 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.stream-banner-container:hover .stream-overlay {
  opacity: 1;
}

.live-indicator {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: #dc2626;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.live-dot {
  width: 0.375rem;
  height: 0.375rem;
  background: white;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* Action Buttons */
.action-buttons {
  width: 100%;
  max-width: 32rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.action-btn {
  position: relative;
  display: block;
  flex: 1;
  font-weight: bold;
  font-size: 1.125rem;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  white-space: nowrap;
}

.action-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.watch-btn {
  background: linear-gradient(90deg, #dc2626 0%, #b91c1c 100%);
  color: #60B796;
}

.watch-btn:hover {
  box-shadow: 0 20px 25px -5px rgba(220, 38, 38, 0.25);
}

.watch-btn .action-btn-overlay {
  background: linear-gradient(90deg, #b91c1c 0%, #dc2626 100%);
}

.food-btn {
  background: linear-gradient(90deg, #60B796 0%, #7BCAA3 100%);
  color: #dc2626;
}

.food-btn:hover {
  box-shadow: 0 20px 25px -5px rgba(96, 183, 150, 0.25);
}

.food-btn .action-btn-overlay {
  background: linear-gradient(90deg, #4FA584 0%, #5EB693 100%);
}

.action-btn-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.action-btn:hover .action-btn-overlay {
  opacity: 1;
}

.action-btn-text {
  position: relative;
  z-index: 10;
}

/* Schedule Section */
.schedule-section {
  width: 100%;
  max-width: 64rem;
}

.schedule-grid {
  display: grid;
  gap: 0.75rem;
}

.schedule-item {
  background: linear-gradient(90deg, #2D2D2D 0%, #323232 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s;
  backdrop-filter: blur(4px);
}

.schedule-item:hover {
  border-color: rgba(96, 183, 150, 0.3);
  transform: scale(1.02);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.schedule-emoji {
  font-size: 1.125rem;
}

.schedule-day {
  font-weight: bold;
  color: #60B796;
  font-size: 0.875rem;
  text-align: center;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #1A1A1A;
  border: 1px solid rgba(96, 183, 150, 0.3);
  border-radius: 0.5rem;
  padding: 1rem;
  min-width: 250px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.3s ease;
}

.toast-title {
  font-weight: bold;
  color: #60B796;
  margin-bottom: 0.25rem;
}

.toast-description {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (min-width: 640px) {
  .header-content {
    padding: 1rem;
  }

  .ca-text {
    font-size: 0.875rem;
  }

  .buy-btn {
    font-size: 1.25rem;
    padding: 1rem 3rem;
  }

  .social-icon {
    height: 2rem;
    width: 2rem;
  }

  .main-content {
    gap: 2rem;
    padding: 1rem 1rem 3rem;
  }

  .stream-section {
    gap: 1.5rem;
  }

  .action-buttons {
    flex-direction: row;
  }

  .action-btn {
    font-size: 1.25rem;
    padding: 1.25rem 2.5rem;
  }

  .schedule-grid {
    gap: 1rem;
  }

  .schedule-item {
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
  }

  .schedule-emoji {
    font-size: 1.25rem;
  }

  .schedule-day {
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .header-content {
    padding: 1.5rem;
  }

  .main-content {
    gap: 2.5rem;
    padding: 1.5rem 1.5rem 3rem;
  }
}

@media (min-width: 1024px) {
  .logo {
    height: 4rem;
    width: 4rem;
  }

  .header-wrapper {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0;
  }

  .header-left {
    justify-content: flex-start;
  }

  .header-right {
    justify-content: flex-end;
  }
}
