html {
  font-family: 'Apple SD Gothic Neo', Roboto, 'Noto Sans KR', NanumGothic,
    'Malgun Gothic', sans-serif;
  color: #333;
  line-height: 1.2;
  word-wrap: break-word;
}
body {
  -webkit-font-smoothing: antialiased;
}
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
div,
span,
article,
section,
header,
footer,
aside,
p,
ul,
li,
fieldset,
legend,
label,
a,
nav,
form {
  box-sizing: border-box;
  /* box-sizing: content-box */
}
ol,
ul,
li {
  list-style: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
img {
  max-width: 100%;
  height: auto;
  border: 0;
}
a {
  display: inline-block;
}
button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* body background */
body {
  background: linear-gradient(
    45deg,
    #ff9a9e 0%,
    #fecfef 25%,
    #fecfef 50%,
    #fad0c4 100%
  );
  padding: 20px 0;
}

/* fortune-page-container */
.fortune-page-container {
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  padding: 10px 20px 20px 20px;
  width: 100vw;
  max-width: 350px;
  height: calc(100vh - 40px);
  min-height: max(600px, calc(100vh - 40px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
}

.fortune-page-container::before {
  content: '';
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #ff9a9e, #fad0c4, #a8edea, #fed6e3);
  border-radius: 25px;
  animation: rainbow-border 3s linear infinite;
  z-index: -1;
}

@keyframes rainbow-border {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}

/* emoji */
.float-emoji {
  position: fixed;
  font-size: 1.5rem;
  animation: float-emoji 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.float-emoji:nth-child(1) {
  top: 15%;
  left: 8%;
  animation-delay: 0s;
}

.float-emoji:nth-child(2) {
  top: 25%;
  right: 12%;
  animation-delay: 1s;
}

.float-emoji:nth-child(3) {
  bottom: 35%;
  left: 10%;
  animation-delay: 2s;
}

.float-emoji:nth-child(4) {
  bottom: 20%;
  right: 8%;
  animation-delay: 3s;
}

.float-emoji:nth-child(5) {
  top: 60%;
  right: 15%;
  animation-delay: 1.5s;
}

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

/*logo*/
.logo {
  margin-bottom: 15px;
  text-align: center;
}

.logo h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  background: rgba(75, 0, 130, 0.4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.logo p {
  color: #666;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.7);
  padding: 6px 0;
  border-radius: 10px;
}

.logo .logo-compact {
  font-size: 0.7rem;
}

/*form*/
.form-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 100%;
}

.form-option-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
}

.form-option-content {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.form-option-content-item {
  width: 100%;
}

.form-option-content-item input[type='radio'],
.form-option-content-item input[type='checkbox'] {
  display: none;
}

.form-option-btn {
  display: block;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  padding: 8px 0;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 400;
  font-size: 0.75rem;
  color: #666;
}

/* error */
.wiggle {
  animation: wiggle 0.3s ease-in-out;
}

@keyframes wiggle {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

.jump {
  animation: jump 0.3s ease-in-out;
}

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

.error-message {
  color: #fff;
  font-size: 0.75em;
  font-weight: 400;
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  padding: 6px 0;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 10px;
  animation: slideDown 0.3s ease-out;
}

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

.hidden {
  display: none !important;
}

/*다음 단계*/
.next-btn-container {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.next-btn {
  width: 125px;
  background: linear-gradient(135deg, #e17055, #74b9ff, #a29bfe, #fd79a8);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 0;
  font-size: 0.8em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 0 #d63031;
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
}

.next-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100px;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.7),
    transparent
  );
  transition: left 0.3s;
}

.next-btn:hover::before {
  left: 100%;
}

.back-btn {
  position: absolute; /*parents: fortune-page-container*/
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 300;
  color: #666;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  font-weight: 400;
}
