/*
 * 旧版首页（candycake 一代）的样式
 *
 * 这些规则只在移动端（max-width: 760px）生效，PC 端通过 .index-pc-only / .index-mobile-only
 * 的显示切换隐藏旧版内容。整体使用 @media 包裹是为了防止 .hero、.features 等
 * 通用选择器污染 PC 端新版（index2）首页。
 */

@media (max-width: 760px) {
  /* ──────────────── 首页全屏幻灯片 ──────────────── */
  .index-mobile-only .cc-slider {
    position: relative;
    height: 100vh;
    min-height: 520px;
    overflow: hidden;
    background: #000;
    margin-top: -64px;
    padding-top: 64px;
    touch-action: pan-y;
  }
  .index-mobile-only .hero { padding: 0; }
  .cc-slides { position: absolute; inset: 0; }
  .cc-slides::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .28);
    z-index: 1;
    pointer-events: none;
  }
  .cc-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
  }
  .cc-slide.active { opacity: 1; }
  .slide-overlay {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 24px;
  }
  .cc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(37, 99, 235, .28);
    background: rgba(37, 99, 235, .08);
    color: var(--cc-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    cursor: pointer;
  }
  .cc-arrow:hover { background: rgba(37, 99, 235, .16); transform: translateY(-50%) scale(1.04); }
  .cc-arrow.left { left: 16px; }
  .cc-arrow.right { right: 16px; }
  .cc-arrow svg { width: 28px; height: 28px; }

  .cc-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 3;
  }
  .cc-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    border: 0;
    padding: 0;
    transition: width .28s ease, background .28s ease, transform .28s ease, opacity .28s ease;
    position: relative;
    z-index: 3;
  }
  .cc-dot.active { width: 20px; background: #fff; transform: scale(1.05); }
  .cc-indicator {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(0, -50%);
    height: 8px;
    border-radius: 999px;
    background: var(--cc-blue);
    box-shadow: 0 6px 16px rgba(37, 99, 235, .35);
    z-index: 2;
    pointer-events: none;
    transition: transform .32s ease, width .32s ease, opacity .32s ease;
    opacity: .95;
  }
  .cc-pager {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 3;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(2, 6, 23, .32);
    border: 1px solid rgba(255, 255, 255, .24);
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  }
  .index-mobile-only .hero-container { margin-left: 0; margin-right: auto; }

  /* 幻灯片主标题区 */
  .slide-maincap {
    position: absolute;
    left: 8%;
    top: 50%;
    transform: translateY(-50%) translateY(10px);
    z-index: 2;
    max-width: 560px;
    color: #fff;
    opacity: 0;
    transition: opacity .4s ease, transform .4s ease;
  }
  .slide-maincap.show { opacity: 1; transform: translateY(-50%) translateY(0); }
  .slide-maincap .slide-title {
    margin: 0 0 10px;
    font-size: 52px;
    line-height: 1.15;
    color: #ffffff;
    text-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  }
  .slide-maincap .slide-sub {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, .9);
    text-shadow: 0 4px 12px rgba(0, 0, 0, .35);
    font-size: calc(1.25em);
  }
  .slide-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .24);
    color: #fff;
    font-weight: 700;
    margin: 0 0 12px;
    backdrop-filter: blur(6px);
  }
  .slide-badge .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--cc-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .22);
    animation: dotBlink 1.5s ease-in-out infinite;
  }
  @keyframes dotBlink {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(37, 99, 235, .22); }
    50% { opacity: .45; box-shadow: 0 0 0 8px rgba(37, 99, 235, .10); }
  }
  .price-block { margin: 6px 0 10px; text-align: right; }
  .price-label-inline { color: rgba(255, 255, 255, .85); font-size: 19px; margin-right: 8px; }
  .price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: #fff;
    justify-content: flex-end;
    text-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  }
  .price-row .currency { font-size: 20px; opacity: .9; }
  .price-row .amount { font-size: 64px; font-weight: 600; }
  .price-row .unit { font-size: 16px; opacity: .9; margin-left: 6px; }

  .slide-maincap > div { text-align: right; }
  .slide-actions { margin-top: 10px; }
  .btn-purple {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cc-blue), var(--cc-blue-600));
    border: 0;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .30);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    min-width: 220px;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  }
  .btn-purple:hover { color: #ffffff; transform: translateY(-1px); }
  .btn-purple:active { transform: translateY(0) scale(.98); box-shadow: 0 6px 16px rgba(37, 99, 235, .25); }
  .slide-maincap .btn:hover { color: #ffffff; transform: translateY(-1px); }
  .slide-maincap .btn:active { transform: translateY(0) scale(.98); box-shadow: 0 6px 16px rgba(37, 99, 235, .22); }

  /* 幻灯片右侧人物图 */
  .slide-figure {
    position: absolute;
    right: 8%;
    bottom: 0;
    height: 60%;
    max-height: 520px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .4s ease, transform .4s ease;
  }
  .slide-figure.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .slide-figure img {
    height: 100%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .35));
  }
  @keyframes charBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
  }
  .slide-figure.show img { animation: charBounce 1.6s ease-in-out infinite; }

  /* 移动端幻灯片细节调整（来自旧版 max-width:640） */
  .cc-slider { min-height: 420px; }
  .cc-arrow { display: none; }
  .slide-figure { height: 34%; max-height: 260px; right: 4%; }
  .slide-maincap {
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
    width: calc(100% - 32px);
    max-width: none;
    padding: 12px 16px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.315), rgba(15, 23, 42, 0.295));
    backdrop-filter: blur(4px);
  }
  .slide-maincap.show { transform: translate(-50%, -50%); }
  .slide-maincap .slide-title { font-size: 34px; }
  .slide-maincap .slide-sub { font-size: 14px; margin: 0 0 10px; }
  .price-row .amount { font-size: 42px; }
  .slide-maincap .price-block { text-align: center; }
  .slide-maincap .price-row { justify-content: center; }
  .slide-maincap > div { text-align: center; }

  /* ──────────────── 解决方案区块 ──────────────── */
  .solutions {
    padding: 36px 0 44px;
    background:
      radial-gradient(1100px 360px at 50% -140px, rgba(37, 99, 235, .24), transparent),
      linear-gradient(180deg, #f5f7ff 0%, #ffffff 55%, #eef2ff 100%);
  }
  .solutions-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
  }
  .solutions-title { margin: 0 0 14px; font-size: 24px; line-height: 1.2; color: #0f172a; }
  .solutions-sub { margin: 0 0 20px; color: #475569; max-width: 540px; }
  .solutions-copy { color: #1e293b; }
  .solutions-copy .btn-purple { margin-top: 6px; }
  .solutions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .solution-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .06);
    border: 1px solid rgba(148, 163, 184, .5);
    color: #1e293b;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  }
  .solution-card strong { display: block; font-size: 15px; margin-bottom: 6px; color: #0f172a; }
  .solution-card p { margin: 0; font-size: 13px; line-height: 1.6; color: #64748b; }
  .solution-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: #2563eb;
    font-size: 18px;
  }

  /* ──────────────── 支持的游戏区块 ──────────────── */
  .home-games {
    margin-top: 0;
    background: linear-gradient(180deg, #eef2ff 0%, #ffffff 40%, #f9fafb 100%);
    padding: 24px 0 56px;
  }
  .games-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
    padding-top: 12px;
  }
  .games-carousel { position: relative; height: 260px; order: 1; }
  .games-info { order: 0; }
  .games-track { position: relative; height: 100%; }
  .game-slide {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scale(.78);
    width: 58%;
    max-width: 200px;
    opacity: 0;
    pointer-events: none;
    transition: transform .4s ease, opacity .3s ease, box-shadow .3s ease;
  }
  .game-slide-inner {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .06);
    border: 1px solid rgba(148, 163, 184, .5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .game-slide-cover { background-size: cover; background-position: center; aspect-ratio: 4 / 5; }
  .game-slide-body { padding: 12px 14px 14px; }
  .game-slide-title { margin: 0 0 6px; font-weight: 700; color: #0f172a; font-size: 14px; }
  .game-slide-tags { font-size: 12px; color: #64748b; }
  .game-slide.active { opacity: 1; pointer-events: auto; transform: translateX(-50%) scale(.96); z-index: 3; }
  .game-slide.prev { opacity: .85; pointer-events: auto; transform: translateX(-94%) scale(.82); z-index: 2; }
  .game-slide.next { opacity: .85; pointer-events: auto; transform: translateX(-6%) scale(.82); z-index: 2; }
  .game-slide.hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) scale(.7); z-index: 1; }
  .games-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
  .games-dot { width: 6px; height: 6px; border-radius: 999px; background: rgba(148, 163, 184, .7); border: 0; padding: 0; }
  .games-dot.active { width: 18px; background: #2563eb; }
  .games-info-title { margin: 0 0 12px; font-size: 24px; line-height: 1.2; color: #0f172a; }
  .games-info-sub { margin: 0 0 18px; color: #475569; }
  .games-info-list { margin: 0 0 18px; padding-left: 18px; color: #64748b; font-size: 14px; }
  .games-info-list li { margin-bottom: 4px; }
  .games-info-cta .btn-purple { min-width: 200px; margin-top: 6px; }

  /* ──────────────── 面板介绍区块 ──────────────── */
  .panel-intro { margin-top: 0; padding: 15px 0 56px; background: #f9fafb; }
  .panel-header { text-align: center; margin-bottom: 24px; }
  .panel-kicker {
    margin: 0 0 6px;
    font-size: 13px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #6366f1;
  }
  .panel-title { margin: 0 0 10px; font-size: 24px; line-height: 1.25; color: #0f172a; }
  .panel-desc { margin: 0; color: #64748b; }
  .panel-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: flex-start;
  }
  .panel-menu {
    background: linear-gradient(135deg, #020617, #0b1120);
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, .45);
  }
  .panel-tab {
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border-radius: 12px;
    border: 0;
    background: transparent;
    color: #9ca3af;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
  }
  .panel-tab + .panel-tab { margin-top: 6px; }
  .panel-tab span { pointer-events: none; }
  .panel-tab-indicator { width: 6px; height: 6px; border-radius: 999px; background: transparent; }
  .panel-tab.active {
    background: rgba(15, 23, 42, 1);
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .8);
    transform: translateY(-1px);
  }
  .panel-tab.active .panel-tab-indicator { background: #facc15; }
  .panel-tab:hover:not(.active) { background: rgba(15, 23, 42, .7); color: #e5e7eb; }
  .panel-visual { display: flex; align-items: center; justify-content: center; }
  .panel-screen {
    width: 100%;
    max-width: 640px;
    border-radius: 18px;
    background: linear-gradient(180deg, #e5e7eb 0%, #f9fafb 35%, #e5e7eb 100%);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
    border: 1px solid rgba(148, 163, 184, .7);
    padding: 10px 10px 12px;
  }
  .panel-screen-bar {
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e5e7eb, #cbd5f5);
    margin-bottom: 12px;
  }
  .panel-screen-body {
    border-radius: 14px;
    background: #020617;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
  }
  .panel-screen-body img { width: 100%; height: auto; display: block; }
  .panel-zoom {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .78);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 80;
    cursor: zoom-out;
  }
  .panel-zoom.open { display: flex; }
  .panel-zoom img {
    max-width: min(92vw, 1100px);
    max-height: 92vh;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .8);
    background: #020617;
  }
}
