* {
  padding: 0;
  margin: 0;
  border: none;
  text-decoration: none;
  font-family: "Fredoka", sans-serif;
  letter-spacing: 1px;
  box-sizing: border-box; /* Ensures consistent layout calculation */
}

html {
  height: 100%;
}
body, html {
  overflow-x: hidden;
}
body {
  background-color: #030408;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  position: relative; /* Positioning context for the new background */
}

body::before {
    content: '';
    position: fixed; 
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(2px 2px at 20px 30px, #00b4b8, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(0, 225, 225, 0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #00b4b8, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(0, 225, 225, 0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #00b4b8, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    opacity: 0.6;
    animation: particle-flow 20s linear infinite;
    z-index: -1;
}

@keyframes particle-flow {
    0% { 
        background-position: 0px 0px, 0px 0px, 0px 0px, 0px 0px, 0px 0px;
    }
    100% { 
        background-position: 200px 100px, -200px 100px, 100px -100px, -100px -100px, 200px -100px;
    }
}

#hero {
  background: transparent; /* Make hero background transparent to see body */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: auto; /* Let content determine height */
  min-height: 100vh; /* Ensure it's at least full screen */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-grow: 1; /* Allow hero to grow and push footer down */
  position: relative; /* Needed for pseudo-element positioning */
}

#hero::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.1);
  z-index: 0;
}

