/* ==========================================
   1. 品牌全局变量定义 (NNPH Brand & Palette Variables)
   ========================================== */
:root {
    /* 深色绿夜/暗蓝渐变背景（像素参考 nnphgame 截图色调） */
    --bg-gradient: linear-gradient(135deg, #0a171c 0%, #0f232b 50%, #162f3a 100%);
    
    /* 核心行动高亮色 */
    --accent-color: #ffcc00;    /* 璀璨电光金（主视觉/按钮/标题高亮） */
    --accent-hover: #e6b800;   /* 金色悬停 */
    
    /* 文本色体系 */
    --text-main: #cbd5e1;       /* 象牙浅灰（主文本，高易读性） */
    --text-white: #ffffff;      /* 纯白 */
    --text-dark: #0a1118;       /* 极深底色（用于金黄按钮上的文字） */
    
    /* 卡片磨砂玻璃质感（契合 NNPH 的暗绿磨砂底色） */
    --card-bg: rgba(10, 25, 30, 0.7); 
    --card-border: rgba(255, 255, 255, 0.05);
    --card-shadow: rgba(0, 0, 0, 0.5);
    --item-bg: rgba(5, 15, 20, 0.65); /* 更深邃的黑绿卡片底色 */
}

/* 品牌风格变量 - 差异化调整 */
:root {
    --brand-primary: #ff4500;   /* NNPH 标志红（辅助点缀色） */
    --brand-name: "nnph";
}

/* 统一修改品牌样式类 */
.nnph-logo { content: url('../img/logo-nnph.webp'); }
.footer-nnph-text { color: var(--accent-color); }

/* ==========================================
   2. 全局重置与基础样式 (Global Reset & Base)
   ========================================== */
* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    background: var(--bg-gradient) !important;
    color: var(--text-main) !important;
    line-height: 1.7;
    margin: 0;
    padding: 20px 10px;
    -webkit-font-smoothing: antialiased;
}

/* 主布局 */
.main-wrapper {
    max-width: 850px;
    margin: 0 auto;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 15px 35px var(--card-shadow);
}

header { text-align: center; }

/* 容器内部清理 */
.container, .about-section, .faq-section, .game-container, .download-section, .features-section {
    background: transparent !important;
}

/* ==========================================
   3. 排版与色彩绑定 (Typography & Color Bindings)
   ========================================== */
h1, h2, h3, .logo { 
    color: var(--accent-color) !important; 
    font-weight: 800;
}

p, li, .faq-item span, #score-display { 
    color: var(--text-main) !important; 
}

strong { 
    color: var(--text-white) !important; 
}

/* 链接统一颜色 */
a { 
    color: var(--accent-color) !important; 
    text-decoration: none; 
    transition: 0.3s ease; 
}
a:hover { 
    text-decoration: underline; 
    opacity: 0.9; 
    color: var(--text-white) !important;
}

/* ==========================================
   4. 按钮风格 (Button Stylings)
   ========================================== */
/* NNPH 强引导主转化按钮 */
.btn {
    background: var(--accent-color) !important; /* 经典璀璨金 */
    color: var(--text-dark) !important; /* 配合深色字，保证极佳可读性 */
    padding: 13px 26px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.35);
    cursor: pointer;
}

.btn:hover {
    background: var(--text-white) !important;
    color: var(--text-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.5);
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
}

/* 辅助/登录按钮 */
.btn-login {
    background: transparent !important;
    border: 2px solid var(--accent-color) !important;
    color: var(--accent-color) !important;
    box-shadow: none;
}

.btn-login:hover {
    background: var(--accent-color) !important;
    color: var(--text-dark) !important;
}

/* 游戏激活按钮 */
.btn-game { 
    background: var(--accent-color) !important;
    color: var(--text-dark) !important;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 800;
    cursor: pointer;
    margin-bottom: 10px !important; 
    width: auto !important; 
    transition: all 0.2s ease;
}

.btn-game:hover {
    background: var(--text-white) !important;
    transform: scale(1.03);
}

