/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--white);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: var(--font-size-sm);
  gap: var(--space-2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--gray-light);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-icon {
  background: none;
  border: none;
  padding: var(--space-2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* Responsive */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .container {
    padding: 0 var(--space-4);
  }
}

/* Add to main.css */

/* Utility Classes */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}

.mb-0 {
  margin-bottom: 0;
}
.mb-2 {
  margin-bottom: var(--space-2);
}
.mb-4 {
  margin-bottom: var(--space-4);
}
.mb-6 {
  margin-bottom: var(--space-6);
}
.mb-8 {
  margin-bottom: var(--space-8);
}

.mt-0 {
  margin-top: 0;
}
.mt-2 {
  margin-top: var(--space-2);
}
.mt-4 {
  margin-top: var(--space-4);
}
.mt-6 {
  margin-top: var(--space-6);
}
.mt-8 {
  margin-top: var(--space-8);
}

.p-0 {
  padding: 0;
}
.p-2 {
  padding: var(--space-2);
}
.p-4 {
  padding: var(--space-4);
}
.p-6 {
  padding: var(--space-6);
}
.p-8 {
  padding: var(--space-8);
}

.d-block {
  display: block;
}
.d-inline {
  display: inline;
}
.d-inline-block {
  display: inline-block;
}
.d-flex {
  display: flex;
}
.d-grid {
  display: grid;
}
.d-none {
  display: none;
}

.flex-column {
  flex-direction: column;
}
.flex-row {
  flex-direction: row;
}
.flex-wrap {
  flex-wrap: wrap;
}
.flex-nowrap {
  flex-wrap: nowrap;
}
.align-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}

.w-100 {
  width: 100%;
}
.h-100 {
  height: 100%;
}

/* Responsive Display Utilities */
@media (max-width: 768px) {
  .d-md-none {
    display: none;
  }
  .d-md-block {
    display: block;
  }
  .d-md-flex {
    display: flex;
  }
  .d-md-grid {
    display: grid;
  }
}

