:root {
    --bg-color: #f8f9fa;
    --text-main: #333333;
    --text-sub: #666666;
    --card-bg: #ffffff;
    --accent-color: #007bff;
    --border-color: #e9ecef;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.4;
}

/* === 1. 顶部 Hero 区域 (极度压缩) === */
.hero-section {
    text-align: center;
    /* 上下内边距压到极限 */
    padding: 15px 10px 5px;
    background-color: #fff;
}

.hero-section h1 {
    /* 标题再小一点 */
    font-size: 1.5rem;
    margin: 0 0 5px 0;
    color: #222;
    letter-spacing: -0.5px;
}

.hero-section p {
    color: var(--text-sub);
    font-size: 0.85rem;
    margin: 0;
    display: none;
    /* 如果觉得还不够扁，可以把这行注释解开，隐藏副标题 */
}

/* === 2. 导航卡片区域 (横向胶囊布局) === */
.quick-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 10px 20px;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    /* 连成一体 */
    border-bottom: 1px solid var(--border-color);
    /* 放在这里做分割 */
}

.nav-card {
    /* ★ 核心修改：改为左右横排 ★ */
    display: flex;
    flex-direction: row;
    align-items: center;

    width: auto;
    min-width: 180px;
    flex: 1;
    /* 自适应宽度 */
    max-width: 280px;

    background: var(--card-bg);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);

    /* 内边距改小 */
    padding: 8px 12px;
}

.nav-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

/* 图片区变身为左侧小图标 */
.card-img {
    width: 40px;
    height: 40px;
    background-color: #e3f2fd;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    margin-right: 12px;
    /* 图标和文字的间距 */
    flex-shrink: 0;
    /* 防止图标被挤扁 */
}

.nav-card:nth-child(2) .card-img {
    background-color: #e8f5e9;
}

.nav-card:nth-child(3) .card-img {
    background-color: #fff3e0;
}

/* 右侧文字容器 */
.card-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    /* 强制左对齐 */
}

.nav-card h3 {
    margin: 0;
    color: #222;
    font-size: 0.9rem;
    font-weight: 700;
}

.nav-card p {
    text-align: left;
    color: var(--text-sub);
    margin: 2px 0 0 0;
    font-size: 0.75rem;
    white-space: nowrap;
    /* 描述不换行 */
}

/* 分割线 - 移除，因为 Nav 底部已经加了边框 */
.divider {
    display: none;
}

/* === 3. 内嵌区域 === */
.embed-section {
    max-width: 1000px;
    margin: 20px auto 60px auto;
    /* 顶部间距 20px */
    padding: 0 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.section-header h2 {
    font-size: 1.2rem;
    /* 标题再次缩小 */
    color: #333;
    position: relative;
    padding-left: 10px;
    margin: 0;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.new-tab-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 12px;
    background-color: #e7f1ff;
    transition: background 0.2s;
}

.new-tab-link:hover {
    background-color: #d0e1fd;
}

/* === 游戏容器 === */
.game-container {
    width: 100%;
    height: 600px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #fff;
    box-shadow: var(--shadow);
}

.game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* === 加载占位符 === */
.placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    background-image:
        linear-gradient(#e5e5e5 1px, transparent 1px),
        linear-gradient(90deg, #e5e5e5 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: center center;
}

.placeholder p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 15px;
    font-weight: 500;
}

.load-btn {
    padding: 8px 24px;
    font-size: 0.95rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: default;
    /* 改为默认指针，因为现在自动加载 */
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
    font-weight: 600;
}

.tip {
    margin-top: 10px;
    font-size: 0.75rem;
    color: #999;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-top: 1px solid var(--border-color);
    color: var(--text-sub);
    font-size: 0.8rem;
}