.hero-section-container {
  background-color: rgba(255, 255, 255, 0.1);
  height: 85vh;
  width: 85%;
  border-radius: 30px;
  border: 2px solid rgba(211, 211, 211, 0.2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  position: relative;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 15px;
  margin: 10px;
  z-index: 2000; /* Ensure header is on top */
  position: relative; /* Needed for z-index to work */
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: white;
}

.logo span {
  color: rgb(0, 225, 225);
}

nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

nav a {
  color: white;
  font-size: 18px;
  font-weight: 500;
  position: relative;
  display:flex;
  justify-content: center;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -10px;
  height: 2px;
  width: 80%;
  box-shadow: 0 0 5px white;
  transform: scaleX(0) translateY(-100%);
  background-color: white;
  transition: 0.3s;
}
nav a:hover::after {
  transform: scaleX(0.5) translateY(0);

}

.active {
  color: rgb(0, 225, 225);
}

.active::after {
  background-color: rgb(0, 225, 225);
}

header button {
  font-size: 18px;
  font-weight: bold;
  padding: 7px 25px;
  background-color: transparent;
  border: 1px solid white;
  border-radius: 20px;
  color: white;
  transition: 0.3s;
  cursor: pointer;
}

header button:hover {
  background-color: rgb(0, 225, 225);
  color: rgba(0, 0, 0, 0.6);
  border-color: rgb(0, 225, 225);
}

/* Hero Content */
.hero-content {
  padding: 15px 25px 0 25px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  height: calc(100% - 80px); /* Adjust height to account for header */
  position: relative; /* Establish stacking context */
  z-index: 1; /* Lower than header */
}

.page-home .hero-content {
    margin-top: -75px; /* Move content up on PC */
    gap: 40px; 
    padding-top: 120px; /* Pushed down from -80px margin to 120px padding (200px total move) */
}

/* Right Section */
.hero-content img {
  width: 90%;
  filter: drop-shadow(0 0 10px rgb(0, 225, 225))
    drop-shadow(0 0 20px rgb(0, 225, 225))
    drop-shadow(0 0 40px rgb(0, 225, 225))
    drop-shadow(0 0 100px rgb(0, 225, 225));
}
.right-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Sphere animation */
.sphere-animation {
  width: 300px;
  height: 300px;
  position: relative;
  -webkit-filter: drop-shadow(0 0 10px rgb(0, 225, 225))
    drop-shadow(0 0 20px rgb(0, 225, 225))
    drop-shadow(0 0 40px rgb(0, 225, 225));
  filter: drop-shadow(0 0 10px rgb(0, 225, 225))
    drop-shadow(0 0 20px rgb(0, 225, 225))
    drop-shadow(0 0 40px rgb(0, 225, 225));
  /* Safari兼容性处理*/
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.sphere {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #5dfcff, #00b4b8 50%, #032b43 100%);
  position: relative;
  overflow: hidden;
  -webkit-animation: rotateSphere 20s linear infinite;
  animation: rotateSphere 20s linear infinite;
  /* Safari兼容性处理*/
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  /* 添加额外的光效*/
  box-shadow: 
    0 0 20px rgba(0, 225, 225, 0.8),
    0 0 40px rgba(0, 225, 225, 0.4),
    0 0 60px rgba(0, 225, 225, 0.2),
    inset 0 0 20px rgba(0, 225, 225, 0.3);
}

.sphere::before,
.sphere::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(0, 225, 225, 0.5);
  -webkit-animation: rotateRings 8s linear infinite;
  animation: rotateRings 8s linear infinite;
  /* Safari兼容性处理*/
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.sphere::before {
  width: 110%;
  height: 110%;
  top: -5%;
  left: -5%;
  -webkit-transform-origin: center;
  transform-origin: center;
  opacity: 0.6;
  /* 添加额外的光效*/
  box-shadow: 0 0 15px rgba(0, 225, 225, 0.6);
}

.sphere::after {
  width: 130%;
  height: 130%;
  top: -15%;
  left: -15%;
  -webkit-transform-origin: center;
  transform-origin: center;
  opacity: 0.3;
  -webkit-animation-direction: reverse;
  animation-direction: reverse;
  -webkit-animation-duration: 6s;
  animation-duration: 6s;
  /* 添加额外的光效*/
  box-shadow: 0 0 25px rgba(0, 225, 225, 0.4);
}

@-webkit-keyframes rotateSphere {
  from { -webkit-transform: rotate(0deg); }
  to { -webkit-transform: rotate(360deg); }
}

@keyframes rotateSphere {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@-webkit-keyframes rotateRings {
  from { -webkit-transform: rotate(0deg) scale(1); }
  50% { -webkit-transform: rotate(180deg) scale(1.05); }
  to { -webkit-transform: rotate(360deg) scale(1); }
}

@keyframes rotateRings {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.05); }
  to { transform: rotate(360deg) scale(1); }
}

/* Right Section Animation */
@-webkit-keyframes rotatePlanet {
  from{
    -webkit-transform: rotate(0deg);
  }
  to{
    -webkit-transform: rotate(360deg);
  }
}

@keyframes rotatePlanet {
  from{
    transform: rotate(0deg);
  }
  to{
    transform: rotate(360deg);
  }
}

.image-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-animation: rotatePlanet 120s linear infinite;
  animation: rotatePlanet 120s linear infinite;
  /* Safari兼容性处理*/
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* left Section */
.left-section {
  display:flex;
  align-items: center;
  z-index: 1;
}

.left-section h3 {
  font-size: 4rem;
  letter-spacing: 20px;
  color: white;
}

.left-section h1 {
  font-size: 2.2rem !important; /* 与about页一致，防止移动端被切割 */
  font-weight: 800;
  color: white;
  margin-bottom: 18px !important;
  word-break: break-all !important;
}

@media (min-width: 769px) {
  .page-about .left-section h1,
  .page-contacts .left-section h1 {
    font-size: 4rem !important;
    white-space: nowrap;
  }
}

@media (min-width: 769px) {
  .left-section h1 {
    font-size: 11rem;
    margin: -20px 0 0 0;
  }
}

.left-section .about-title {
  font-size: 8rem; /* Smaller size for About page */
}

h1 .color-change {
  color: rgb(0, 225, 225);
}

.left-section p {
  font-size: 18px;
  letter-spacing: 1px;
  line-height: 1.5;
  color: rgb(230, 230, 230);
  width: 90%;
  margin-bottom: 20px; /* Reduced margin */
}

p span {
  color: white;
  font-weight: 600;
}

.big-cta-btn {
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 2px;
  width: 250px;
  height: 55px;
  border-radius: 50px;
  background-color: rgb(0, 225, 225);
  color: rgba(0, 0, 0, 0.699);
  text-transform: uppercase;
  transition: all 0.3s;
}

.big-cta-btn:hover{
  letter-spacing: 5px;
  background-color: white;
}

.social-icons {
  position: absolute;
  bottom: 25px;
  left: 0;
  right: 0;
  color: white;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-icons i {
  font-size: 18px;
  width: 10px;
  height: 10px;
  border: 1px solid white;
  padding: 15px;
  border-radius: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
}
.social-icons i:hover {
  color: rgb(0, 225, 225);
  border-color: rgb(0, 225, 225);
  transform: rotate(360deg) scale(1.1);
}

/* Hero Section Animation */
@keyframes sideInLeft {
  from{
    transform: translateX(-100%);
    opacity: 0;
  }
  to{
    transform: translateX(0%);
    opacity: 1;
  }
}

@keyframes sideInRight {
  from{
    transform: translateX(100%);
    opacity: 0;
  }
  to{
    transform: translateX(0%);
    opacity: 1;
  }
}

@keyframes topIn {
  from{
    transform: translateY(-100%);
    opacity: 0;
  }
  to{
    transform: translateY(0%);
    opacity: 1;
  }
}

@keyframes bottomIn {
  from{
    transform: translateY(100%);
    opacity: 0;
  }
  to{
    transform: translateY(0%);
    opacity: 1;
  }
}

/* Appling Animation */
 header {
  animation: topIn 1.2s ease-out forwards;
  opacity: 0;
  animation-delay: 0.2s;
 }

 h3 {
  animation: sideInLeft 1s ease-out forwards;
  opacity: 0;
 }
 
 h1 {
  animation: sideInLeft 1s ease-out forwards;
  opacity: 0;
  animation-delay: 0.4s;
 }

 p {
  animation: sideInLeft 1s ease-out forwards;
  opacity: 0;
  animation-delay: 0.6s;
 }

 .big-cta-btn {
  animation: sideInLeft 1s ease-out forwards;
  opacity: 0;
  animation-delay: 0.8s;
 }

 .social-icons {
  animation: bottomIn 1s ease-out forwards;
  opacity: 0;
  animation-delay: 0.2s;
 }

 .right-section img {
  animation: sideInRight 1s ease-out forwards;
  opacity: 0;
  animation-delay: 0.2s;
 }

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0; /* Prevent footer from shrinking */
}

.footer-content {
  background-color: transparent;
}

.footer-content p {
  color: rgba(255, 255, 255, 0.5); /* Increased visibility */
  font-size: 14px;
  margin: 0;
}

/* Contact Info Styles */
.contact-info {
  margin-top: 30px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.contact-item:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(0, 225, 225, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 225, 225, 0.2);
}

.contact-item i {
  font-size: 24px;
  color: rgb(0, 225, 225);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 225, 225, 0.1);
  border-radius: 50%;
  border: 2px solid rgba(0, 225, 225, 0.3);
}

