@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap');

:root {
    --primary: #ffd700; /* 金色 */
    --accent: #ff4d4d;  /* 亮红 */
    --gold: #ffd700;    /* 金色 */
    --bg-color: #0a0e17; /* 深色底 */
    --card-bg: rgba(20, 25, 40, 0.6); /* 玻璃拟态背景 */
    --text-main: #e0e0e0; /* 浅灰白 */
    --text-light: #aaaaaa; /* 灰色 */
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --radius: 16px;
    --border-color: rgba(255, 215, 0, 0.3);
}

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

body {
    font-family: 'Ma Shan Zheng', 'PingFang SC', serif; /* 优先使用书法字体 */
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    padding: 15px;
    line-height: 1.6;
    /* background-image: url('home-bg.png');  移除全局背景图 */
    /* background-size: cover; */
    /* background-position: center; */
    /* background-attachment: fixed; */
}

/* 全局遮罩，确保文字清晰 */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); /* 全局暗化 */
    z-index: -1;
    pointer-events: none;
    display: none; /* 默认隐藏遮罩，只在有背景图的页面显示 */
}

.container {
    max-width: 600px; /* 限制最大宽度，模拟手机 App 感觉 */
    margin: 0 auto;
}

/* 头部 */
.header {
    text-align: center;
    padding: 30px 0;
}

.header h1 {
    font-size: 2.5rem; /* 加大标题 */
    color: var(--gold);
    font-weight: normal;
    letter-spacing: 4px;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.header .subtitle {
    font-size: 1rem;
    color: var(--text-main);
    font-family: sans-serif;
    opacity: 0.8;
}

/* 卡片通用样式 */
.card, .result-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-size: 1.1rem; /* 稍微加大 */
    color: var(--gold); /* 标签用金色 */
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 1px;
}

input[type="text"],
input[type="date"],
input[type="time"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.3); /* 深色半透明输入框 */
    color: #fff;
    transition: all 0.3s;
    font-family: sans-serif; /* 输入内容保持清晰字体 */
}

input:focus, select:focus {
    border-color: var(--gold);
    background: rgba(0, 0, 0, 0.5);
    outline: none;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* 按钮 */
.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%); /* 金色渐变 */
    color: #000; /* 深色文字 */
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* 结果区域样式优化 */
.card-title {
    font-size: 1.2rem;
    color: var(--gold);
    border-left: 4px solid var(--gold);
    padding-left: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
}

/* 四柱八字 Grid */
.bazi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.pillar-item {
    background: rgba(255, 255, 255, 0.05); /* 微透明背景 */
    border-radius: 10px;
    padding: 15px 5px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pillar-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 10px;
    font-family: sans-serif;
}

.gan-zhi {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-family: 'Kaiti SC', 'STKaiti', 'KaiTi', serif; /* 楷体更有韵味 */
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-main);
}

.gan {
    color: var(--accent); /* 天干用朱红 */
}

.zhi {
    color: var(--primary); /* 地支用墨蓝 */
}

