/* 기본 스타일 및 리셋 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', 'Noto Sans KR', sans-serif;
}

body {
  background: linear-gradient(135deg, #FF9D6C, #BB4E75);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  color: #333;
}

/* 헤더 부분 */
.header {
  text-align: center;
  margin-bottom: 30px;
  color: white;
  width: 100%;
  padding-top: 20px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
}

.back-button {
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  padding: 8px 15px;
}

.back-button:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

.header-buttons {
  display: flex;
  align-items: center;
}

.language-button {
  display: flex;
  align-items: center;
  color: white;
  background-color: rgba(0, 0, 0, 0.2);
  border: none;
  border-radius: 20px;
  padding: 8px 15px;
  cursor: pointer;
  margin-right: 10px;
}

.language-button:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

.copy-url-button {
  display: flex;
  align-items: center;
  color: white;
  background-color: rgba(0, 0, 0, 0.2);
  border: none;
  border-radius: 20px;
  padding: 8px 15px;
  cursor: pointer;
}

.copy-url-button:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

.language-dropdown {
  display: none;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.language-dropdown.active {
  display: block;
}

.language-option {
  padding: 10px 15px;
  cursor: pointer;
  color: #333;
  font-size: 14px;
}

.language-option:hover {
  background-color: #f5f5f5;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* 게임 영역 */
.game-container {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  position: relative;
}

/* 카드 스타일 */
.card-container {
  perspective: 1000px;
  width: 100%;
  aspect-ratio: 3/4;
  margin-bottom: 20px;
}

#card {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.5s ease-out;
}

.card-text {
  width: 100%;
  position: absolute;
  text-align: center;
  padding: 10px;
}

.top-text {
  top: 10px;
  transform: rotate(180deg);
}
.bottom-text {
  bottom: 10px;
}


.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card-front {
  background: linear-gradient(45deg, #6b5de6, #8857e9);
  color: white;
  font-size: 2rem;
  transform: rotateY(0deg);
}

.card-back {
  background: linear-gradient(45deg, #ff7e5f, #feb47b);
  color: white;
  font-size: 2.2rem;
  transform: rotateY(180deg);
  padding: 10px;
  text-align: center;
  position: relative; /* 뒷면에 카운트다운 위치 설정을 위해 추가 */
}

/* 카운트다운 스타일 */
#countdown-container {
  width: 100%;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 10px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 10;
}

#countdown {
  font-size: 3.5rem;
  color: #ff4d4d;
  font-weight: bold;
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
}


/* 지시사항 */
.instructions {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  padding: 20px;
  margin-top: 30px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.instructions h3 {
  margin-bottom: 10px;
  color: #6b5de6;
}

.instructions ol {
  text-align: left;
  padding-left: 25px;
  margin-top: 10px;
}

.instructions li {
  margin-bottom: 8px;
}

/* 푸터 스타일 */
footer {
  width: 100%;
  max-width: 1200px;
  margin-top: 50px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  color: white;
  text-align: center;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.social-links a {
  color: white;
  font-size: 1.2rem;
  margin-left: 15px;
  transition: color 0.3s;
}

.social-links a:hover {
  color: #f5f5f5;
}

.footer-menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-menu a {
  color: white;
  text-decoration: none;
  margin: 0 15px;
  font-size: 0.9rem;
}

.footer-menu a:hover {
  text-decoration: underline;
}

.copyright-container {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* 애니메이션 */
@keyframes float {
  0% { transform: translateY(0px) rotateY(0deg); }
  50% { transform: translateY(-10px) rotateY(0deg); }
  100% { transform: translateY(0px) rotateY(0deg); }
}

.floating {
  animation: float 3s ease-in-out infinite;
}

/* 회전 애니메이션이 적용될 때 float 애니메이션 제거 */
.rotating {
  animation: none !important;
}

/* 반응형 스타일 */
@media (max-width: 480px) {
  .header h1 {
      font-size: 2rem;
  }
  
  .header p {
      font-size: 1rem;
  }
  
  .card-front, .card-back {
      font-size: 1.8rem;
  }
  
  #countdown {
      font-size: 3.5rem;
  }
  
  .game-container {
      padding: 20px;
  }

  .header-top {
    flex-direction: column;
    gap: 10px;
  }

  .footer-content {
    flex-direction: column;
    gap: 15px;
  }

  .footer-menu {
    flex-direction: column;
    gap: 10px;
  }

  .footer-menu a {
    margin: 5px 0;
  }
}

/* URL 복사 알림 스타일 */
.url-copy-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 20px;
  border-radius: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  font-size: 14px;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.url-copy-notification.error {
  background-color: rgba(255, 50, 50, 0.9);
}

/* 버블 배경 애니메이션 */
.bubbles {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  top: 0;
  left: 0;
}

.bubble {
  position: absolute;
  bottom: -100px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  opacity: 0.5;
  animation: rise 8s infinite ease-in;
}

.bubble:nth-child(1) {
  width: 40px;
  height: 40px;
  left: 10%;
  animation-duration: 8s;
}

.bubble:nth-child(2) {
  width: 20px;
  height: 20px;
  left: 20%;
  animation-duration: 5s;
  animation-delay: 1s;
}

.bubble:nth-child(3) {
  width: 50px;
  height: 50px;
  left: 35%;
  animation-duration: 7s;
  animation-delay: 2s;
}

.bubble:nth-child(4) {
  width: 80px;
  height: 80px;
  left: 50%;
  animation-duration: 11s;
  animation-delay: 0s;
}

.bubble:nth-child(5) {
  width: 35px;
  height: 35px;
  left: 55%;
  animation-duration: 6s;
  animation-delay: 1s;
}

.bubble:nth-child(6) {
  width: 45px;
  height: 45px;
  left: 65%;
  animation-duration: 8s;
  animation-delay: 3s;
}

.bubble:nth-child(7) {
  width: 25px;
  height: 25px;
  left: 75%;
  animation-duration: 7s;
  animation-delay: 2s;
}

.bubble:nth-child(8) {
  width: 80px;
  height: 80px;
  left: 80%;
  animation-duration: 10s;
  animation-delay: 1s;
}

@keyframes rise {
  0% {
      bottom: -100px;
      transform: translateX(0);
  }
  50% {
      transform: translate(100px, -500px);
  }
  100% {
      bottom: 1080px;
      transform: translateX(-200px);
  }
}

/* 아이콘 스타일 */
.icon {
  font-size: 2rem;
  margin-right: 10px;
  vertical-align: middle;
}