.contact-details h3 {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.contact-details p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  margin: 0;
  font-weight: 400;
}

/* Games Page Styles */
.games-container {
  padding: 80px 40px 0 40px; /* Add top padding to move content down */
  text-align: center;
  height: calc(100% - 80px); /* Adjust height */
  display: flex;
  flex-direction: column;
}

.games-container h1 {
  font-size: 4rem;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
  animation: topIn 1s ease-out forwards;
}

.games-carousel {
  display: flex;
  gap: 30px;
  padding: 20px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.games-carousel.active-drag {
    cursor: grabbing;
}

/* Custom scrollbar */
.games-carousel::-webkit-scrollbar {
  height: 8px;
}

.games-carousel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.games-carousel::-webkit-scrollbar-thumb {
  background: rgba(0, 225, 225, 0.5);
  border-radius: 10px;
}

.games-carousel::-webkit-scrollbar-thumb:hover {
  background: rgb(0, 225, 225);
}

.game-card {
  flex: 0 0 280px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: white;
  animation: bottomIn 1s ease-out forwards;
  opacity: 0;
  display: flex;
  flex-direction: column;
}

/* Stagger animation for cards */
.game-card:nth-child(1) { animation-delay: 0.2s; }
.game-card:nth-child(2) { animation-delay: 0.3s; }
.game-card:nth-child(3) { animation-delay: 0.4s; }
.game-card:nth-child(4) { animation-delay: 0.5s; }
.game-card:nth-child(5) { animation-delay: 0.6s; }

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 225, 225, 0.2);
}

.game-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Ensures this container fills the card */
  /* 为Safari浏览器添加纯色背景以提高文字可读性 */
  background-color: rgba(10, 15, 30, 0.7);
  border-radius: 0 0 20px 20px;
}

.card-content h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.5rem;
  color: white;
}

.card-content p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

