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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 1200px;
}

.input-page {
  background: rgba(248, 248, 255, 0.95);
  border-radius: 16px;
  padding: 40px 32px;
  width: 400px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.main-title {
  font-size: 32px;
  font-weight: 700;
  color: #321a66;
  text-align: center;
  margin: 0;
}

.subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #808080;
  text-align: center;
  margin: 0;
}

.input-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-field {
  position: relative;
}

.input-field input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  transition: all 0.3s ease;
  outline: none;
}

.input-field input:focus {
  border-color: #4d7fff;
  box-shadow: 0 0 0 3px rgba(77, 127, 255, 0.1);
}

.input-field input::placeholder {
  color: #b3b3b3;
}

.input-field input[type="date"] {
  color: #b3b3b3;
}

.input-field input[type="date"]:valid {
  color: #333;
}

.gender-selection {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  align-items: center;
}

.gender-btn {
  padding: 6px 20px;
  border: 1px solid #e6e6e6;
  border-radius: 13px;
  background: white;
  color: #808080;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.gender-btn.active {
  background: #4d7fff;
  border-color: #4d7fff;
  color: white;
}

.gender-btn:hover:not(.active) {
  border-color: #4d7fff;
  color: #4d7fff;
}

.fortune-btn {
  width: 100%;
  height: 50px;
  background: #9933cc;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  margin-top: 8px;
}

.fortune-btn:hover {
  background: #8829b8;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(153, 51, 204, 0.3);
}

.fortune-btn:active {
  transform: translateY(0);
}

/* 반응형 디자인 */
@media (max-width: 480px) {
  .input-page {
    width: 100%;
    max-width: 360px;
    padding: 32px 24px;
  }

  .main-title {
    font-size: 28px;
  }

  .gender-selection {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .gender-btn {
    text-align: center;
  }
}

/* 로딩 애니메이션 */
.fortune-btn.loading {
  position: relative;
  color: transparent;
}

.fortune-btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
