﻿/* ============================================================
   0. 字体 & 全局重置
   ============================================================ */
@font-face {
  font-family: "MyFont";
  src: url("./fonts/Myfont.woff2") format("woff2");
  font-weight: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "MyFont", sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    background-size: cover;
    font-family: "Microsoft YaHei", PingFang SC, Hiragino Sans GB, sans-serif;
}

/* ============================================================
   1. 页面容器
   ============================================================ */
.page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    background-color: transparent;
    z-index: 10;
}
.page.active {
    display: flex;
}

.page-top-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 0;
    pointer-events: none;
}

/* ============================================================
   2. 登录页
   ============================================================ */
#loginPage input {
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  font-size: 22px;
  color: #ffffff;
  width: 220px;
  background: transparent !important;
  outline: none;
  text-align: center;
  position: absolute;
  top: 54%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 11;
  -webkit-box-shadow: 0 0 0px 1000px transparent inset !important;
  box-shadow: 0 0 0px 1000px transparent inset !important;
}

#loginPage button {
  display: none !important;
}

.paw-image {
  position: fixed;
  bottom: 2%;
  left: 0;
  width: 100%;
  height: auto;
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
}

.login-page {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  color: #fff;
}

.input-box {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-bottom: 30px;
  width: 85%;
  max-width: 320px;
}

.input-box input::placeholder { color:#cccccc; }

.input-box img {
  width:100%;
  display: block;
  margin: 0 auto;
}

.start-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    position: relative;
}

.start-btn img {
    width: 80px;
    height: auto;
    display: block;
}

.start-btn span {
    color: #c3dddc;
    font-size: 18px;
    font-weight: bold;
    margin-top: 6px;
    opacity:0.6;
}

.login-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.loading-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.2);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s, visibility 0s 0.6s;
}
.loading-overlay.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-k-img {
    width: 320px;
    height: auto;
}

.preload-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 10px;
    z-index: 12;
    pointer-events: none;
}

.preload-dot {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
    transition: left 0.2s linear;
}



.start-btn.done img {
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.8));
    opacity: 1;
}
/* ============================================================
   3. 规则页
   ============================================================ */
#rulePage {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
}

#rulePage.active {
  display: flex;
}

.rule-modal {
  width: calc(100% - 40px);
  max-width: 400px;
  position: relative;
  z-index: 100;
}

.rule-modal img {
  width: 100%;
  display: block;
}

.rule-modal .enter-game-btn {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 30px;
  border: none;
  padding: 12px 27px;
  background: #c3dddc;
  cursor: pointer;
  color: #ffffff;
  z-index: 105;
  font-size: 14;
}

/* ============================================================
   4. 游戏页 — 专辑网格 & 转盘
   ============================================================ */
.album-grid-area {
    position: absolute;
    top: 17%;
    left: 0;
    width: 100%;
    height: 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    box-sizing: border-box;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 3px;
    width: 100%;
    max-width: 400px;
    height: 100%;
}

.album-cell {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: visible;
}

.album-behind {
    position: absolute;
    right: -2%;
    width: 80%;
    height: auto;
    z-index: 1;
    pointer-events: none;
    border-radius: 50%;
}

.album-cover {
    position: relative;
    width: 90%;
    height: auto;
    z-index: 2;
    transition: filter 0.5s ease, transform 0.3s ease;
}

.album-cover.grayscale {
    filter: grayscale(100%);
    cursor: pointer;
}

.album-cover.active {
    filter: none;
    cursor: pointer;
    border-radius: 8px;
}

.album-cover.active.latest:not(.used):hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(255,255,200,0.7));
}

.album-cover.active.latest:not(.used) {
    box-shadow: 0 0 12px 4px rgba(255, 215, 107, 0.7);
}

/* 唱片架 */
.shelf {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 400px;
    z-index: 3;
    pointer-events: none;
    height: auto;
}
.shelf-middle { top: 48%; }
.shelf-bottom { top: 98%; }

/* 提示文字 */
.album-tip-top {
    position: absolute;
    left: 20px;
    color: #222;
    top: -2px;
    font-size: 16px;
    z-index: 12;
}

.album-tip-bottom-out {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 15px;
    color: #a1a1a1;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
}

/* 播放器区域 */
.player-area {
    position: absolute;
    bottom: 8%;
    left: 0;
    width: 100%;
    height: 30%;
    align-items: center;
    justify-content: center;
}

/* 转盘 */
.turntable {
    position: absolute;
    left: 47%;
    top: 25%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.album-spinning {
    width: 115%;
    height: auto;
    border-radius: 50%;
    animation: spin 3s linear infinite;
    object-fit: contain;
}

.album-spinning.pausing {
    animation-play-state: paused;
    opacity: 0.8;
}

/* 底部装饰 */
#bottomDecor {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40vh;
    background: url(images/bottom.png) no-repeat center bottom;
    background-size: 100% auto;
    z-index: 0;
    pointer-events: none;
    display: block;
}