.card-footer .fa-heart,
.card-footer .fa-download {
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.card-footer .fa-heart:hover {
  color: #ff6b6b;
  transform: scale(1.2);
}

.card-footer .fa-download:hover {
  color: #00e1e1;
  transform: scale(1.2);
}

.dev-status {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
}

/* About Page Extra Info */
.about-extra {
  margin-top: 15px;
}

.about-extra h3 {
  font-size: 1.5rem; /* Reduced font size */
  color: white;
  margin-bottom: 5px;
  letter-spacing: 2px;
}

.about-extra p {
  font-size: 16px; /* Reduced font size */
  width: 100%;
  margin-bottom: 15px;
  color: rgb(210, 210, 210);
}

.hamburger {
  display: none; /* 默认隐藏 */
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: white;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    body {
        padding-bottom: 0; /* Remove previous fix */
    }

    #hero {
        padding: 0;
    }

    .hamburger {
        display: block;
        cursor: pointer;
        padding: 10px; /* 增加触摸区域 */
        margin: -10px; /* 补偿padding */
        border-radius: 5px; /* 添加圆角 */
        transition: background-color 0.3s;
        -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
        touch-action: manipulation; /* 优化触摸操作 */
    }
    
    .hamburger:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .hamburger:active {
        background-color: rgba(255, 255, 255, 0.2);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .main-nav {
        position: fixed;
        right: -100%;
        visibility: hidden; /* Hide element completely when off-screen */
        top: 80px;
        gap: 0;
        flex-direction: column;
        background-color: rgba(10, 15, 30, 0.9);
        width: 100%;
        text-align: center;
        transition: right 0.3s ease-in-out; /* Transition only the position */
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 1000;
    }

    .main-nav a {
        padding: 20px 0;
        width: 100%;
        transition: background-color 0.3s;
    }
    
    .main-nav a:hover {
        background-color: rgba(0, 225, 225, 0.1);
    }
    
    .main-nav a::after {
        display: none; /* Hide underline on mobile */
    }

    .main-nav.active {
        right: 0;
        visibility: visible; /* Make it visible when active */
    }

    .hero-section-container {
        width: 100%;
        border-radius: 0;
        padding: 20px; /* Simplified padding */
        height: auto; /* Allow container to grow */
        min-height: calc(100vh - 40px); /* Ensure it's nearly fullscreen */
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 30px;
        align-content: center;
        margin-top: -80px; 
    }

    .left-section {
      text-align: center;
    }

    .left-section h1 {
      font-size: 5rem;
    }

    .left-section .about-title {
      font-size: 4rem;
    }
    
    .left-section p, .about-extra p {
      width: 100%;
    }

    .right-section {
        grid-row: 1; /* Move sphere to the top */
        padding-top: 30px;
    }
    
    .sphere-animation {
        width: 200px;
        height: 200px;
    }
    
    .games-container h1 {
        font-size: 3rem;
    }
    
    .game-card {
        flex: 0 0 240px;
    }

    .social-icons {
        padding-bottom: 15px;
    }

    header {
      width: 100%;
      margin: 0;
      padding: 5px 25px;
      box-sizing: border-box;
      z-index: 2000; /* 确保header在最上层 */
      position: relative; /* 需要position才能使用z-index */
    }

    .footer-content {
        background-color: transparent;
    }
    
    .footer p {
        font-size: 12px;
    }

    .footer {
        position: relative; /* Needed for stacking */
        padding: 20px 0;
    }

    /* --- Page Specific Adjustments --- */

    /* Home page: Move content up and increase gap */
    .page-home .hero-content {
        padding-top: 120px; /* Pushed down to be vertically centered */
        gap: 40px;
    }

    /* About page: 调整球和内容位置，参照contacts页面的球位置 */
    .page-about .hero-content {
        padding-top: 100px; /* 增加padding-top，让内容整体下移 */
        gap: 25px; /* 减少gap，让球和内容更紧 */
    }
    
    .page-about .right-section {
        padding-top: 0px; /* 移除球的顶部padding，让它与contacts页面的球位置对齐 */
    }

    /* Contacts page: 保持原有位置作为参考 */
    .page-contacts .hero-content {
        padding-top: 60px;
    }
    
    .page-contacts .right-section {
        padding-top: 30px; /* 保持contacts页面球的参考位置 */
    }

    /* 统一contacts和about页面的大字大小 */
    .page-contacts .left-section h1,
    .page-about .left-section h1,
    .page-about .left-section .about-title {
        font-size: 4rem !important; /* 统一大小 */
    }

    /* Games page: Move content down */
    .page-games .games-container {
        padding: 60px 20px 0 20px; /* Unified padding for mobile */
    }
}

/* Safari和移动端兼容性样式 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  /* Safari特定样式 */
  .sphere-animation {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
  }
  
  .sphere {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* 增强Safari中的光效 */
    box-shadow: 
      0 0 20px rgba(0, 225, 225, 0.8),
      0 0 40px rgba(0, 225, 225, 0.4),
      0 0 60px rgba(0, 225, 225, 0.2),
      inset 0 0 20px rgba(0, 225, 225, 0.3),
      0 0 80px rgba(0, 225, 225, 0.1);
  }
  
  .sphere::before,
  .sphere::after {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
}

/* iOS Safari特定优化 */
@supports (-webkit-touch-callout: none) {
  .sphere-animation {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
  }
  
  .sphere {
    /* iOS Safari中的增强光效 */
    box-shadow: 
      0 0 25px rgba(0, 225, 225, 0.9),
      0 0 50px rgba(0, 225, 225, 0.5),
      0 0 75px rgba(0, 225, 225, 0.3),
      inset 0 0 25px rgba(0, 225, 225, 0.4),
      0 0 100px rgba(0, 225, 225, 0.2);
  }
}

/* 微信浏览器兼容性 */
@media screen and (max-width: 768px) {
  .sphere-animation {
    width: 200px !important;
    height: 200px !important;
  }
  
  /* 确保在微信浏览器中显示光效 */
  .sphere {
    box-shadow: 
      0 0 15px rgba(0, 225, 225, 0.8),
      0 0 30px rgba(0, 225, 225, 0.4),
      0 0 45px rgba(0, 225, 225, 0.2),
      inset 0 0 15px rgba(0, 225, 225, 0.3) !important;
  }
}

/* 微信浏览器特殊布局优化 */
@media screen and (max-width: 768px) {
  /* 微信浏览器检测 */
  @supports (-webkit-touch-callout: none) and (not (translate: 0)) {
    /* 微信浏览器特殊处理 */
    .hero-section-container {
      height: 100vh !important;
      overflow: hidden !important;
      position: relative !important;
    }
    
    .hero-content {
      height: 100% !important;
      display: flex !important;
      flex-direction: column !important;
      justify-content: flex-start !important;
      align-items: center !important;
      padding: 0 !important;
      margin: 0 !important;
    }
    
    /* 球体固定在顶部 */
    .right-section {
      position: fixed !important;
      top: 100px !important; /* 固定在header下方 */
      left: 50% !important;
      transform: translateX(-50%) !important;
      z-index: 10 !important;
      padding: 0 !important;
      margin: 0 !important;
    }
    
    .sphere-animation {
      width: 150px !important;
      height: 150px !important;
    }
    
    /* 文字内容填充屏幕下部 */
    .left-section {
      margin-top: 200px !important; /* 为球体留出空间 */
      padding: 20px !important;
      text-align: center !important;
      flex: 1 !important;
      display: flex !important;
      flex-direction: column !important;
      justify-content: center !important;
      align-items: center !important;
      overflow-y: auto !important;
    }
    
    .left-section h1,
    .left-section .about-title {
      font-size: 3rem !important;
      margin-bottom: 20px !important;
    }
    
    .left-section p {
      font-size: 14px !important;
      line-height: 1.6 !important;
      margin-bottom: 15px !important;
    }
    
    /* About页面特殊处理 */
    .page-about .left-section {
      margin-top: 180px !important;
    }
    
    .page-about .about-extra {
      margin-top: 20px !important;
    }
    
    .page-about .about-extra h3 {
      font-size: 1.2rem !important;
      margin-bottom: 10px !important;
    }
    
    .page-about .about-extra p {
      font-size: 13px !important;
      margin-bottom: 15px !important;
    }
    
    /* Contacts页面特殊处理 */
    .page-contacts .left-section {
      margin-top: 180px !important;
    }
    
    .contact-info {
      margin-top: 20px !important;
    }
    
    .contact-item {
      margin-bottom: 15px !important;
      padding: 10px !important;
    }
  }
}

/* 强制硬件加速 */
.sphere-animation,
.sphere,
.sphere::before,
.sphere::after,
.image-wrap {
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000;
  perspective: 1000;
  will-change: transform;
}

/* 通用移动端优化 */
@media (max-width: 768px) {
  .hero-section-container {
    width: 95% !important;
    min-width: 0 !important;
    max-width: 95vw !important;
    height: 90vh !important;
    min-height: 0 !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    background-color: rgba(255,255,255,0.1) !important;
    border-radius: 30px !important;
    border: 2px solid rgba(211,211,211,0.2) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    margin: 2.5vh auto 0 auto !important;
  }
  
  .hero-content {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    padding: 10px 15px !important;
  }
  
  .left-section h1 {
    font-size: 4rem !important;
  }
  
  .left-section .about-title {
    font-size: 3rem !important;
  }
  
  /* 统一contacts和about页面的大字大小 */
  .page-contacts .left-section h1,
  .page-about .left-section h1,
  .page-about .left-section .about-title {
    font-size: 4rem !important; /* 统一大小 */
  }
  
  /* about页面特殊调整 */
  .page-about .hero-content {
    padding-top: 80px !important; /* 调整about页面的内容位置，让内容整体下移 */
    gap: 15px !important; /* 减少间距 */
  }
  
  .page-about .right-section {
    padding-top: 0px !important; /* 移除球的顶部padding，让它与contacts页面的球位置对齐 */
  }
  
  .sphere-animation {
    width: 180px !important;
    height: 180px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 90vw !important;
    max-height: 180px !important;
  }
}

@media (max-width: 768px) {
  body.page-home .hero-section-container .hero-content .left-section {
    margin-top: 280px !important;
  }
  .page-about .hero-section-container,
  .page-contacts .hero-section-container {
    width: 95% !important;
    min-width: 0 !important;
    max-width: 95vw !important;
    height: 90vh !important;
    min-height: 0 !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    background-color: rgba(255,255,255,0.1) !important;
    border-radius: 30px !important;
    border: 2px solid rgba(211,211,211,0.2) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    margin: 2.5vh auto 0 auto !important;
  }
  .page-about .hero-content,
  .page-contacts .hero-content {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  .page-about .right-section,
  .page-contacts .right-section {
    position: absolute !important;
    top: 140px !important; /* 球整体下移一个球的直径（140px） */
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 10 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    display: flex !important;
    justify-content: center !important;
    pointer-events: none;
  }
  .page-about .sphere-animation,
  .page-contacts .sphere-animation {
    width: 140px !important;
    height: 140px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 90vw !important;
    max-height: 140px !important;
  }
  .page-about .left-section,
  .page-contacts .left-section {
    margin-top: 370px !important;
    padding: 10px 8vw 0 8vw !important;
    text-align: center !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    overflow-y: auto !important;
    max-height: calc(100dvh - 370px - 60px) !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }
  .page-about .left-section .about-title,
  .page-about .left-section h1,
  .page-contacts .left-section h1 {
    font-size: 2.2rem !important;
    margin-bottom: 18px !important;
    word-break: break-all !important;
  }
  .page-about .left-section p,
  .page-contacts .left-section p {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 12px !important;
    word-break: break-word !important;
  }
  .page-about .about-extra {
    margin-top: 10px !important;
  }
  .page-about .about-extra h3 {
    font-size: 1.1rem !important;
    margin-bottom: 8px !important;
  }
  .page-about .about-extra p {
    font-size: 12px !important;
    margin-bottom: 10px !important;
  }
  .page-contacts .contact-info {
    margin-top: 10px !important;
  }
  .page-contacts .contact-item {
    margin-bottom: 10px !important;
    padding: 8px !important;
  }
  .footer {
    position: absolute !important;
    left: 0;
    bottom: 0;
    width: 100vw !important;
    padding: 10px 0 !important;
    z-index: 20;
    background: transparent;
  }
  .footer-content p {
    font-size: 11px !important;
    color: rgba(255,255,255,0.7) !important;
  }
}

/* 恢复首页球体原始大小，只上移70px */
@media (max-width: 768px) {
  .page-home .right-section {
    position: absolute !important;
    top: 70px !important; /* 球体上移一个半径（140px/2=70px） */
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 10 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    display: flex !important;
    justify-content: center !important;
    pointer-events: none;
  }
  .page-home .sphere-animation {
    width: 140px !important;
    height: 140px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 90vw !important;
    max-height: 140px !important;
  }
  .page-home .left-section {
    margin-top: 410px !important; /* 原390px，顶部再增加20px，确保SHINE大字完整显示 */
    padding: 10px 8vw 0 8vw !important;
    text-align: center !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    overflow-y: auto !important;
    max-height: calc(100dvh - 410px - 60px) !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }
  .page-home .left-section h1 {
    font-size: 2.8rem !important; /* 比about页更大一号，突出SHINE大字 */
    margin-bottom: 18px !important;
    word-break: break-all !important;
  }
}

/* 仅桌面端显示版权，移动端隐藏 */
.desktop-only { display: block; }
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
}
.page-home .left-section h1 {
    font-size: 12rem !important;
    white-space: nowrap;
}
@media (max-width: 768px) {
  .page-home .left-section h1 {
    font-size: 4rem !important;
    white-space: nowrap;
  }
}

/* 桌面端Sudoku游戏的下载按钮样式 */