/* 了解更多详情链接按钮 */
.btn-details { 
    margin-top: 5px !important; 
    display: block; 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    color: var(--text-main) !important;
    padding: 6px 12px; 
    border-radius: 6px; 
    font-size: 13px;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-details:hover {
    border-color: var(--accent-color);
    color: var(--accent-color) !important;
    text-decoration: none;
}

/* ==========================================
   5. 游戏卡片与画廊布局 (Game Cards & Galleries)
   ========================================== */
.game-item {
    display: flex !important;
    align-items: center;
    gap: 20px;
    padding: 20px !important;
    text-align: left !important;
    background: var(--item-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 16px;
    margin-bottom: 15px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.game-item:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 204, 0, 0.2) !important;
}

/* 图片适配 */
.game-item img, .download-section img {
    width: 120px !important;
    height: 120px !important;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

/* 优化游戏介绍文字 */
.game-desc {
    font-size: 14px;
    color: #94a3b8 !important; /* 次要文字略暗 */
    margin: 8px 0;
    line-height: 1.6;
}

/* 游戏画廊布局 */
.game-gallery {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 20px 0;
}

.game-gallery img {
    width: 32%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.game-gallery img:hover {
    transform: scale(1.03);
}

/* ==========================================
   6. 信任证章 (Trust Badges)
   ========================================== */
.trust-badges { 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    margin: 20px 0; 
}

.badge-card { 
    display: flex; 
    align-items: center; 
    justify-content: flex-start; 
    gap: 15px; 
    background: var(--item-bg); 
    padding: 16px; 
    border-radius: 12px; 
    border: 1px solid var(--card-border);
}

.badge-card svg {
    color: var(--accent-color); /* SVG 图标使用金黄色 */
}

/* ==========================================
   7. 翻牌游戏网格 (Memory Match Mini-game)
   ========================================== */
.memory-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 50px) !important;
    gap: 8px !important;
    margin: 15px auto !important;
    width: 108px !important;
    justify-content: center;
}

.card-box { 
    width: 50px; 
    height: 50px; 
    background: #142c33; 
    color: var(--text-white); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 6px; 
    cursor: pointer; 
    border: 1px solid rgba(255,255,255,0.08);
    transition: background 0.2s ease;
}

.card-box:hover {
    background: #1f424c;
}

/* ==========================================
   8. FAQ 列表样式 (FAQ Elements)
   ========================================== */
.faq-list { 
    list-style: none !important; 
    padding: 0 !important; 
    margin: 20px 0;
}

.faq-item { 
    background: var(--item-bg) !important; 
    padding: 20px; 
    margin-bottom: 15px; 
    border-radius: 15px; 
    border: 1px solid var(--card-border);
    transition: 0.3s;
}

.faq-item:hover {
    border-color: rgba(255, 204, 0, 0.15);
}

.faq-question { 
    font-weight: 800; 
    color: var(--accent-color) !important; 
    display: flex; 
    align-items: center; 
    gap: 12px;
    font-size: 17px;
    margin-bottom: 10px;
}

.faq-icon {
    background: var(--accent-color);
    color: var(--text-dark);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.faq-answer { 
    color: var(--text-main) !important; 
    line-height: 1.6; 
    padding-left: 36px;
    font-size: 15px;
    opacity: 0.95;
}

/* ==========================================
   9. Logo 容器样式 (Logo Stylings)
   ========================================== */
.logo-link {
    display: block;
    text-align: center;
}

.site-logo {
    max-width: 200px;  
    width: 100%;       
    height: auto;      
    display: inline-block;
    vertical-align: middle;
}

/* ==========================================
   10. 响应式适配 (Responsive Adaptations)
   ========================================== */
@media (max-width: 600px) {
    .main-wrapper { 
        border-radius: 0 !important; 
        padding: 16px;
    }
    
    .btn-group { 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
        gap: 12px; 
        width: 100%;
    }
    
    .btn { 
        width: 100%; 
    }

    .game-item {
        flex-direction: column; 
        text-align: center;
        padding: 20px !important;
    }

    .game-item img {
        width: 100% !important;
        height: 180px !important; 
        margin-bottom: 15px;
    }

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

    .btn-group {
        flex-direction: column; 
        gap: 8px;
    }

    .btn-game, .btn-details {
        width: 100% !important; 
        margin: 0 !important;
    }

    .memory-grid {
        margin: 15px auto !important;
    }

    .game-gallery {
        flex-direction: column;
    }
    
    .game-gallery img {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (min-width: 768px) {
    .trust-badges { 
        flex-direction: row; 
    }
    
    .badge-card { 
        flex: 1; 
        justify-content: center; 
    }
    
    .download-section { 
        display: flex !important; 
        align-items: center; 
        justify-content: center; 
        gap: 40px; 
    }

    .site-logo {
        max-width: 280px; 
    }
}