/* ==========================================================================
   全局样式与CSS变量
   ========================================================================== */
:root {
    --bg-dark: #0a0f1d;
    --bg-panel: rgba(18, 26, 47, 0.7);
    --bg-panel-hover: rgba(26, 36, 64, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    
    /* 稀有度颜色 */
    --common-color: #9ca3af;     /* 灰色 */
    --rare-color: #3b82f6;       /* 蓝色 */
    --epic-color: #8b5cf6;       /* 紫色 */
    --legendary-color: #f59e0b;  /* 金色 */
    --mythic-color: #ec4899;     /* 霓虹粉 */
    
    /* 系统三维色系 */
    --color-primary: #10b981;    /* 幸运绿 */
    --color-primary-hover: #059669;
    --color-secondary: #fbbf24;  /* 黄金橙 */
    --color-secondary-hover: #d97706;
}

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

html {
    width: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    /* 采用高兼容度的现代化系统无衬线字体栈 */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* ==========================================================================
   防闪烁平滑淡入机制 (FOUC Protection)
   防止在动态拉取 JSON 配置期间短暂裸露 HTML 静态底稿
   ========================================================================== */
[data-config],
.nav-links,
.nav-cta,
.hero-content,
.hero-stage-container,
.features-grid,
.guardians-container,
.simulator-section {
    opacity: 0;
    transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

body.config-ready [data-config],
body.config-ready .nav-links,
body.config-ready .nav-cta,
body.config-ready .hero-content,
body.config-ready .hero-stage-container,
body.config-ready .features-grid,
body.config-ready .guardians-container,
body.config-ready .simulator-section {
    opacity: 1;
}

/* 无脚本环境/纯静态浏览兼容兜底 */
@media (scripting: none) {
    [data-config],
    .nav-links,
    .nav-cta,
    .hero-content,
    .hero-stage-container,
    .features-grid,
    .guardians-container,
    .simulator-section {
        opacity: 1 !important;
    }
}

h1, h2, h3, h4, .logo-text, .btn, .rarity-badge {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Microsoft YaHei", sans-serif;
    font-weight: 600;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   按钮样式
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    border: none;
    outline: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border-bottom: 4px solid var(--color-primary-hover);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
    background-color: #12c98c;
}
.btn-primary:active {
    transform: translateY(1px);
    border-bottom-width: 1px;
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: #1f2937;
    border-bottom: 4px solid var(--color-secondary-hover);
}
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(251, 191, 36, 0.3);
    background-color: #fcd34d;
}
.btn-secondary:active {
    transform: translateY(1px);
    border-bottom-width: 1px;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.2);
}
.btn-outline:hover {
    border-color: white;
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.9rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==========================================================================
   导航栏
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    z-index: 1000;
    background-color: rgba(10, 15, 29, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--color-primary), #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-right: 28px;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 105;
}

.hamburger-bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

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

/* ==========================================================================
   Hero 展示区
   ========================================================================== */
.hero-section {
    position: relative;
    padding-top: 180px;
    padding-bottom: 120px;
    background: radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.15) 0%, transparent 60%),
                radial-gradient(circle at 10% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 40px;
}

.badge {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-primary);
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 0.85rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: inline-block;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-title .highlight {
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* Hero 分层舞台展台 (底图静止 + 角色浮动，支持整体放大调比) */
.hero-character-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.hero-stage-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(var(--hero-stage-scale, 1.25));
    transform-origin: center center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-stage-bg {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.45));
}

.hero-floating-character {
    position: absolute;
    top: 2%;
    left: 48%;
    transform: translateX(-50%);
    animation: heroCharacterFloat 3.6s ease-in-out infinite;
    filter: drop-shadow(0 15px 25px rgba(249, 115, 22, 0.4));
    pointer-events: none;
    z-index: 2;
}

.hero-character-img {
    width: 150px;
    height: auto;
    display: block;
    object-fit: contain;
    transform: scale(var(--hero-char-scale, 1));
    transition: transform 0.3s ease;
}

@keyframes heroCharacterFloat {
    0%, 100% {
        transform: translate(-50%, 0px) rotate(0deg);
    }
    50% {
        transform: translate(-50%, -18px) rotate(2.5deg);
    }
}