#needle {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40vh;
    background: url(images/needle.png) no-repeat center bottom;
    background-size: 100% auto;
    z-index: 10;
    pointer-events: none;
    display: block;
}

/* 底部触摸按钮 */
.touch-btn {
    position: absolute;
    bottom: 3%;
    width: 60px;
    height: 60px;
    z-index: 20;
    cursor: pointer;
}
.touch-btn.rule { left: 3%; }
.touch-btn.lottery { left: 27%; }
.touch-btn.bag { left: 51%; }
.touch-btn.profile { left: 75%; }

/* 地图图标 */
.map-icon {
    position: absolute;
    top: -20px;
    right: 15px;
    width: 65px;
    height: 65px;
    z-index: 9999;
    cursor: pointer;
}

/* ============================================================
   5. 背包页
   ============================================================ */
#bagPage {
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


.bag-divider { z-index: 10;
    position: absolute;
    top: 24%;
    left: 5%;
    width: 90%;
    height: 1px;
    background: rgba(155,155,155,0.85);;
    height: 3px;
}

.bag-progress {
    position: absolute;
    top: 25%;
    left: 5%;
    width: 90%;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #7b7b7b;
    z-index: 10;
}
.bag-tabs {
    position: absolute;
    top: 18%;
    display: flex;
    gap: 20px;
}

.bag-tab {
    background: #77b7c7;
    color: rgba(255, 255, 255, 0.769);
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

.bag-tab.active {
    color: #fff;
    background: #8acedf;
}

.bag-card-area {
    width: 100%;
    height: 200px;
    overflow: visible;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
}

.bag-card-row {
    display: flex;
    align-items: center;
}

.bag-card {
    flex-shrink: 0;
    margin-left: 0;
    object-fit: contain;
    transition: transform 0.3s, box-shadow 0.3s, filter 0.3s;
    position: relative;
    background: transparent;
    filter:  brightness(0.8) saturate(0.6);
    width:  auto important!;

}
.bag-card.card-series {
    height: 250px; /* 自行修改 */
}

/* 数字相册卡片高度 */
.bag-card.card-number {
    height: 180px; /* 自行修改 */
}

.bag-card:first-child { margin-left: 0; }

.bag-card.active {
    transform: scale(1.2);
    z-index: 10 !important;
     background: transparent;
    filter: brightness(1) saturate(1);
}

.bag-card.uncollected {
    filter: grayscale(0.6) saturate(0);
     background: transparent;
    border: #333;
}

#bagCardLabel {
    color: #fff;
    font-size: 48px;
    margin: 10px 0 0 0;
    opacity: 0.4;
}

.bag-nav {
    position: absolute;
    bottom: 5%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 80px;
    align-items: flex-start;
    z-index: 10;
}

.bag-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.bag-nav-btn {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 60px;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.bag-nav-tip {
    font-size: 14px;
    color: #fff;
    margin-top: 40px;
    opacity: 0.85;
    display: block;
}

.bag-bottom-img {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: auto;
    object-fit: contain;
    z-index: 1;
    pointer-events: none;
}

/* ============================================================
   6. 通用弹窗（NFC 图鉴 / 已有提示）
   ============================================================ */
.image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s;
}

.image-popup.show {
    visibility: visible;
    opacity: 1;
}

.popup-box {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
}

.popup-img {
    max-width: 100%;
    max-height: 70vh;
    margin-bottom: 15px;
}

#popupDesc {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  text-align: center;
  padding: 10px 15px;
  font-weight: 500;
}

#popupDesc::first-line {
  font-size: 20px !important;
  font-weight: bold !important;
  color: #779e9b !important;
}

.popup-btn-wrap {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 999;
}

.popup-btn {
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    color: #fff;
    background: #c3dddc !important;
    border: none !important;
    border-radius: 12px;
    padding: 8px 16px;
}

/* ============================================================
   7. 规则弹窗（游戏内）
   ============================================================ */
.modal-rule {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.3);
  display: none;
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.modal-rule.show { display: flex; }

.ruletitle-img {
  position: absolute;
  top: 0;
  right: 0;
  transform: translateY(-50%);
  height: auto;
  max-width: 160px;
  z-index: 1002;
  pointer-events: none;
}

.rulecat-img {
  position: absolute;
  bottom: 2%;
  left: 2%;
  height: auto;
  max-width: 150px;
  z-index: 1002;
  pointer-events: none;
}

