@import url("https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Permanent Marker", cursive;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-size: 8px;
}

/* 首页样式 */
.home-page {
  background: white;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Container layout */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  position: relative;
  padding-top: 50px; /* Reserve space for top LOGO */
}

/* LOGO fixed at top */
.main-logo {
  font-size: 20rem;
  color: black;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  animation: float 3s ease-in-out infinite;
  margin-bottom: auto;
}

/* Button position adjustment */
.hand-drawn-btn {
  padding: 44px 90px;
  font-size: 6rem;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  margin-bottom: 45vh; /* Center the button vertically */
}

.hand-drawn-btn::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 4px solid black;
  border-radius: 20px;
  transform: skew(-2deg, 2deg);
  transition: all 0.3s ease;
}

.hand-drawn-btn:hover {
  color: #127616;
}

.hand-drawn-btn:hover::before {
  border-color: #127616;
  transform: skew(-4deg, 4deg) scale(1.05);
}

/* Second page style */
.second-page {
  min-height: 100vh;
  color: black;
  position: relative;
}

.second-page .main-logo {
  color: white;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.9);
}

.ca-text {
  font-size: 3rem;
  max-width: 60%;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link img {
  width: 80px;
  height: 80px;
  transition: transform 0.3s;
}

.social-link:hover img {
  transform: scale(1.2);
}

.content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.video-container {
  width: 56vw;
  height: 56vw;
  max-width: 560px;
  max-height: 560px;
  border: 5px solid black;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.9);
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.scrolling-text {
  width: 100%;
  overflow: hidden;
  margin: 60px 0;
  padding: 20px 0;
}

.scroll-row {
  white-space: nowrap;
  font-size: 6rem;
  padding: 20px 0;
  animation: scroll 20s linear infinite;
}

.scroll-row:nth-child(2) {
  animation-direction: reverse;
  animation-duration: 25s;
}

.scroll-row:nth-child(3) {
  animation-duration: 30s;
}

.image-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 600px;
}

.image-row {
  display: flex;
  justify-content: center;
  gap: 15px;
}

/* Image container with curved hand-drawn border */
.image-container {
  width: 40vw;
  height: 40vw;
  max-width: 250px;
  max-height: 250px;
  position: relative;
  overflow: visible;
  padding: 15px;
}

.image-container::before,
.image-container::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 4px solid black;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.image-container::before {
  top: -8px;
  left: -8px;
  transform: rotate(-2deg);
}

.image-container::after {
  bottom: -8px;
  right: -8px;
  transform: rotate(2deg);
  border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  border: 4px solid black;
  border-radius: 20% 80% 80% 20% / 20% 20% 80% 80%;
  transition: transform 0.3s ease;
}

/* Hover effects */
.image-container:hover img {
  transform: scale(1.05);
}

.image-container:hover::before {
  transform: rotate(-4deg);
  border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
}

.image-container:hover::after {
  transform: rotate(4deg);
  border-radius: 60% 40% 40% 60% / 60% 60% 40% 40%;
}

.bottom-text {
  font-size: 4rem;
  text-align: center;
  margin: 40px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
}

@keyframes scroll {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

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

@media screen and (max-width: 1200px) {
  html {
    font-size: 7px;
  }

  .image-grid {
    padding: 10px;
  }

  .image-row {
    gap: 15px;
  }

  .video-container {
    max-width: 420px;
    max-height: 420px;
  }
}

@media screen and (max-width: 768px) {
  html {
    font-size: 6px;
  }

  .video-container {
    width: 63vw;
    height: 63vw;
    max-width: 280px;
    max-height: 280px;
  }

  .image-container {
    width: 45vw;
    height: 45vw;
  }
}

/* Video background container */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

/* Background video style */
.video-background video {
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* 音乐播放器样式 */
.music-player {
  position: fixed;
  top: 20vh; /* 改为视窗高度的20% */
  left: 20px; /* 改为靠左 */
  z-index: 1000;
}

.sound-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  transition: transform 0.3s ease;
}

.sound-toggle:hover {
  transform: scale(1.1);
}

.sound-toggle img {
  width: 90px; /* 原来30px的3倍 */
  height: 90px; /* 原来30px的3倍 */
}
