* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-drag: none;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  background: #000000;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

@keyframes rainbow {
  0% { color: #ff0000; text-shadow: 0 0 10px #ff0000; }
  14% { color: #ff7f00; text-shadow: 0 0 10px #ff7f00; }
  28% { color: #ffff00; text-shadow: 0 0 10px #ffff00; }
  42% { color: #00ff00; text-shadow: 0 0 10px #00ff00; }
  57% { color: #0000ff; text-shadow: 0 0 10px #0000ff; }
  71% { color: #4b0082; text-shadow: 0 0 10px #4b0082; }
  85% { color: #8f00ff; text-shadow: 0 0 10px #8f00ff; }
  100% { color: #ff0000; text-shadow: 0 0 10px #ff0000; }
}

.rainbow-text {
  animation: rainbow 5s linear infinite;
  font-weight: bold;
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.preloader {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
  transform: scale(0.15);
}

.crack {
  position: absolute;
  width: 10%;
  aspect-ratio: 1;
  background: #a0a0a0;
  background: radial-gradient(circle at 30% 30%, #ffffff, #707070);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: rotate 6s infinite;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.9);
}

.crack2 { width: 12%; animation-delay: 1s; }
.crack3 { width: 14%; animation-delay: 1.5s; }
.crack4 { width: 16%; animation-delay: 2s; }
.crack5 { width: 18%; animation-delay: 2.5s; }

@keyframes rotate {
  to { rotate: 360deg; }
}

#content {
  opacity: 0;
  transition: opacity 0.8s ease-in;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

#content.visible {
  opacity: 1;
}

.grid-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 15s linear infinite;
}

.grid-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%), radial-gradient(circle at 20% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
  filter: blur(40px);
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes gridMove {
  0% { transform: translateY(0) translateX(0); }
  100% { transform: translateY(50px) translateX(50px); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.15); }
}

main {
  position: relative;
  z-index: 10;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.discord-nav {
  background: #2c2c2c;
  color: #9ca3af;
  padding: 0.5rem 1.2rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.discord-nav:hover {
  background: #5865F2;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.5);
}

.download-nav {
  background: #2c2c2c;
  color: #9ca3af;
  padding: 0.5rem 1.2rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.download-nav:hover {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.primary-btn-large {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  padding: 0.875rem 2.5rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px 0 rgba(99, 102, 241, 0.4);
}

.primary-btn-large:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px 0 rgba(99, 102, 241, 0.6);
}

.feature-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.5rem 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.feature-box:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.2);
}

.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  color: #a855f7;
}

#bottom-popup {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#bottom-popup.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: all;
}

.popup-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.discord-btn {
  background: #5865F2;
  color: white;
}

.discord-btn:hover {
  background: #4752c4;
  transform: scale(1.05);
}

.download-btn {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
}

.download-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5);
}

#download-modal.show {
  opacity: 1;
  pointer-events: all;
}

#download-modal.show .modal-box {
  transform: scale(1);
}

.modal-box {
  background: rgba(10, 10, 15, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 2.5rem;
  max-width: 28rem;
  width: 90%;
  position: relative;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.glow-text {
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
}

.checkbox-wrapper {
  --checkbox-size: 25px;
  --checkbox-color: #a855f7;
  --checkbox-shadow: rgba(168, 85, 247, 0.3);
  --checkbox-border: rgba(168, 85, 247, 0.7);
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  padding: 10px;
  margin-left: -10px;
}

.checkbox-wrapper input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-wrapper .checkmark {
  position: relative;
  width: var(--checkbox-size);
  height: var(--checkbox-size);
  border: 2px solid var(--checkbox-border);
  border-radius: 8px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 15px var(--checkbox-shadow);
  overflow: hidden;
}

.checkbox-wrapper .checkmark::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--checkbox-color), #ec4899);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform: scale(0) rotate(-45deg);
}

.checkbox-wrapper input:checked ~ .checkmark::before {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.checkbox-wrapper .checkmark svg {
  width: 0;
  height: 0;
  color: #1a1a1a;
  z-index: 1;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

.checkbox-wrapper input:checked ~ .checkmark svg {
  width: 18px;
  height: 18px;
  transform: rotate(360deg);
}

.checkbox-wrapper:hover .checkmark {
  border-color: var(--checkbox-color);
  transform: scale(1.1);
  box-shadow: 0 0 20px var(--checkbox-shadow), 0 0 40px var(--checkbox-shadow), inset 0 0 10px var(--checkbox-shadow);
}

.checkbox-wrapper input:checked ~ .checkmark {
  animation: pulse 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 20px var(--checkbox-shadow); }
  50% { transform: scale(0.9); box-shadow: 0 0 30px var(--checkbox-shadow), 0 0 50px var(--checkbox-shadow); }
  100% { transform: scale(1); box-shadow: 0 0 20px var(--checkbox-shadow); }
}

.download-final-btn {
  display: block;
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  text-align: center;
  border-radius: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  pointer-events: auto;
}

.download-final-btn:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.6);
}

.download-final-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.discord-footer-icon {
  color: #4b5563;
  transition: all 0.3s ease;
  width: 14px;
  height: 14px;
}

.discord-footer-icon:hover {
  color: #5865F2;
  transform: scale(1.1);
}

footer {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.3);
  width: 100%;
}