@media (max-width: 576px) {
  .d-sm-none {
    display: none;
  }
  .d-sm-block {
    display: block;
  }
  .d-sm-flex {
    display: flex;
  }
  .d-sm-grid {
    display: grid;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* User dropdown styles */
.user-menu {
  position: relative;
}

.user-avatar-btn {
  cursor: pointer;
  transition: transform 0.2s;
}

.user-avatar-btn:hover {
  transform: scale(1.05);
}

/* Around line 200 - These are also hiding dropdowns */
.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  z-index: 1000;
  /* Remove opacity/visibility if present */
}

.dropdown-item {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: #f5f5f5;
}

.dropdown-item i {
  margin-right: 8px;
  width: 16px;
}

/* ============================================================
   FIX: Remove paint palette, keep ✧
   ============================================================ */

/* Remove any paint palette that might be added */
.nav-brand .logo .logo-icon {
  font-size: 1.5rem !important;
  display: inline-block !important;
  color: #ff00ea !important;
  animation: logoGlowPulse 2s ease-in-out infinite !important;
  filter: drop-shadow(0 0 20px rgba(255, 0, 234, 0.3)) !important;
  font-family: "Orbitron", "Rajdhani", monospace !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  width: auto !important;
  height: auto !important;
  position: relative !important;
  overflow: visible !important;
}

/* Remove any pseudo-elements that might add 🎨 */
.nav-brand .logo .logo-icon::before,
.nav-brand .logo .logo-icon::after {
  display: none !important;
  content: none !important;
}

/* If a Font Awesome class is accidentally applied, override it */
.nav-brand .logo .logo-icon.fa,
.nav-brand .logo .logo-icon.fas,
.nav-brand .logo .logo-icon.far,
.nav-brand .logo .logo-icon.fal,
.nav-brand .logo .logo-icon.fab {
  font-family: "Orbitron", "Rajdhani", monospace !important;
}

/* Force the ✧ to be visible */
.nav-brand .logo .logo-icon {
  font-size: 1.5rem !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@keyframes logoGlowPulse {
  0%,
  100% {
    color: #ff00ea;
    text-shadow:
      0 0 20px rgba(255, 0, 234, 0.4),
      0 0 40px rgba(255, 0, 234, 0.2);
    transform: scale(1);
  }
  25% {
    color: #ff66f0;
    text-shadow:
      0 0 30px rgba(255, 0, 234, 0.6),
      0 0 60px rgba(255, 0, 234, 0.3);
    transform: scale(1.05);
  }
  50% {
    color: #58ebfe;
    text-shadow:
      0 0 30px rgba(88, 235, 254, 0.6),
      0 0 60px rgba(88, 235, 254, 0.3);
    transform: scale(1.1);
  }
  75% {
    color: #a0f0ff;
    text-shadow:
      0 0 30px rgba(88, 235, 254, 0.4),
      0 0 60px rgba(88, 235, 254, 0.2);
    transform: scale(1.05);
  }
  100% {
    color: #ff00ea;
    text-shadow:
      0 0 20px rgba(255, 0, 234, 0.4),
      0 0 40px rgba(255, 0, 234, 0.2);
    transform: scale(1);
  }
}

/* ============================================================
   FORCE LOGO ICON TO BE ✧ — OVERRIDE HTML CONTENT
   ============================================================ */

/* Hide the actual content (🎨) and show ✧ instead */
.nav-brand .logo .logo-icon {
  font-size: 0 !important;
  display: inline-block !important;
  width: 28px !important;
  height: 28px !important;
  position: relative !important;
  min-width: 28px !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.nav-brand .logo .logo-icon::before {
  content: "✧" !important;
  font-size: 1.6rem !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  animation: logoGlowPulse 2s ease-in-out infinite !important;
  color: #ff00ea !important;
  display: block !important;
  line-height: 1 !important;
  font-family: "Orbitron", "Rajdhani", monospace !important;
}

@keyframes logoGlowPulse {
  0%,
  100% {
    color: #ff00ea;
    text-shadow:
      0 0 20px rgba(255, 0, 234, 0.4),
      0 0 40px rgba(255, 0, 234, 0.2);
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    color: #58ebfe;
    text-shadow:
      0 0 30px rgba(88, 235, 254, 0.6),
      0 0 60px rgba(88, 235, 254, 0.3);
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* ===== DISABLE BLUR ON MOBILE FOR PERFORMANCE ===== */
@media (max-width: 768px) {
  /* Disable all backdrop filters */
  .glass-panel,
  .hero-content,
  .host-info-container,
  .winners-carousel-container,
  .news-slider-container,
  .artwork-card,
  .challenge-card,
  .feed-item,
  .artist-card,
  .home-cta,
  .main-header,
  .notification-dropdown,
  .avatar-dropdown,
  .search-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(10, 5, 8, 0.95) !important;
  }

  /* Light theme override */
  [data-theme="light"] .glass-panel,
  [data-theme="light"] .hero-content,
  [data-theme="light"] .host-info-container,
  [data-theme="light"] .winners-carousel-container,
  [data-theme="light"] .news-slider-container,
  [data-theme="light"] .artwork-card,
  [data-theme="light"] .challenge-card,
  [data-theme="light"] .feed-item,
  [data-theme="light"] .artist-card,
  [data-theme="light"] .home-cta,
  [data-theme="light"] .main-header {
    background: rgba(245, 240, 232, 0.95) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Disable noise overlay on mobile */
  .noise-overlay {
    display: none !important;
  }

  /* Reduce scanline opacity */
  .scanlines {
    opacity: 0.3 !important;
  }

  /* Simplify animations on mobile */
  .glitch-welcome::before,
  .glitch-welcome::after,
  .glitch-header::before,
  .glitch-header::after,
  .glitch-header .glitch-layer,
  .glitch-header .rgb-split {
    animation-duration: 0s !important;
    opacity: 0.05 !important;
  }

  /* Reduce hero animation intensity */
  .neon-orb {
    animation-duration: 8s !important;
    width: 200px !important;
    height: 200px !important;
  }

  .grid-overlay {
    background-size: 50px 50px !important;
    opacity: 0.15 !important;
  }
}