/* 五行方位布局 - 五行生克五角星布局 */
.wuxing-grid {
    display: block;
    width: 320px;
    height: 320px;
    position: relative;
    margin: 30px auto;
    /* 背景绘制五角星连线（相克）和外圈连线（相生） */
    background-image: url("data:image/svg+xml,%3Csvg width='320' height='320' viewBox='0 0 320 320' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cmarker id='arrow' markerWidth='10' markerHeight='10' refX='9' refY='3' orient='auto' markerUnits='strokeWidth'%3E%3Cpath d='M0,0 L0,6 L9,3 z' fill='%23ddd' /%3E%3C/marker%3E%3C/defs%3E%3C!-- 外圈圆形 (相生) --%3E%3Ccircle cx='160' cy='160' r='110' fill='none' stroke='%23eee' stroke-width='1' stroke-dasharray='5,5' /%3E%3C!-- 内部五角星 (相克) --%3E%3Cpath d='M160,40 L274,123 L230,255 L90,255 L46,123 Z' fill='none' stroke='%23eee' stroke-width='1' /%3E%3Cpath d='M160,40 L230,255 L46,123 L274,123 L90,255 Z' fill='none' stroke='%23e0e0e0' stroke-width='1' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.wuxing-item {
    position: absolute;
    width: 60px;
    height: 80px;
    /* 居中定位修正 */
    left: 50%;
    top: 50%;
    margin-left: -30px;
    margin-top: -40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

/* 
   五行位置计算 (半径 R=120px)
   中心点 (0,0)
   火 (Top): 0度 -> (0, -120)
   土 (Right): 72度 -> (114, -37)
   金 (Bottom Right): 144度 -> (70, 97)
   水 (Bottom Left): 216度 -> (-70, 97)
   木 (Left): 288度 -> (-114, -37)
*/

/* 火 - 上 */
.wuxing-item.fire { 
    transform: translate(0px, -120px);
}

/* 土 - 右上 */
.wuxing-item.earth { 
    transform: translate(114px, -37px);
}

/* 金 - 右下 */
.wuxing-item.metal { 
    transform: translate(70px, 97px);
}

/* 水 - 左下 */
.wuxing-item.water { 
    transform: translate(-70px, 97px);
}

/* 木 - 左上 */
.wuxing-item.wood { 
    transform: translate(-114px, -37px);
}

.element-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 4px solid #fff;
    font-family: 'Kaiti SC', 'STKaiti', serif;
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
}

.element-count {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 700;
    background: rgba(255,255,255,0.9);
    padding: 2px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    white-space: nowrap;
}

/* 颜色定义 - 线性渐变 (符合截图的扁平圆形风格) */
.wuxing-item.metal .element-icon { 
    /* 金 - 黄色 */
    background: linear-gradient(180deg, #FDD835 0%, #F9A825 100%); 
    color: #fff; 
    border-color: #fff; 
}
.wuxing-item.wood .element-icon { 
    /* 木 - 绿色 */
    background: linear-gradient(180deg, #81C784 0%, #388E3C 100%); 
}
.wuxing-item.water .element-icon { 
    /* 水 - 蓝色 */
    background: linear-gradient(180deg, #64B5F6 0%, #1976D2 100%); 
}
.wuxing-item.fire .element-icon { 
    /* 火 - 红色 */
    background: linear-gradient(180deg, #E57373 0%, #D32F2F 100%); 
}
.wuxing-item.earth .element-icon { 
    /* 土 - 棕色 */
    background: linear-gradient(180deg, #8D6E63 0%, #4E342E 100%); 
    color: #fff; 
}


/* 十神分析列表 */
.shishen-list {
    list-style: none;
}

.shishen-list li {
    position: relative;
    padding: 10px 0 10px 20px;
    border-bottom: 1px dashed #eee;
    font-size: 0.95rem;
    color: #444;
}

.shishen-list li::before {
    content: "•";
    color: var(--accent);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: 5px;
    line-height: 1;
}

.shishen-list li:last-child {
    border-bottom: none;
}

/* 加载动画优化 */
.loading {
    text-align: center;
    padding: 50px 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 太极动画 - SVG 矢量版 */
.spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    animation: spin 2s linear infinite;
    /* 使用 box-shadow 代替 filter，避免旋转时的边缘锯齿 */
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border-radius: 50%; /* 确保阴影是圆形的 */
    
    /* 移除旧的 CSS 绘图属性 */
    background: none;
    border: none;
    
    /* 硬件加速 */
    will-change: transform;
}

/* 移除旧的伪元素绘图，防止干扰 */
.spinner::before,
.spinner::after,
.spinner .dot {
    display: none;
}

/* ... existing code ... */

.step.active::before {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(44, 62, 80, 0.1);
}

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

/* 进度文字 */
.loading p {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.loading .wait-time {
    font-size: 0.9rem;
    color: #888;
    font-weight: 400;
    margin-bottom: 30px;
}

/* 进度步骤条 */
.progress-steps {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 280px;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 9px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: #eee;
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    background: transparent;
    padding: 0;
    color: #ccc;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 0;
    width: 60px;
}

.step::before {
    content: '';
    width: 16px;
    height: 16px;
    background: #fff;
    border: 2px solid #eee;
    border-radius: 50%;
    transition: all 0.3s;
    margin-bottom: 5px;
}

.step.active {
    color: var(--primary);
    font-weight: bold;
    border: none;
}

.step.active::before {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(44, 62, 80, 0.1);
}

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

/* 隐藏元素 */
.hidden {
    display: none !important;
}

/* 错误提示 */
.error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* 五行分析内容样式 */
.analysis-content {
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.8;
    text-align: justify;
}

.analysis-content p {
    margin-bottom: 10px;
}


/* 首页菜单样式 */
.home-container {
    max-width: 800px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.menu-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.02);
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.menu-card .icon-wrapper {
    width: 60px;
    height: 60px;
    background: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.5rem;
    color: var(--primary);
    transition: background 0.3s ease, color 0.3s ease;
}

.menu-card:hover .icon-wrapper {
    background: var(--primary);
    color: #fff;
}

.menu-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--primary);
}

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

/* 禁用状态 */
.menu-card.disabled {
    opacity: 0.8;
    cursor: not-allowed;
    background: #f9f9f9;
}

.menu-card.disabled:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.menu-card.disabled .icon-wrapper {
    background: #eee;
    color: #aaa;
}

.tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #eee;
    color: #999;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
}

/* =========================================
   移动端适配与布局优化
   ========================================= */

/* 布局容器优化 */
.main-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 表单网格布局 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.full-width {
    grid-column: 1 / -1;
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
    body {
        padding: 10px;
        background-size: 10px 10px; /* 减小背景点阵尺寸 */
    }

    .container {
        width: 100%;
        padding: 0;
    }

    .header {
        padding: 20px 0;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .card {
        padding: 20px 15px; /* 减小卡片内边距 */
        border-radius: 12px;
        margin-bottom: 15px;
    }

    /* 首页菜单移动端优化 - 改为列表式卡片 */
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .menu-card {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 15px;
        min-height: 80px;
    }
    
    .menu-card .icon-wrapper {
        margin: 0 15px 0 0;
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
        flex-shrink: 0;
    }
    
    .menu-card h3 {
        margin-bottom: 4px;
        font-size: 1.1rem;
    }
    
    .menu-card p {
        font-size: 0.85rem;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .tag {
        top: 50%;
        transform: translateY(-50%);
        right: 15px;
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    /* 八字排盘结果适配 */
    .bazi-grid {
        gap: 5px;
    }
    
    .pillar-item {
        padding: 10px 2px;
    }
    
    .pillar-label {
        font-size: 0.75rem;
        margin-bottom: 5px;
    }
    
    .gan-zhi {
        font-size: 1.3rem;
    }

    /* 五行图适配 - 缩小以适应窄屏 */
    .wuxing-grid {
        transform: scale(0.85);
        margin: 0 auto 20px;
        transform-origin: center top;
        /* 修正高度占用，因为 scale 不会改变布局占据的空间 */
        height: 280px; 
        width: 100%;
        max-width: 320px;
        background-position: center top;
    }
    
    /* 按钮优化 */
    .btn-primary {
        padding: 12px;
        font-size: 1rem;
    }
}

/* 超小屏幕适配 (如 iPhone SE) */
@media (max-width: 375px) {
    .wuxing-grid {
        transform: scale(0.75);
        height: 250px;
    }
    
    .gan-zhi {
        font-size: 1.1rem;
    }
    
    .pillar-item {
        padding: 8px 0;
    }
}

/* =========================================
   面相分析页面样式
   ========================================= */

.upload-area {
    width: 100%;
    min-height: 300px;
    border: 2px dashed #e0e0e0;
    border-radius: var(--radius);
    background: #fcfcfc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: var(--primary);
    background: #f8f9fa;
}

.upload-placeholder {
    text-align: center;
    color: var(--text-light);
}

.plus-icon {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    margin: 0 auto 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.upload-area:hover .plus-icon {
    transform: scale(1.1);
    color: var(--accent);
}

.upload-placeholder p {
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.upload-placeholder small {
    font-size: 0.85rem;
    color: #999;
}

.preview-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.btn-icon-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon-overlay:hover {
    transform: scale(1.1);
    background: #fff;
}

/* 结果内容样式 */
.analysis-content h3 {
    color: var(--primary);
    margin: 20px 0 10px;
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.analysis-content p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #444;
}

.analysis-content ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.analysis-content li {
    margin-bottom: 8px;
    color: #555;
}

/* 紫微斗数样式 */
.ziwei-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.palace-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #eee;
}

.palace-item h4 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 1rem;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 5px;
}

.palace-item p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

.ziwei-main-star {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-main);
}

.analysis-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-main);
}


/* =========================================
   进度条加载动画
   ========================================= */
.progress-container {
    width: 100%;
    max-width: 300px;
    height: 12px;
    background-color: #f0f0f0;
    border-radius: 6px;
    margin: 0 auto 20px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 6px;
    transition: width 0.3s ease;
    position: relative;
}

/* 进度条光效动画 */
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

.loading-text {
    font-size: 1rem;
    color: var(--text-light);
    margin-top: 10px;
}


/* K线图专用样式 - 适配整体风格 */
.kline-card {
    /* 移除深色背景，使用默认卡片样式 */
    /* background: #1e222d; */
    /* color: #fff; */
    /* border: 1px solid #2a2e39; */
}

.kline-card .card-title {
    /* color: #fff; */
    border-left-color: #eb5454;
}

.kline-card .chart-legend {
    color: var(--text-light) !important;
}

/* 趋势标签 */
.trend-badge {
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 玄幻/道家风格首页样式 */
@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap');

/* 首页专用样式 */
.ink-theme {
    background-color: #0a0e17; /* 深色底 */
    background-image: url('home-bg.png'); /* 仅首页显示背景图 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Ma Shan Zheng', cursive;
    margin: 0;
    padding: 0; /* 覆盖 body 的 padding */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* 首页遮罩 */
.ink-theme::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* 轻微暗化背景 */
    z-index: 0;
    display: block; /* 强制显示 */
}

.ink-container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.ink-header {
    margin-bottom: 30px;
    padding-top: 200px; /* 下移标题区域，避开背景人物眼睛 */
    text-align: left; /* 左对齐 */
    padding-left: 10px; /* 与按钮 Grid 的 padding 对齐 */
}

.ink-logo {
    font-size: 4rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.3);
    margin-bottom: 10px;
    background: linear-gradient(to bottom, #fff, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ink-subtitle {
    font-size: 1.4rem;
    color: #e0e0e0;
    letter-spacing: 6px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.ink-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 改为3列，更适合竖长卡片 */
    gap: 20px;
    padding: 10px;
    justify-content: center; /* 确保内容居中 */
}

.ink-item {
    position: relative;
    aspect-ratio: 3/5; /* 竖长比例，类似符咒/卡牌 */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s ease;
    border-radius: 8px;
    
    /* 玻璃拟态 + 金色边框 */
    background: rgba(20, 25, 40, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ink-item:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4), inset 0 0 10px rgba(255, 215, 0, 0.1);
    background: rgba(20, 25, 40, 0.8);
}

.ink-char {
    font-size: 2rem;
    line-height: 1.3;
    color: #ffd700; /* 金色文字 */
    z-index: 2;
    writing-mode: vertical-rl; /* 竖排文字 */
    text-orientation: upright;
    text-shadow: 0 0 5px rgba(0,0,0,0.8), 0 0 10px rgba(255, 215, 0, 0.3);
}

/* 按钮背景装饰（可选：符咒纹理） */
.ink-bg {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: 4px;
    pointer-events: none;
    display: block;
}

/* 水波纹动画 - 金色 */
#ripple-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.ink-ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.8) 0%, rgba(255, 165, 0, 0.4) 60%, transparent 100%); /* 金色光波 */
    transform: translate(-50%, -50%) scale(0);
    animation: ripple-effect 1s ease-out forwards;
    width: 20px;
    height: 20px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

@keyframes ripple-effect {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(150); /* 扩散覆盖全屏 */
        opacity: 0;
    }
}

.ink-footer {
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* 表格样式适配 */
table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-main);
}

th, td {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

th {
    background-color: rgba(255, 215, 0, 0.1); /* 金色微透 */
    color: var(--gold);
}



/* 移动端适配：保持3列，缩小尺寸并居中 */
@media (max-width: 768px) {
    .ink-container {
        padding: 0; /* 移除内边距，让 Grid 贴边或由 width 控制 */
        max-width: 360px; /* 限制最大宽度，确保在手机上不会太宽 */
        width: 90%; /* 留出边距 */
        margin: 0 auto; /* 强制水平居中 */
    }

    .ink-menu-grid {
        gap: 10px; /* 减小间距 */
        padding: 0; /* 移除Grid内边距，避免不对齐 */
        justify-content: center;
    }

    .ink-header {
        padding-left: 0; /* 移动端移除左边距，与按钮对齐 */
    }

    .ink-item {
        /* 保持3列 */
        border-radius: 6px;
    }

    .ink-char {
        font-size: 1.4rem; /* 缩小按钮文字 */
    }
    
    .ink-logo {
        font-size: 3rem;
    }
    
    .ink-subtitle {
        font-size: 1rem;
        letter-spacing: 2px;
    }
}

