/* === Pet Name Generator — SUPER COOL & ATTENTION-GRABBING === */

.petname {
  --bg1: #0a0a0f;
  --bg2: #1a1a2e;
  --bg3: #16213e;
  --glass: rgba(255, 255, 255, 0.08);
  --ink: #ffffff;
  --muted: #a0a0a0;

  /* NEON COLORS */
  --neon-pink: #ff0080;
  --neon-blue: #00ffff;
  --neon-purple: #8000ff;
  --neon-green: #00ff80;
  --neon-yellow: #ffff00;
  --neon-orange: #ff8000;

  /* ENHANCED GREEN COLORS */
  --green-600: #059669;
  --green-500: #10b981;
  --green-400: #34d399;
  --green-300: #6ee7b7;

  --ring: rgba(255, 0, 128, 0.6);
  --border: rgba(255, 255, 255, 0.2);
  --shadow: rgba(0, 0, 0, 0.8);
}

/* ANIMATED BACKGROUND */
.petname {
  color: var(--ink);
  background: radial-gradient(
      circle at 20% 80%,
      rgba(255, 0, 128, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(0, 255, 255, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(128, 0, 255, 0.1) 0%,
      transparent 50%
    ),
    linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 50%, var(--bg3) 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
}

/* FLOATING ORBS */
.bg-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  animation: orbFloat 15s ease-in-out infinite;
}

.orb-1 {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255, 0, 128, 0.3), transparent);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.3), transparent);
  top: 60%;
  right: 15%;
  animation-delay: 5s;
}

.orb-3 {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(128, 0, 255, 0.3), transparent);
  bottom: 20%;
  left: 20%;
  animation-delay: 10s;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

/* FLOATING PARTICLES EFFECT */
.petname::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      2px 2px at 20px 30px,
      var(--neon-pink),
      transparent
    ),
    radial-gradient(2px 2px at 40px 70px, var(--neon-blue), transparent),
    radial-gradient(1px 1px at 90px 40px, var(--neon-purple), transparent),
    radial-gradient(1px 1px at 130px 80px, var(--neon-green), transparent),
    radial-gradient(2px 2px at 160px 30px, var(--neon-yellow), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: float 20s linear infinite;
  opacity: 0.3;
  pointer-events: none;
  z-index: 1;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
  }
}

/* HEADER WITH COOL TITLE */
.petname header.container {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-bottom: 2rem;
}

.petname .title-container {
  position: relative;
  margin-bottom: 1rem;
}

.petname header.container h1 {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -2px;
  background: linear-gradient(
    45deg,
    var(--neon-pink) 0%,
    var(--neon-purple) 25%,
    var(--neon-blue) 50%,
    var(--neon-green) 75%,
    var(--neon-yellow) 100%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 3s ease infinite;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
  margin-bottom: 0.5rem;
  font-family: "Orbitron", monospace;
}

.petname .title-decoration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 2rem;
  pointer-events: none;
}

.petname .sparkle {
  font-size: 1.5rem;
  animation: sparkleFloat 2s ease-in-out infinite;
  opacity: 0.8;
}

.petname .sparkle:nth-child(2) {
  animation-delay: 0.5s;
}

.petname .sparkle:nth-child(3) {
  animation-delay: 1s;
}

@keyframes sparkleFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(180deg);
  }
}

.petname .subtitle-glow {
  color: var(--neon-blue);
  font-size: 1.1rem;
  margin-top: 1rem;
  text-shadow: 0 0 15px var(--neon-blue);
  animation: subtitlePulse 2s ease-in-out infinite;
}

@keyframes subtitlePulse {
  0%,
  100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.petname header.container .muted {
  color: var(--muted);
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow: 0 0 5px var(--muted);
  }
  to {
    text-shadow: 0 0 20px var(--muted), 0 0 30px var(--muted);
  }
}

/* MAIN CARD WITH GLASSMORPHISM */
.petname .card {
  position: relative;
  z-index: 10;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border: 1px solid var(--border);
  backdrop-filter: blur(25px);
  border-radius: 25px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 2.5rem;
  animation: cardFloat 6s ease-in-out infinite;
}

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

/* CARD HEADER */
.petname .card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.petname .card-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--neon-yellow);
  text-shadow: 0 0 15px var(--neon-yellow);
  margin: 0;
  font-family: "Orbitron", monospace;
}

/* CONTROLS WITH NEON EFFECTS */
.petname .controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.petname .control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.petname .control-group label {
  font-weight: 600;
  color: var(--neon-blue);
  text-shadow: 0 0 10px var(--neon-blue);
  font-size: 1.1rem;
}