.rule-text {
  text-align: center;
  padding: 20px 16px;
  color: #333333;
  font-size: 15px;
  line-height: 1.6;
}

.modal-rule .close-rule-btn {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 30px;
  border: none;
  padding: 10px 25px;
  background: #c3dddc;
  cursor: pointer;
  color: #ffffff;
  z-index: 1001;
}

/* ============================================================
   8. 抽奖弹窗
   ============================================================ */
.modal-lottery {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.3);
  display: none;
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.modal-lottery.show { display: flex; }

.modal-lottery .modal-content {
  position: relative;
  width: calc(100% - 40px);
  max-width: 400px;
  z-index: 1000;
  background: #fff;
}

.modal-lottery img {
  width: 100%;
  display: block;
}

.lottery-jump-btn {
  position: absolute;
  top: 62%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 30px;
  padding: 12px 34px;
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  z-index: 1002;
}

.lottery-jump-btn:hover {
  background: rgba(255,255,255,0.6);
}

.modal-lottery .close-lottery {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 30px;
  border: none;
  padding: 10px 25px;
  background: #c3dddc;
  cursor: pointer;
  color: #ffffff;
  z-index: 1001;
}

/* ============================================================
   9. 地图弹窗
   ============================================================ */
.map-sidebar {
    position: absolute;
    top: -10px;
    left: -5px;
    display: flex;
    flex-direction: row;
    z-index: 2;
}

.floor-btn {
    width: 32px;
    height: 32px;
    cursor: pointer;
    margin-right: -4px;
    transition: all 0.25s ease;
    background: transparent;
    border: none;
}

.floor-btn.active {
    width: 44px;
    height: 44px;
}

.maptitle-img {
    position: absolute;
    top: 0;
    right: 0;
    transform: translateY(-50%);
    height: auto;
    width: auto;
    max-width: 180px;
    z-index: 10;
    pointer-events: none;
}

.map-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40vh;
}

.map-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    object-fit: contain;
}

.popup-box .back-game-btn {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 30px;
  border: none;
  padding: 10px 25px;
  background: #c3dddc;
  cursor: pointer;
  z-index: 1001;
  font-size: 13px;
  font-weight: bold;
  color: #fff;
}


/* ============================================================
   10. 个人主页弹窗（日记风格）
   ============================================================ */
.profile-card {
    background: #faf7f0 !important;
    border-radius: 12px !important;
    padding: 28px 24px 20px !important;
    max-width: 360px !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.12);
    font-family: "MyFont", "Microsoft YaHei", sans-serif;
}

.profile-date {
    text-align: center;
    font-size: 17px;
    color: #5a4a3a;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.profile-divider {
    width: 60%;
    height: 1px;
    background: #d4c8b8;
    margin: 12px auto;
}

.profile-name {
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: #3a2f24;
    margin-bottom: 2px;
}

.profile-location {
    text-align: center;
    font-size: 14px;
    color: #8a7a6a;
    margin-bottom: 20px;
}

.profile-grid-area {
    background: #fffef9;
    border: 1px dashed #d4c8b8;
    border-radius: 10px;
    padding: 16px 12px;
    margin-bottom: 14px;
}

.profile-grid-label {
    text-align: center;
    font-size: 13px;
    color: #8a7a6a;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.profile-icon-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.profile-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-icon.collected {
    box-shadow: 0 0 8px 2px rgba(200, 160, 80, 0.5);
    border: 2px solid #c8a050;
}

.profile-icon.uncollected {
    background: #e8e3d8;
    border: 2px dashed #c4bca8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #c4bca8;
    font-style: italic;
}

.profile-reward {
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    color: #c8a050;
    margin-bottom: 12px;
    display: none;
}

.profile-reward.show {
    display: block;
}


.profile-btns {
    position: static !important;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* ============================================================
   11. 新手引导
   ============================================================ */
.tutorial-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    z-index: 10000;
    cursor: pointer;
    display: none;
}
.tutorial-overlay.show { display: block; }

.tutorial-pointer {
    position: absolute;
    width: 52px; height: 52px;
    pointer-events: none;
    transition: left 0.4s ease, top 0.4s ease;
    z-index: 10001;
    animation: pointerTap 0.7s ease-in-out infinite;
}

@keyframes pointerTap {
    0%, 100% { transform: translate(-30%, -10%) scale(1); opacity: 1; }
    40%  { transform: translate(-30%, -10%) scale(0.85); opacity: 0.6; }
}

.tutorial-tip {
    position: absolute;
    background: #fff;
    color: #333;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 3px 16px rgba(0,0,0,0.35);
    transition: left 0.35s ease, top 0.35s ease;
    z-index: 10001;
}

/* 气泡下方小三角 */
.tutorial-tip::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #fff;
}

