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

/* Body */
body {
  font-family: "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  color: white;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Header */
header {
  width: 100%;
  padding: 25px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

header h1 {
  font-size: 2.4rem;
  margin-bottom: 8px;
}

header p {
  opacity: 0.9;
}

/* Search Area */
.search-container {
  margin-top: 30px;
  position: relative;
  display: flex;
  gap: 10px;
  display: inline-block;
}

#searchBox {
  padding: 14px 18px;
  width: 280px;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  outline: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

#searchBox::placeholder {
  color: #ddd;
}

#searchBtn {
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#searchBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 198, 255, 0.4);
}

/* Suggestions Box */
#suggestions {
  position: absolute;
  top: 55px;
  width: 100%;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 10px;
  overflow: hidden;
  z-index: 10;
}

.suggestion-item {
  padding: 10px 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.suggestion-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Result Area */
#result {
  margin-top: 40px;
  max-width: 800px;
  width: 90%;
}

#clearBtn {
  position: absolute;
  left: 260px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  ;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}

#clearBtn:hover {
  color: #ff6b6b;
  transform: translateY(-50%) scale(1.2);
}

/* Card */
.card {
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  padding: 25px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.5s ease;
}

.card img {
  width: 100%;
  border-radius: 15px;
  margin-bottom: 15px;
  transition: transform 0.4s ease;
}

.card img:hover {
  transform: scale(1.05);
}

.card h2 {
  color: #00e5ff;
  margin-bottom: 10px;
}

.card p {
  line-height: 1.6;
  color: #f1f1f1;
}

/* Animations */
@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Human Container */
.human-container {
  margin-top: 5px;
  perspective: 1200px;
  display: flex;
  justify-content: center;
  position: relative;
  touch-action: none;
}

/* Floor Shadow */
.shadow {
  position: absolute;
  width: 220px;
  height: 60px;
  bottom: -25px;
  background: radial-gradient(ellipse at center,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(0, 0, 0, 0.2) 40%,
      transparent 70%);
  filter: blur(12px);
  transform: rotateX(75deg);
  animation: shadowPulse 4s ease-in-out infinite;
}

/* Human Body Root */
.human {
  position: relative;
  transform-style: preserve-3d;
  transition: filter 0.3s ease;
}

/* Skin Tone */
:root {
  --skin-light: #f2c9a0;
  --skin-mid: #e0a87a;
  --skin-dark: #c68642;
}

/* Head */
.head {
  width: 60px;
  height: 70px;
  background: radial-gradient(circle at 30% 30%,
      var(--skin-light),
      var(--skin-mid),
      var(--skin-dark));
  border-radius: 50% 50% 45% 45%;
  margin: auto;
  box-shadow:
    inset -4px -6px 10px rgba(0, 0, 0, 0.2),
    0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Neck */
.neck {
  width: 22px;
  height: 18px;
  background: linear-gradient(to bottom,
      var(--skin-light),
      var(--skin-dark));
  margin: auto;
  border-radius: 10px;
}

/* Torso */
.torso {
  width: 110px;
  height: 150px;
  background: linear-gradient(to right,
      var(--skin-dark),
      var(--skin-mid),
      var(--skin-dark));
  border-radius: 40px;
  margin: auto;
  box-shadow:
    inset 0 -15px 25px rgba(0, 0, 0, 0.25),
    0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Shoulder Joints */
.torso::before,
.torso::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  background: radial-gradient(circle,
      var(--skin-light),
      var(--skin-dark));
  border-radius: 50%;
  top: 20px;
}

.torso::before {
  left: -18px;
}

.torso::after {
  right: -18px;
}

/* Arms */
.arm {
  width: 26px;
  height: 120px;
  background: linear-gradient(to bottom,
      var(--skin-light),
      var(--skin-dark));
  position: absolute;
  top: 85px;
  border-radius: 20px;
  box-shadow: inset -4px -8px 12px rgba(0, 0, 0, 0.2);
}

.arm.left {
  left: -45px;
  transform-origin: top center;
}

.arm.right {
  right: -45px;
  transform-origin: top center;
}

/* Hip Joint */
.leg-joint {
  position: absolute;
  top: 230px;
  width: 100%;
  display: flex;
  justify-content: space-around;
}

.leg-joint span {
  width: 28px;
  height: 28px;
  background: radial-gradient(circle,
      var(--skin-light),
      var(--skin-dark));
  border-radius: 50%;
}

/* Legs */
.leg {
  width: 30px;
  height: 140px;
  background: linear-gradient(to bottom,
      var(--skin-mid),
      var(--skin-dark));
  position: absolute;
  top: 245px;
  border-radius: 20px;
  box-shadow: inset -4px -10px 14px rgba(0, 0, 0, 0.25);
}

.leg.left {
  left: 25px;
}

.leg.right {
  right: 25px;
}

/* Interaction Glow */
.human-container:hover .human {
  filter: drop-shadow(0 0 20px rgba(255, 200, 150, 0.6));
}

/* Shadow Animation */
@keyframes shadowPulse {

  0%,
  100% {
    transform: rotateX(75deg) scale(1);
    opacity: 0.6;
  }

  50% {
    transform: rotateX(75deg) scale(1.15);
    opacity: 0.85;
  }
}

#viewer>div {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#viewer>div[style*="display: none"] {
  opacity: 0;
  transform: scale(0.95);
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

#imageOverlay {
  transition: opacity 0.3s ease;
}


/* Footer */
footer {
  margin-top: auto;
  padding: 20px;
  opacity: 0.7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

footer h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

footer p {
  text-align: center;
}