:root {
  --bg-color: #0f0f11;
  --surface-color: rgba(26, 26, 31, 0.6);
  --surface-border: rgba(255, 255, 255, 0.08);
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --gradient-primary: linear-gradient(135deg, #8b5cf6, #c026d3);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --error: #ef4444;
  --success: #10b981;
  --font-family: 'Outfit', sans-serif;
  --transition: all 0.3s ease;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15), transparent 25%),
                    radial-gradient(circle at 85% 30%, rgba(192, 38, 211, 0.15), transparent 25%);
  background-attachment: fixed;
}

/* Glassmorphism Utilities */
.glass {
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  position: relative;
  z-index: 10;
}

#tsparticles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(15, 15, 17, 0.8);
  backdrop-filter: blur(10px);
  padding: 1rem 5%;
  border-bottom: 1px solid var(--surface-border);
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-main);
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font-family);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--surface-border);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
}

/* Layout */
#app-container {
  padding-top: 100px;
  min-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
}

.view {
  display: none;
  animation: fadeIn 0.4s ease forwards;
  flex: 1;
  padding: 2rem 5%;
}

.view.active {
  display: block;
}

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

/* Home View */
.hero-section {
  text-align: center;
  margin-top: 5vh;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.countdown-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 3rem 0;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  min-width: 120px;
}

.countdown-value {
  font-size: 3rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.countdown-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
}

.event-status {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 2rem;
  color: var(--primary);
}

.participants-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.05);
  border-radius: 20px;
  border: 1px solid var(--surface-border);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2rem;
}

/* Forms */
.form-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 2.5rem;
  width: 100%;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

/* Staggered form intro */
.form-group {
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: slideUp 0.5s ease forwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }
.form-group:nth-child(6) { animation-delay: 0.6s; }
.form-group:nth-child(7) { animation-delay: 0.7s; }

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

/* Artists Selection */
.artists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.artist-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  aspect-ratio: 1;
}

.artist-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.artist-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.artist-name {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  z-index: 10;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}

.artist-card:hover img {
  transform: scale(1.1);
}

.artist-card.selected {
  border-color: var(--primary);
}

.artist-card.selected::before {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  font-size: 14px;
  font-weight: bold;
}

/* Signature Canvas */
.signature-wrapper {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--surface-border);
}
#signature-pad {
  width: 100%;
  height: 200px;
  cursor: crosshair;
}
.signature-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem;
  background: #f1f5f9;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--surface-border);
  padding-bottom: 1rem;
}
.tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
}
.tab.active {
  color: var(--text-main);
  background: rgba(255,255,255,0.05);
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* PDF View (Hidden initially) */
#pdf-container {
  position: absolute;
  top: -9999px;
  left: -9999px;
  width: 800px; /* fixed size for PDF */
  background: white;
  color: #000;
  padding: 40px;
  box-sizing: border-box;
}

/* Helpers */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  /* Navbar */
  .mobile-menu-btn {
    display: block;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 17, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-bottom: 1px solid var(--surface-border);
    gap: 1.5rem;
  }
  .nav-links.active {
    display: flex;
  }
  .navbar {
    padding: 1rem 5%;
  }

  /* Typography */
  .hero-title {
    font-size: 2.5rem;
  }
  .countdown-value {
    font-size: 2rem;
  }
  .countdown-item {
    min-width: 80px;
    padding: 1rem;
  }
  .countdown-container {
    flex-wrap: wrap;
    gap: 1rem;
  }

  /* Layout */
  .form-container, .glass {
    padding: 1.5rem;
  }
  .view {
    padding: 1rem 5%;
  }

  /* Artists Grid */
  .artists-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }

  /* Signature Canvas */
  #signature-pad {
    height: 150px;
  }
}