.petname .button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.petname select,
.petname button {
  appearance: none;
  padding: 1rem 1.5rem;
  border-radius: 15px;
  border: 2px solid transparent;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  color: var(--ink);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  min-height: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.petname .btn-icon {
  font-size: 1.2rem;
}

.petname .btn-text {
  font-weight: 600;
}

.petname select::before,
.petname 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;
}

.petname select:hover::before,
.petname button:hover::before {
  left: 100%;
}

.petname select {
  padding-right: 3rem;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23ff0080' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 8 12 14 18 8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px 16px;
}

.petname #btn-generate {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  border-color: var(--neon-pink);
  box-shadow: 0 0 20px rgba(255, 0, 128, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.petname #btn-generate:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(255, 0, 128, 0.5),
    0 0 40px rgba(255, 0, 128, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.petname #btn-copy {
  background: linear-gradient(
    135deg,
    var(--green-600),
    var(--green-500),
    var(--green-400)
  );
  border-color: var(--green-500);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.petname #btn-copy:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.5),
    0 0 40px rgba(16, 185, 129, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.petname select:hover {
  transform: translateY(-2px);
  border-color: var(--neon-yellow);
  box-shadow: 0 5px 20px rgba(255, 255, 0, 0.3);
}

.petname :focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--ring), 0 0 20px var(--ring);
}

/* OUTPUT CONTAINER */
.petname .output-container {
  position: relative;
  margin-bottom: 1.5rem;
}

.petname .output-decoration {
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
  z-index: 2;
}

.petname .decoration-star {
  font-size: 1.2rem;
  animation: starTwinkle 1.5s ease-in-out infinite;
  opacity: 0.7;
}

.petname .decoration-star:nth-child(2) {
  animation-delay: 0.75s;
}

@keyframes starTwinkle {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* OUTPUT WITH SPECTACULAR STYLING */
.petname #name.excuse-box {
  background: linear-gradient(
    135deg,
    rgba(255, 0, 128, 0.1) 0%,
    rgba(0, 255, 255, 0.1) 50%,
    rgba(128, 0, 255, 0.1) 100%
  );
  border: 2px solid transparent;
  border-radius: 20px;
  font-size: clamp(1.5rem, 2rem + 2vw, 3rem);
  line-height: 1.3;
  padding: 2rem;
  position: relative;
  text-align: center;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  animation: nameGlow 3s ease-in-out infinite alternate;
  overflow: hidden;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.petname .placeholder {
  opacity: 0.7;
  font-style: italic;
}

.petname #name.excuse-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes nameGlow {
  0% {
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.3), 0 0 40px rgba(0, 255, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  100% {
    box-shadow: 0 0 30px rgba(255, 0, 128, 0.5), 0 0 60px rgba(0, 255, 255, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

.petname #name.excuse-box::after {
  content: "✨🌟💫";
  position: absolute;
  right: 1rem;
  top: 0.5rem;
  font-size: 1.5rem;
  animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* METADATA STYLING */
.petname #meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: fadeInUp 0.5s ease-out;
}

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

/* FUN FACTS */
.petname .fun-facts {
  margin-top: 2rem;
  text-align: center;
}

.petname .fact {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.5rem 0;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.petname .fact:hover {
  opacity: 1;
  color: var(--green-400);
  text-shadow: 0 0 10px var(--green-400);
}

/* FOOTER ENHANCEMENT */
.petname .footer {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.petname .footer a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.petname .footer a:hover {
  color: var(--neon-yellow);
  border-color: var(--neon-yellow);
  box-shadow: 0 0 15px rgba(255, 255, 0, 0.3);
  text-shadow: 0 0 10px var(--neon-yellow);
}

.petname .footer-decoration {
  display: flex;
  gap: 1rem;
  opacity: 0.6;
}

.petname .footer-decoration span {
  animation: footerSparkle 2s ease-in-out infinite;
}

.petname .footer-decoration span:nth-child(2) {
  animation-delay: 0.5s;
}

.petname .footer-decoration span:nth-child(3) {
  animation-delay: 1s;
}

@keyframes footerSparkle {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .petname header.container h1 {
    font-size: 2.5rem;
  }

  .petname .controls {
    flex-direction: column;
    gap: 0.8rem;
  }

  .petname select,
  .petname button {
    width: 100%;
    max-width: 300px;
  }

  .petname #name.excuse-box {
    font-size: 1.8rem;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .petname header.container h1 {
    font-size: 2rem;
  }

  .petname .card {
    padding: 1.5rem;
    margin: 1rem;
  }

  .petname #name.excuse-box {
    font-size: 1.5rem;
    padding: 1rem;
  }
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  .petname * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* DARK MODE ENHANCEMENT */
@media (prefers-color-scheme: dark) {
  .petname {
    --bg1: #000000;
    --bg2: #0a0a0a;
    --bg3: #1a1a1a;
  }
}