.floating-card {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    backdrop-filter: blur(12px);
    border: 2px solid var(--mythic-color);
    border-radius: 24px;
    padding: 30px;
    width: 280px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(236, 72, 153, 0.2);
}

.lucky-dice {
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 3rem;
    animation: spinDice 5s ease-in-out infinite;
}

.card-character {
    font-size: 6rem;
    margin-bottom: 16px;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3));
}

.card-info h3 {
    margin-bottom: 6px;
    color: var(--mythic-color);
}

.card-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

@keyframes spinDice {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(360deg) scale(1.15); }
}

/* ==========================================================================
   排版与基础 Section
   ========================================================================== */
section {
    padding: 100px 0;
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px auto;
}

.section-badge {
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-secondary);
}

/* ==========================================================================
   毛玻璃面板基类
   ========================================================================== */
.panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.panel:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* 子页面各专区统一顶部间距基类 (适配固定导航栏，杜绝文字遮挡) */
.about-section,
.contact-section,
.portfolio-section,
.guardians-section,
.simulator-section {
    padding-top: 140px;
    padding-bottom: 60px;
    min-height: calc(100vh - 200px);
    box-sizing: border-box;
}

/* ==========================================================================
   关于我们 (About Us)
   ========================================================================== */
.about-section {
    background: radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.04) 0%, transparent 40%);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.about-card h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.about-eng {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.about-text {
    font-size: 1rem;
    line-height: 1.8;
}

.mission-card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.mission-list {
    list-style: none;
}

.mission-list li {
    margin-bottom: 16px;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================================================
   游戏作品 (Portfolio)
   ========================================================================== */
.portfolio-section {
    background: radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 40%);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.game-card {
    position: relative;
    padding: 40px 30px;
    text-align: center;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.game-card.active-game {
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.08);
}

.game-emoji {
    font-size: 4rem;
    margin-bottom: 16px;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.3));
}

.game-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 6px;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-weight: 600;
}

.game-badge.pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--color-secondary);
    border-color: rgba(245, 158, 11, 0.2);
}

.game-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.game-intro {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 400px;
}

.game-card .btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: rgba(255,255,255,0.1);
}

/* ==========================================================================
   幸运召唤模拟器
   ========================================================================== */
.simulator-section {
    position: relative;
    background: radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
}

#confettiCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.simulator-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.2fr 0.9fr;
    gap: 24px;
}

/* 概率面板 */
.stats-panel h3 {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.rarity-rates {
    list-style: none;
    margin-bottom: 24px;
}

.rarity-rates li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.rarity-rates .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.rate-common { color: var(--common-color); }
.rate-common .dot { background-color: var(--common-color); }

.rate-rare { color: var(--rare-color); }
.rate-rare .dot { background-color: var(--rare-color); }

.rate-epic { color: var(--epic-color); }
.rate-epic .dot { background-color: var(--epic-color); }

.rate-legendary { color: var(--legendary-color); }
.rate-legendary .dot { background-color: var(--legendary-color); }

.rate-mythic { color: var(--mythic-color); }
.rate-mythic .dot { background-color: var(--mythic-color); }

.user-stats {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-item:first-child {
    border-right: 1px solid var(--border-color);
}

.stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.resource-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05rem;
    background: rgba(0,0,0,0.3);
    padding: 10px 16px;
    border-radius: 12px;
}

.btn-refill {
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: 'Fredoka', sans-serif;
    transition: background 0.2s;
}

.btn-refill:hover {
    background: var(--color-primary-hover);
}

/* 核心抽卡面板 */
.summon-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    background: linear-gradient(180deg, var(--bg-panel) 0%, rgba(16, 24, 48, 0.8) 100%);
    border: 2px solid rgba(16, 185, 129, 0.15);
}

.summon-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    margin-bottom: 30px;
}

.summon-platform {
    width: 180px;
    height: 180px;
    background: radial-gradient(50% 50% at 50% 50%, rgba(16, 185, 129, 0.25) 0%, transparent 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 24px;
    box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.1);
}

