:root {
  --bg-color: #0f0c29;
  --card-bg: rgba(255, 255, 255, 0.1);
  --primary: #ff00cc;
  --secondary: #333399;
  --accent: #00ffcc;
  --text: #ffffff;
  --font-heading: "Bangers", cursive;
  --font-body: "Inter", sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

.container {
  text-align: center;
  width: 100%;
  max-width: 600px;
  padding: 2rem;
  perspective: 1000px;
}

header h1 {
  font-family: var(--font-heading);
  font-size: 4rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
  animation: glow 2s ease-in-out infinite alternate;
}

.wtf {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
}

.subtitle {
  font-size: 1.2rem;
  opacity: 0.8;
  margin-bottom: 2rem;
}

.question-box {
  margin-bottom: 2rem;
}

input[type="text"] {
  width: 100%;
  padding: 1rem;
  font-size: 1.2rem;
  border: 2px solid var(--card-bg);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  outline: none;
  transition: all 0.3s ease;
  text-align: center;
}

input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
}

/* Card Flip Animation */
.card-container {
  width: 100%;
  height: 400px;
  margin-bottom: 2rem;
  position: relative;
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.card.flipped {
  transform: rotateY(180deg);
}

.front,
.back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.back {
  transform: rotateY(180deg);
  background: rgba(0, 0, 0, 0.6);
}

.placeholder-content .icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

.placeholder-content p {
  font-size: 1.5rem;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.5);
}

#answerText {
  font-family: var(--font-heading);
  font-size: 5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  z-index: 2;
  text-shadow: 2px 2px 0 #000;
}

.image-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

#resultImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  border-radius: 20px;
}

/* Button */
.cta-button {
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  border: none;
  padding: 1rem 3rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 10px 20px rgba(255, 0, 204, 0.3);
}

.cta-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 30px rgba(255, 0, 204, 0.5);
}

.cta-button:active {
  transform: translateY(1px);
}

.cta-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  filter: grayscale(1);
}

footer {
  margin-top: 3rem;
  font-size: 0.8rem;
  opacity: 0.5;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

/* Animations */
@keyframes glow {
  from {
    text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
  }
  to {
    text-shadow: 0 0 20px var(--accent), 0 0 30px var(--accent);
  }
}

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

/* Shake animation for error */
.shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }
  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }
  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }
  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}
