/* ===== 入口页（第一页）主题变量 ===== */
:root {
    --bg-main: #f3f1ea;
    --text-main: #4a4a4a;

    --card-bg: #ffffff;
    --card-hover: #faf8f3;

    --btn-bg: #8a7a66;
    --btn-hover: #9a8a76;
    --btn-text: #ffffff;

    --icon-bg: rgba(255, 255, 255, 0.18);

    --theme-toggle-color: #ffa500;
}

[data-theme="dark"] {
    --bg-main: #1f1f1f;
    --text-main: #e0e0e0;

    --card-bg: #2c2c2c;
    --card-hover: #353535;

    --btn-bg: #4a4a4a;
    --btn-hover: #5a5a5a;
    --btn-text: #ffffff;

    --icon-bg: rgba(255, 255, 255, 0.12);

    --theme-toggle-color: #f1c40f;
}

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

body {
    font-family: "Clear Sans", "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    touch-action: manipulation;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== 控制按钮（返回 / 主题）===== */
.control-button {
    position: fixed;
    top: 20px;
    background: var(--btn-bg);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    z-index: 1000;
    transition: background-color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.control-button:hover {
    background: var(--btn-hover);
}

#back-button {
    left: 20px;
    color: var(--btn-text);
}

#theme-button {
    right: 20px;
    color: var(--theme-toggle-color);
}

/* ===== 入口容器 ===== */
.home-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 24px 20px;
    text-align: center;
}

.home-header {
    margin-bottom: 28px;
}

.home-header h1 {
    font-size: 48px;
    font-weight: bold;
    margin: 0;
    color: var(--text-main);
}

.subtitle {
    margin-top: 8px;
    font-size: 15px;
    opacity: 0.8;
}

/* ===== 入口按钮 ===== */
.entry-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.entry-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    text-align: left;
    background: var(--card-bg);
    color: var(--text-main);
    border: none;
    border-radius: 14px;
    padding: 18px 20px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: background-color 0.2s ease, transform 0.12s ease;
}

.entry-btn:hover {
    background: var(--card-hover);
    transform: translateY(-2px);
}

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

.entry-icon {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: var(--btn-bg);
    color: var(--btn-text);
}

.entry-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.entry-title {
    font-size: 18px;
    font-weight: bold;
}

.entry-desc {
    font-size: 13px;
    opacity: 0.78;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .home-header h1 { font-size: 38px; }
    .entry-btn { padding: 14px 16px; gap: 14px; }
    .entry-icon { width: 46px; height: 46px; font-size: 19px; }
    .entry-title { font-size: 16px; }
    .control-button { width: 44px; height: 44px; font-size: 18px; }
}
