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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #0a0a0a;
  /* Replace background.png with direct URL to doodler image */
  background-image: url("https://hebbkx1anhila5yf.public.blob.vercel-storage.com/doodler-tSXORQPtocIk7AXF6JQe41VCaRsv9D.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
  min-height: 100dvh; /* mobile viewport height fix */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow-x: hidden;
  position: relative;
}

/* dark overlay for background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.7) 0%, rgba(20, 5, 5, 0.75) 100%);
  pointer-events: none;
  z-index: 1;
}

/* animated grid background effect */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(
      0deg,
      transparent 24%,
      rgba(196, 30, 58, 0.08) 25%,
      rgba(196, 30, 58, 0.08) 26%,
      transparent 27%,
      transparent 74%,
      rgba(196, 30, 58, 0.08) 75%,
      rgba(196, 30, 58, 0.08) 76%,
      transparent 77%,
      transparent
    ),
    linear-gradient(
      90deg,
      transparent 24%,
      rgba(196, 30, 58, 0.08) 25%,
      rgba(196, 30, 58, 0.08) 26%,
      transparent 27%,
      transparent 74%,
      rgba(196, 30, 58, 0.08) 75%,
      rgba(196, 30, 58, 0.08) 76%,
      transparent 77%,
      transparent
    );
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 1;
  animation: gridShift 20s linear infinite;
}

@keyframes gridShift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 50px 50px;
  }
}

.container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 500px;
  padding: 20px;
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
  text-align: center;
}

/* beautiful glass-effect profile card */
.profile-card {
  position: relative;
  margin-top: 40px;
  perspective: 1000px;
}

.profile-card-inner {
  background: rgba(30, 15, 15, 0.6);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 107, 107, 0.3);
  border-radius: 20px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 32px rgba(196, 30, 58, 0.2), inset 0 1px 0 rgba(255, 107, 107, 0.2);
  transition: all 0.3s ease;
}

.profile-card-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, transparent 50%, rgba(196, 30, 58, 0.1) 100%);
  border-radius: 20px;
  pointer-events: none;
}

.profile-card-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: radial-gradient(circle at center, rgba(196, 30, 58, 0.3) 0%, transparent 70%);
  border-radius: 20px;
  filter: blur(20px);
  z-index: 1;
  animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.avatar-placeholder {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
  border: 3px solid #ff6b6b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(255, 107, 107, 0.5);
  position: relative;
  z-index: 3;
  animation: float 3s ease-in-out infinite;
}

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

.avatar-placeholder svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.username-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 3;
}

.username-label {
  font-size: 12px;
  font-weight: 500;
  color: #ff6b6b;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.8;
}

.username {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff9999 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
  letter-spacing: 1px;
}

/* enhanced button with multiple glow effects */
.check-button {
  position: relative;
  padding: 16px 50px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
  border: 2px solid #ff6b6b;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(196, 30, 58, 0.4), 0 0 40px rgba(255, 107, 107, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  overflow: hidden;
}

.check-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.check-button:hover::before {
  left: 100%;
}

.check-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff6b6b 0%, #c41e3a 100%);
  box-shadow: 0 0 30px rgba(255, 107, 107, 0.6), 0 0 60px rgba(255, 107, 107, 0.3), inset 0 1px 0
    rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.check-button:active:not(:disabled) {
  transform: translateY(0);
}

.check-button:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.button-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.button-text {
  transition: opacity 0.3s ease;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner.hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* improved status message with glass effect */
.status-message {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #ff9999;
  background: rgba(30, 15, 15, 0.6);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 107, 107, 0.2);
  border-radius: 12px;
  padding: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
  white-space: pre-wrap;
  box-shadow: 0 0 20px rgba(196, 30, 58, 0.15);
  min-width: 250px;
  word-wrap: break-word;
}

@media (max-width: 768px) {
  body {
    /* Fix background on mobile devices */
    background-attachment: scroll;
    background-size: cover;
  }
}

@media (max-width: 480px) {
  .username {
    font-size: 24px;
  }

  .check-button {
    padding: 14px 35px;
    min-width: 240px;
    font-size: 15px;
  }

  .content {
    gap: 40px;
  }

  .profile-card-inner {
    padding: 25px;
  }

  .avatar-placeholder {
    width: 70px;
    height: 70px;
  }

  .username-label {
    font-size: 11px;
  }

  body {
    /* Optimize for mobile viewport */
    background-size: cover;
    background-position: center;
  }
}