.platform-light {
    position: absolute;
    bottom: -10px;
    width: 100px;
    height: 20px;
    background: rgba(16, 185, 129, 0.4);
    filter: blur(10px);
    border-radius: 50%;
    animation: pulseLight 2s ease-in-out infinite;
}

@keyframes pulseLight {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 1; }
}

.summoned-character {
    font-size: 6rem;
    z-index: 10;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.4));
}

.summon-result-info {
    text-align: center;
}

.summon-result-info h3 {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.rarity-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.badge-common { background-color: var(--common-color); color: #1e293b; }
.badge-rare { background-color: var(--rare-color); color: white; }
.badge-epic { background-color: var(--epic-color); color: white; }
.badge-legendary { background-color: var(--legendary-color); color: #1e293b; }
.badge-mythic { background-color: var(--mythic-color); color: white; animation: neonPulse 1.5s infinite alternate; }

@keyframes neonPulse {
    0% { box-shadow: 0 0 5px var(--mythic-color); }
    100% { box-shadow: 0 0 15px var(--mythic-color), 0 0 20px var(--mythic-color); }
}

#resultDesc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 动效辅助类 */
.rolling {
    animation: rollAnim 0.3s linear infinite;
}

@keyframes rollAnim {
    0% { transform: rotate(0deg) scale(0.9); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(0.9); }
}

/* 日志面板 */
.log-panel h3 {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.log-list {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 6px;
}

.log-list::-webkit-scrollbar {
    width: 6px;
}

.log-list::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

.log-placeholder {
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.9rem;
    margin-top: 40px;
}

.log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    margin-bottom: 8px;
    border-left: 3px solid transparent;
    font-size: 0.85rem;
}

.log-item.Common { border-left-color: var(--common-color); }
.log-item.Rare { border-left-color: var(--rare-color); }
.log-item.Epic { border-left-color: var(--epic-color); }
.log-item.Legendary { border-left-color: var(--legendary-color); }
.log-item.Mythic { border-left-color: var(--mythic-color); }

.log-time {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* ==========================================================================
   守护者图鉴展示柜
   ========================================================================== */
.guardians-section {
    background: radial-gradient(circle at 80% 80%, rgba(251, 191, 36, 0.05) 0%, transparent 50%);
}

.guardians-container {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 40px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 30px;
    backdrop-filter: blur(12px);
}

.guardians-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guardian-tab {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.guardian-tab:hover {
    background: rgba(255,255,255,0.05);
    transform: translateX(4px);
}

.guardian-tab.active {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.tab-emoji {
    font-size: 2.25rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.tab-details h4 {
    margin-bottom: 2px;
    font-size: 1.05rem;
}

.guardian-tab .badge {
    padding: 2px 8px;
    font-size: 0.7rem;
    margin-bottom: 0;
    border-radius: 4px;
}

/* 主展示面板 */
.guardian-detail-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--border-color);
    padding-left: 40px;
}

.showcase-visual {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.showcase-emoji-wrapper {
    width: 150px;
    height: 150px;
    border-radius: 36px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px dashed var(--border-color);
}

.showcase-emoji {
    font-size: 6rem;
    filter: drop-shadow(0 15px 20px rgba(0,0,0,0.4));
    animation: idleBreathe 3s ease-in-out infinite;
}

@keyframes idleBreathe {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

.showcase-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.showcase-title-row h3 {
    font-size: 2.2rem;
}

.showcase-desc {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.03);
}

.stat-box .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.stat-box .value, .stat-box .value-formula {
    font-size: 0.95rem;
    font-weight: 600;
}

.stat-box .value-formula {
    color: var(--color-primary);
}

.skill-box {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 16px;
    padding: 16px;
}

.skill-box h4 {
    color: var(--color-primary);
    margin-bottom: 4px;
}

.skill-box p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   特色介绍区
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 36px 30px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card:hover {
    transform: translateY(-8px);
    background-color: var(--bg-panel-hover);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 15px 30px rgba(0,0,0,0.25);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 6px 8px rgba(0,0,0,0.15));
}

.feature-card h3 {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==========================================================================
   优化后的联系我们板块样式 (左侧扁平列表 + 右侧表单)
   ========================================================================== */
.contact-section {
    background: radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.03) 0%, transparent 50%);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.contact-info-card h3, .contact-form-card h3 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.contact-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.company-detail-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}

.company-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.company-detail-item .item-label {
    font-size: 0.8rem;
    color: var(--color-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.company-detail-item .item-value {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

.company-detail-item .item-sub-value {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.font-highlight {
    color: var(--color-secondary) !important;
}

/* 在线留言表单样式 */
#contactForm {
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: opacity 0.3s ease;
}

.form-group-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input, .form-group textarea {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    font-family: inherit;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

/* 提交成功页面样式 */
.form-success-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 10px;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.success-icon {
    width: 60px;
    height: 60px;
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.form-success-message h4 {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.form-success-message p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 360px;
}

/* ==========================================================================
   脚部
   ========================================================================== */
.footer {
    background-color: #05070e;
    padding: 60px 0 30px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo-text {
    font-size: 1.8rem;
    margin-bottom: 12px;
    display: inline-block;
}

.footer-brand p {
    max-width: 480px;
}

.footer-links h4 {
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    grid-column: 1 / -1;
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    text-align: center;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-bottom p,
.footer-bottom .footer-beian-row {
    text-align: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   公司 LOGO 反相自适应美化 (已加入 Mac/Safari 兼容优化)
   ========================================================================== */
.logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
    
    /* 💡 兼容性优化 1：防止 Safari 浏览器在 Flex 容器下将图片宽度塌陷为 0 */
    flex-shrink: 0;
    
    /* 💡 兼容性优化 2：兼容 WebKit 引擎的滤镜写法 */
    -webkit-filter: invert(1);
    filter: invert(1);
    
    /* 💡 兼容性优化 3：强制开启 GPU 硬件加速，防止渲染黑块或闪烁 */
    transform: translateZ(0);
    
    /* 💡 兼容性优化 4：滤色模式，自动将反相后的黑色背景过滤为 100% 透明，仅保留白色的 LOGO 图形与文字 */
    mix-blend-mode: screen;
    
    margin-right: 4px;
}

.footer-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    
    /* 💡 同步加入 Mac/Safari 兼容 */
    flex-shrink: 0;
    -webkit-filter: invert(1);
    filter: invert(1);
    transform: translateZ(0);
    mix-blend-mode: screen;
    
    margin-bottom: 12px;
    display: block;
}

/* ==========================================================================
   响应式调整 (全站移动端自适应深度优化)
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .hero-stage-container {
        max-width: 440px;
        transform: scale(var(--hero-stage-scale-mobile, 1.05));
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .simulator-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* 手机端优先展示抽卡核心区 */
    .summon-panel {
        order: -1;
    }
    
    .guardians-container {
        grid-template-columns: 1fr;
    }
    
    .guardian-detail-panel {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 30px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .about-grid, .portfolio-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    /* 移动端导航栏重构：采用 sticky 粘性置顶，在文档流中占据真实高度，物理级杜绝遮挡任何页面内容 */
    .navbar {
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 64px;
        z-index: 1000;
        background-color: rgba(10, 15, 29, 0.98);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }

    .logo-img {
        height: 32px !important;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .nav-cta {
        display: none !important;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(10, 15, 29, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 16px 20px 24px 20px;
        gap: 6px;
        transform: translateY(-160%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s;
        box-shadow: 0 20px 35px rgba(0, 0, 0, 0.6);
        z-index: 99;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }

    .nav-links.nav-active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        margin-right: 0;
        padding: 12px 16px;
        font-size: 1.05rem;
        border-radius: 10px;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background-color: rgba(16, 185, 129, 0.15);
        color: var(--color-primary);
        font-weight: 600;
    }

    /* 首页 Hero 区适配 */
    .hero-section {
        padding-top: 36px;
        padding-bottom: 40px;
    }

    .hero-title {
        font-size: 2.35rem;
        line-height: 1.15;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: 0.92rem;
        line-height: 1.55;
        margin-bottom: 24px;
        max-width: 100%;
    }

    .hero-actions {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin-bottom: 12px;
    }

    .hero-actions .btn {
        padding: 10px 20px;
        font-size: 0.92rem;
    }

    .hero-stage-container {
        max-width: 360px;
        transform: scale(1) !important;
        margin: 0 auto;
    }

    .hero-character-img {
        width: 95px !important;
    }

    .hero-floating-character {
        top: 3%;
        left: 48%;
    }

    /* 页面标题通栏适配 (杜绝双重 padding 挤压与文字遮挡) */
    .section-header {
        padding-top: 0;
        margin-top: 0;
        margin-bottom: 24px;
    }

    .section-header h2 {
        font-size: 1.85rem;
        margin-bottom: 8px;
    }

    .section-header p {
        font-size: 0.92rem;
        line-height: 1.55;
    }

    /* 页面各专区上下间距移动端适配 (由于 navbar 为 sticky 占位，专区直接拥有自然舒适的标准留白) */
    .about-section,
    .contact-section,
    .portfolio-section,
    .guardians-section,
    .simulator-section {
        padding-top: 36px !important;
        padding-bottom: 40px !important;
        min-height: auto;
    }

    /* 抽卡核心面板移动端自适应（取消固定高度，彻底杜绝按钮与文案重叠） */
    .summon-panel {
        order: -1;
        padding: 24px 16px 20px 16px;
        border-radius: 20px;
        display: flex;
        flex-direction: column;
    }

    .summon-stage {
        height: auto !important;
        min-height: auto !important;
        margin-bottom: 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .summon-platform {
        width: 140px;
        height: 140px;
        margin-bottom: 14px;
    }

    .card-slot-idle, .shuffle-card-box, .card-reveal-box {
        width: 115px;
        height: 145px;
    }

    .summon-result-info {
        text-align: center;
        width: 100%;
    }

    .summon-result-info h3 {
        font-size: 1.45rem;
        margin-bottom: 4px;
    }

    .summon-result-info .rarity-badge {
        margin-bottom: 8px;
    }

    .summon-result-info p {
        font-size: 0.86rem;
        line-height: 1.5;
        color: var(--text-secondary);
        margin: 6px 0 0 0;
        padding: 0 4px;
    }

    .summon-actions {
        width: 100%;
        margin-top: 14px;
    }

    .summon-actions .btn,
    .btn-block {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 14px 20px;
        font-size: 1.05rem;
        border-radius: 999px;
    }

    /* 守护者图鉴适配 (紧凑标签网格) */
    .guardians-container {
        padding: 16px;
        border-radius: 20px;
        gap: 20px;
    }

    .guardians-selector {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 8px;
    }

    .guardian-tab {
        padding: 10px 12px;
        border-radius: 12px;
        gap: 10px;
    }

    .tab-emoji {
        font-size: 1.4rem;
    }

    .tab-emoji img {
        width: 28px;
        height: 28px;
    }

    .tab-info h4 {
        font-size: 0.88rem;
    }

    .guardian-detail-panel {
        padding-top: 20px;
    }

    .showcase-character {
        height: 190px;
    }

    .showcase-emoji img {
        max-width: 110px;
        max-height: 110px;
    }

    /* 旗下游戏、信息面板与特色卡片适配 */
    .panel {
        padding: 22px 18px;
        border-radius: 18px;
    }

    .game-card, .feature-card, .contact-form-card, .contact-info-card {
        padding: 22px 18px;
        border-radius: 18px;
    }

    .form-group input, .form-group textarea {
        font-size: 16px; /* 阻止 iOS Safari 聚焦输入框时异常缩放页面 */
    }

    /* 页脚适配 */
    .footer {
        padding: 40px 0 24px 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }

    .footer-brand, .footer-links {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-logo-img {
        margin: 0 auto 12px auto;
    }
}

@media (max-width: 480px) {
    .about-section,
    .contact-section,
    .portfolio-section,
    .guardians-section,
    .simulator-section {
        padding-top: 28px !important;
        padding-bottom: 30px !important;
        min-height: auto;
    }

    .section-header h2 {
        font-size: 1.65rem;
    }

    .hero-section {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .hero-title {
        font-size: 1.95rem;
    }

    .hero-stage-container {
        max-width: 300px;
    }

    .hero-character-img {
        width: 82px !important;
    }

    .hero-actions {
        flex-direction: row;
        gap: 8px;
        width: 100%;
    }

    .hero-actions .btn {
        flex: 1;
        padding: 10px 12px;
        font-size: 0.86rem;
    }

    .guardians-selector {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================================================
   官网素材图片插槽美化
   ========================================================================== */
.card-character img {
    max-width: 140px;
    max-height: 140px;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3));
}

.showcase-emoji img {
    max-width: 140px;
    max-height: 140px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
}

.tab-emoji img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    vertical-align: middle;
}

.game-emoji img {
    max-width: 72px;
    max-height: 72px;
    object-fit: contain;
    margin-bottom: 8px;
}

.summoned-character img {
    max-width: 90px;
    max-height: 90px;
    object-fit: contain;
}

/* ==========================================================================
   页脚 ICP/公网安备 备案链接与图标样式 (响应式自适应)
   ========================================================================== */
.footer-beian-row {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 8px;
    opacity: 0.85;
    line-height: 1.8;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.footer-beian-row [data-config="licenseText"],
[data-config="licenseText"] {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 4px 10px;
}

.beian-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap !important;
    word-break: keep-all !important;
}

.beian-item a {
    color: #94a3b8 !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    white-space: nowrap !important;
    word-break: keep-all !important;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.beian-item a:hover {
    color: var(--color-primary) !important;
    text-decoration: underline !important;
}

.footer-beian-row a {
    color: #94a3b8 !important;
    text-decoration: none !important;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.footer-beian-row a:hover {
    color: var(--color-primary) !important;
    text-decoration: underline !important;
}

.beian-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 5px;
    display: inline-block;
    object-fit: contain;
    flex-shrink: 0;
}

.beian-sep {
    color: var(--text-secondary);
    opacity: 0.45;
    user-select: none;
    margin: 0 2px;
}

@media (max-width: 520px) {
    .beian-sep {
        display: none !important;
    }
    .footer-beian-row [data-config="licenseText"],
    [data-config="licenseText"] {
        gap: 6px 14px !important;
    }
}

/* ==========================================================================
   召唤模拟器：卡牌切换与洗牌动画 (取代原有旋转骰子)
   ========================================================================== */
.card-slot-idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 130px;
    height: 165px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    border: 2px dashed rgba(255,255,255,0.25);
    transition: all 0.3s ease;
}

.card-slot-idle .idle-card-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
    animation: idlePulse 2.5s ease-in-out infinite;
}

.card-slot-idle .idle-card-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
    letter-spacing: 1px;
}

.shuffle-card-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 130px;
    height: 165px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    border: 2px solid var(--color-primary);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4), inset 0 0 15px rgba(16, 185, 129, 0.2);
    animation: cardShuffleFlip 0.08s ease-in-out infinite alternate;
}

.shuffle-card-box img {
    max-width: 85px;
    max-height: 85px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.shuffle-card-box .shuffle-emoji {
    font-size: 4rem;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
}

.shuffle-card-box .shuffle-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    margin-top: 6px;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-reveal-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 130px;
    height: 165px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
    border: 2px solid rgba(255,255,255,0.25);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: cardRevealPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-reveal-box.rarity-mythic, .card-reveal-box.rarity-legendary {
    border-color: #fbbf24;
    box-shadow: 0 0 35px rgba(251, 191, 36, 0.4), inset 0 0 20px rgba(251, 191, 36, 0.2);
}

.card-reveal-box.rarity-epic {
    border-color: #ec4899;
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.35), inset 0 0 15px rgba(236, 72, 153, 0.15);
}

.card-reveal-box.rarity-hero {
    border-color: #a855f7;
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.3), inset 0 0 15px rgba(168, 85, 247, 0.15);
}

.card-reveal-box img {
    max-width: 90px;
    max-height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
}

.card-reveal-box .reveal-emoji {
    font-size: 4.5rem;
    filter: drop-shadow(0 6px 15px rgba(0,0,0,0.4));
}

@keyframes cardShuffleFlip {
    0% { transform: scale(0.96) rotate(-2deg); }
    100% { transform: scale(1.03) rotate(2deg); }
}

@keyframes cardRevealPop {
    0% { transform: scale(0.6) rotateY(90deg); opacity: 0; }
    100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}

@keyframes idlePulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.08); opacity: 1; }
}




