/* ---------- HarmonyOS Sans SC 字体声明 ---------- */
@font-face {
    font-family: 'HarmonyOS Sans SC';
    src: url('/assets/fonts/HarmonyOS_SansSC/HarmonyOS_SansSC_Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HarmonyOS Sans SC';
    src: url('/assets/fonts/HarmonyOS_SansSC/HarmonyOS_SansSC_Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HarmonyOS Sans SC';
    src: url('/assets/fonts/HarmonyOS_SansSC/HarmonyOS_SansSC_Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HarmonyOS Sans SC';
    src: url('/assets/fonts/HarmonyOS_SansSC/HarmonyOS_SansSC_Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HarmonyOS Sans SC';
    src: url('/assets/fonts/HarmonyOS_SansSC/HarmonyOS_SansSC_Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: 'HarmonyOS Sans SC', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    background: #09090f;
    color: #f1f5f9;
    min-height: 100vh;
    overflow: hidden;
    cursor: default;
    user-select: none;
}

/* 背景粒子与全息网格 */
.bg-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.stars-canvas {
    width: 100%;
    height: 100%;
    opacity: 0.7;
}

.hologram-grid {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(129, 140, 248, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(129, 140, 248, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center;
    transform: perspective(1000px) rotateX(60deg) scale(2.5);
    transform-origin: center center;
    opacity: 0.5;
}

/* 核心舞台（3D空间） */
.party-stage {
    position: relative;
    z-index: 1;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1600px;
    perspective-origin: center center;
}

/* 轮盘整体旋转控制 */
.terminal-dial {
    position: relative;
    width: 600px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

/* 中央全息核心：LOGO与核心投影 */
.center-core {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    transform: translateZ(50px);
    text-align: center;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
}

/* 环形装饰线 */
.core-ring {
    position: absolute;
    inset: -20px;
    border: 2px dashed rgba(129, 140, 248, 0.5);
    border-radius: 50%;
    animation: rotateRing 20s linear infinite;
}

.core-ring-outer {
    position: absolute;
    inset: -40px;
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 50%;
    border-left-color: rgba(168, 85, 247, 0.8);
    animation: rotateRingReverse 15s linear infinite;
}

@keyframes rotateRing {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateRingReverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

.hero-logo {
    font-size: 2.4rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.15em;
    text-indent: 0.15em;
    background: linear-gradient(135deg, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
}

.hero-sub {
    font-size: 0.8rem;
    color: #818cf8;
    font-weight: 700;
    letter-spacing: 0.4em;
    text-indent: 0.4em;
    margin-top: 10px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(129, 140, 248, 0.5);
}

/* 手表轮盘菜单项 */
.dial-item-wrap {
    position: absolute;
    width: 240px;
    height: 110px;
    transform-style: preserve-3d;
    transform: rotate(var(--angle)) translateX(280px) rotate(calc(-1 * var(--angle)));
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.dial-card {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 35, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 5px solid var(--accent, #6366f1);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transform-style: preserve-3d;
    transform: translateZ(0px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: border-color 0.3s, background 0.3s, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s;
}

/* 悬停激活高亮态 */
.dial-card:hover {
    background: rgba(30, 30, 50, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
    border-left-color: var(--accent-hover, #818cf8);
    transform: translateZ(40px) scale(1.05);
    box-shadow: 0 15px 35px var(--glow, rgba(99, 102, 241, 0.2));
}

/* 触摸设备激活态（替代 hover） */
.dial-card:active {
    background: rgba(30, 30, 50, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
    border-left-color: var(--accent-hover, #818cf8);
    transform: translateZ(40px) scale(1.05);
    box-shadow: 0 15px 35px var(--glow, rgba(99, 102, 241, 0.2));
}

/* 侧边倾斜切角切入装饰 */
.dial-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 14px 14px 0;
    border-color: transparent var(--accent, #6366f1) transparent transparent;
}

.card-main {
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateZ(15px);
}

.card-icon {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 主题及悬停发光定义 */
.dial-card.mc {
    --accent: #22c55e;
    --accent-hover: #4ade80;
    --glow: rgba(34, 197, 94, 0.25);
}

.dial-card.ai {
    --accent: #a855f7;
    --accent-hover: #c084fc;
    --glow: rgba(168, 85, 247, 0.25);
}

.dial-card.fun {
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --glow: rgba(59, 130, 246, 0.25);
}

.dial-card.tool {
    --accent: #f59e0b;
    --accent-hover: #fbbf24;
    --glow: rgba(245, 158, 11, 0.25);
}

.dial-card.music {
    --accent: #ec4899;
    --accent-hover: #f472b6;
    --glow: rgba(236, 72, 153, 0.25);
}

.dial-card.mc .card-icon {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.15);
}

.dial-card.ai .card-icon {
    color: #c084fc;
    background: rgba(168, 85, 247, 0.15);
}

.dial-card.fun .card-icon {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.15);
}

.dial-card.tool .card-icon {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
}

.dial-card.music .card-icon {
    color: #f472b6;
    background: rgba(236, 72, 153, 0.15);
}

.card-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.05em;
}

.card-info p {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
    white-space: nowrap;
}

/* 底部状态标识槽 */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateZ(10px);
    margin-top: 10px;
}

.card-tag {
    font-size: 0.7rem;
    color: #64748b;
    letter-spacing: 0.1em;
    font-family: monospace;
    font-weight: 600;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.badge-online {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    text-shadow: 0 0 5px rgba(74, 222, 128, 0.4);
}

.badge-soon {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

.badge-offline {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* 下线卡片样式 */
.dial-card.offline {
    cursor: not-allowed;
    opacity: 0.55;
    pointer-events: none;
    border-left-color: rgba(239, 68, 68, 0.3);
}

.dial-card.offline .card-icon,
.dial-card.offline .card-info h3,
.dial-card.offline .card-info p {
    color: #64748b !important;
    background: rgba(100, 116, 139, 0.08) !important;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: dotBlink 1.5s infinite;
}

@keyframes dotBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* 底部全局信息栏 */
.footer-bar {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateZ(20px);
    text-align: center;
    font-family: monospace;
    font-size: 0.8rem;
    color: #94a3b8;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    pointer-events: none;
    text-shadow: 0 0 8px rgba(148, 163, 184, 0.3);
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
    body {
        overflow: hidden;
        height: 100dvh;
        position: fixed;
        width: 100%;
    }

    .terminal-dial {
        width: 400px;
        height: 400px;
    }

    .center-core {
        width: 180px;
        height: 180px;
    }

    .hero-logo {
        font-size: 1.8rem;
    }

    .core-ring {
        inset: -12px;
    }

    .core-ring-outer {
        inset: -28px;
    }

    .dial-item-wrap {
        width: 180px;
        height: 95px;
        transform: rotate(var(--angle)) translateX(190px) rotate(calc(-1 * var(--angle)));
    }

    .dial-card {
        padding: 12px;
    }

    .card-main {
        gap: 8px;
    }

    .card-info h3 {
        font-size: 0.9rem;
    }

    .card-info p {
        display: none;
    }

    .card-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .card-footer {
        margin-top: 6px;
    }

    .footer-bar {
        bottom: 38px;
        font-size: 0.7rem;
    }
}

/* 超小屏 (手机竖屏) */
@media (max-width: 400px) {
    .terminal-dial {
        width: 320px;
        height: 320px;
    }

    .center-core {
        width: 140px;
        height: 140px;
    }

    .hero-logo {
        font-size: 1.4rem;
    }

    .hero-sub {
        font-size: 0.65rem;
        letter-spacing: 0.2em;
        text-indent: 0.2em;
    }

    .core-ring {
        inset: -8px;
    }

    .core-ring-outer {
        inset: -20px;
    }

    .dial-item-wrap {
        width: 145px;
        height: 80px;
        transform: rotate(var(--angle)) translateX(152px) rotate(calc(-1 * var(--angle)));
    }

    .card-info h3 {
        font-size: 0.78rem;
    }

    .card-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .card-footer {
        margin-top: 4px;
    }

    .card-tag {
        font-size: 0.6rem;
    }

    .card-badge {
        font-size: 0.58rem;
        padding: 1px 5px;
    }

    .footer-bar {
        bottom: 34px;
        font-size: 0.58rem;
    }
}

/* 极小屏 (320px 宽度设备) */
@media (max-width: 360px) {
    .terminal-dial {
        width: 280px;
        height: 280px;
    }

    .center-core {
        width: 120px;
        height: 120px;
    }

    .hero-logo {
        font-size: 1.2rem;
        letter-spacing: 0.1em;
    }

    .hero-sub {
        font-size: 0.58rem;
        letter-spacing: 0.15em;
        text-indent: 0.15em;
        margin-top: 6px;
    }

    .core-ring {
        inset: -6px;
        border-width: 1.5px;
    }

    .core-ring-outer {
        inset: -16px;
    }

    .dial-item-wrap {
        width: 130px;
        height: 72px;
        transform: rotate(var(--angle)) translateX(132px) rotate(calc(-1 * var(--angle)));
    }

    .dial-card {
        padding: 10px;
        border-left-width: 4px;
    }

    .card-main {
        gap: 6px;
    }

    .card-info h3 {
        font-size: 0.72rem;
    }

    .card-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .card-footer {
        margin-top: 3px;
    }

    .card-tag {
        font-size: 0.55rem;
    }

    .card-badge {
        font-size: 0.55rem;
        padding: 1px 4px;
    }

    .footer-bar {
        bottom: 32px;
        font-size: 0.55rem;
        letter-spacing: 0.1em;
    }
}

/* 横屏手机适配 */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    .terminal-dial {
        width: 340px;
        height: 340px;
    }

    .center-core {
        width: 130px;
        height: 130px;
    }

    .hero-logo {
        font-size: 1.3rem;
    }

    .hero-sub {
        font-size: 0.6rem;
        letter-spacing: 0.2em;
        text-indent: 0.2em;
    }

    .core-ring {
        inset: -8px;
    }

    .core-ring-outer {
        inset: -20px;
        display: none;
    }

    .dial-item-wrap {
        width: 140px;
        height: 70px;
        transform: rotate(var(--angle)) translateX(162px) rotate(calc(-1 * var(--angle)));
    }

    .dial-card {
        padding: 8px 10px;
    }

    .card-main {
        gap: 6px;
    }

    .card-info h3 {
        font-size: 0.75rem;
    }

    .card-info p {
        display: none;
    }

    .card-icon {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }

    .card-footer {
        margin-top: 2px;
    }

    .card-tag {
        font-size: 0.55rem;
    }

    .card-badge {
        font-size: 0.55rem;
        padding: 1px 4px;
    }

    .footer-bar {
        bottom: 10px;
        font-size: 0.55rem;
    }
}

/* ===== 自定义光标（桌面端） ===== */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #818cf8;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.15s ease, height 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    will-change: transform, left, top;
}

.custom-cursor::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 1px solid rgba(129, 140, 248, 0.4);
    transition: border-color 0.15s ease;
}

.custom-cursor.hidden {
    display: none;
}

/* 光标悬停可点击元素时放大 */
.custom-cursor.hovering {
    width: 36px;
    height: 36px;
    background: rgba(129, 140, 248, 0.12);
    border-color: #a78bfa;
}

.custom-cursor.hovering::after {
    border-color: rgba(167, 139, 250, 0.6);
    inset: 5px;
}

/* 移动端隐藏自定义光标 */
@media (pointer: coarse) {
    .custom-cursor {
        display: none !important;
    }
}