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

/* ===== 导入自定义字体 ===== */
@font-face {
  font-family: 'MaoKenFont';
  src: url('https://itsukawa.oss-cn-beijing.aliyuncs.com/textures/cat.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#webgl {
  display: block;
  width: 100%;
  height: 100%;
}
/* ===== GUI 美化（磨砂玻璃效果）===== */
.lil-gui {
  background: rgba(40, 40, 50, 0.2) !important;   /* 更透明的深色背景 */
  backdrop-filter: blur(25px) brightness(1.3);    /* 强毛玻璃效果 + 更亮 */
  -webkit-backdrop-filter: blur(25px) brightness(1.3); /* 兼容 Safari */

  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);     /* 微光边框 */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);     /* 柔和阴影 */
}

/* 控制栏整体（含标题、按钮、数组控件） */
.lil-gui .controller,
.lil-gui .title,
.lil-gui .cr {
  background: rgba(60, 60, 70, 0.14) !important;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 悬停效果：更低透明度灰色并保留圆角 */
.lil-gui .controller:hover {
  background: rgba(128, 128, 128, 0.16) !important;
  border-radius: 8px;
}

/* 默认折叠面板 */
.lil-gui {
  min-width: 260px;
  max-width: 340px;
}

.lil-gui.collapsed {
  max-height: 46px; /* 仅显示标题行 */
  overflow: hidden;
  transition: max-height 0.2s ease, opacity 0.2s ease;
}

.lil-gui.collapsed:hover {
  max-height: 500px;
}

.lil-gui.pinned,
.lil-gui.expanded {
  max-height: 500px;
  overflow: auto;
}

/* 规范滚动条，避免拉出其他内容 */
.lil-gui.pinned .main,
.lil-gui.expanded .main {
  max-height: 500px;
  overflow-y: auto;
}

.lil-gui .title {
  cursor: pointer;
  position: relative;
}

/* 取消说明文字，保持纯净 */
.lil-gui .title::after {
  content: "";
}

/* ===== 启动画面 Splash ===== */
#splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(6,20,30,0.65), rgba(6,20,30,0.75));
  z-index: 9999;
  color: #fff;
  transition: opacity 0.6s ease, visibility 0.6s;
}

#splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-inner {
  text-align: center;
  width: 88%;
  max-width: 980px;
  padding: 18px;
}

.wood-sign {
  display: inline-block;
  width: 90vw;
  max-width: 800px;
  height: auto;
}

.cover-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.prompt{
  margin-top:18px;
  font-size:18px;
  color:#ffffffcc;
}

.prompt .button{
  display:inline-block;
  background:rgba(255,255,255,0.96);
  color:#222;
  padding:6px 10px;
  border-radius:18px;
  margin:0 6px;
  font-weight:700;
}

/* ===== 打字机文字效果 ===== */
#typewriter-text {
  position: fixed;
  top: 30px;
  left: 30px;
  font-size: 20px;
  color: #7e7057;
  font-family: 'MaoKenFont', 'Arial', sans-serif;
  font-weight: normal;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 100;
  max-width: 600px;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  line-height: 1.6;
}

#typewriter-text.show {
  opacity: 1;
}

/* ===== 旋转和音乐控制按钮 ===== */
.control-btn {
  position: fixed;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
  transform: scale(0.95);
}

.control-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#music-btn {
  bottom: 100px;
  left: 30px;
}

#rotation-btn {
  bottom: 30px;
  left: 30px;
}

@media (max-width: 768px) {
  .control-btn {
    width: 50px;
    height: 50px;
  }
  
  #music-btn {
    bottom: 90px;
    left: 20px;
  }
  
  #rotation-btn {
    bottom: 20px;
    left: 20px;
  }
}

@media (max-width: 768px) {
  #typewriter-text {
    top: 20px;
    left: 20px;
    font-size: 16px;
    max-width: 85vw;
  }
}

/* ===== 手机自适应 ===== */

@media (max-width: 768px) {

  /* 隐藏 GUI 在手机上 */

  .lil-gui {

    display: none !important;

  }

  /* 调整启动画面 */

  .splash-inner {

    width: 95%;

    padding: 10px;

  }

  .wood-sign {

    width: 95vw;

    max-width: none;

  }

  /* 调整打字机文字 */

  #typewriter-text {

    top: 10px;

    left: 10px;

    right: 10px;

    font-size: 14px;

    max-width: none;

    letter-spacing: 1px;

  }

  /* 调整控制按钮 */

  .control-btn {

    width: 45px;

    height: 45px;

  }

  #music-btn {

    bottom: 80px;

    left: 15px;

  }

  #rotation-btn {

    bottom: 15px;

    left: 15px;

  }

  /* 调整提示文字 */

  .prompt {

    font-size: 14px;

    margin-top: 10px;

  }

  .prompt .button {

    padding: 4px 8px;

    font-size: 12px;

  }

}

@media (max-width: 480px) {

  /* 更小的屏幕 */

  #typewriter-text {

    font-size: 12px;

  }

  .control-btn {

    width: 40px;

    height: 40px;

  }

  #music-btn {

    bottom: 70px;

    left: 10px;

  }

  #rotation-btn {

    bottom: 10px;

    left: 10px;

  }

}