@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@100..900&display=swap');

@font-face {
    font-family: 'MYAPLE';
    src: url('/CSS/MapleMono-Regular.ttf.woff2') format('woff2'),
        url('/CSS/MapleMono-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-family: 'Maple Mono NF CN', 'MYAPLE', 'Noto Sans Mono', 'Courier New', monospace;
    --font-size: 16px;
    --line-height: 1.6;
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #00ffff;
    --warn-color: #ffff00;
    --error-color: #ff0000;
    --button-bg: #ffffff;
    --button-text: #000000;
}

body.dark-theme {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #00ffff;
    --button-bg: #ffffff;
    --button-text: #000000;
}

body.light-theme {
    --bg-color: #ffffff;
    --text-color: #000000;
    --accent-color: #0000ff;
    --button-bg: #000000;
    --button-text: #ffffff;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: var(--line-height);
    font-size: var(--font-size);
    padding: 0;
    min-height: 100vh;
}

html {
    width: 100%;
    height: 100%;
}

pre,
code {
    font-family: var(--font-family);
    font-size: var(--font-size);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 主内容区 */
.output-area {
    padding: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.console-button {
    color: var(--text-color);
    cursor: pointer;
    text-decoration: none;
    border: none;
    padding: 4px 8px;
    font-family: var(--font-family);
    font-size: var(--font-size);
    background-color: transparent;
    font-weight: normal;
    -webkit-user-select: none;
    user-select: none;
    transition: all 0.1s;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}

.console-button.active:not(.external-link) {
    color: var(--accent-color);
    font-weight: bold;
}

.console-button:active {
    opacity: 0.7;
}

/* 导航菜单 */
.nav-menu {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--text-color);
}

.nav-menu-title {
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 10px;
}

.terminal-output {
    white-space: pre-wrap;
    word-wrap: break-word;
}



/* 浮动主题按钮 */
.theme-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 12px;
    border: 2px solid var(--button-text);
    background-color: var(--button-bg);
    color: var(--button-text);
    font-family: var(--font-family);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 999;
    transition: all 0.3s ease;
    -webkit-user-select: none;
    user-select: none;
    white-space: nowrap;
}

.theme-toggle-btn:active {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .theme-toggle-btn {
        font-size: 10px;
        padding: 8px 10px;
        bottom: 15px;
        right: 15px;
    }

    :root {
        --font-size: 14px;
    }
}

@media (max-width: 480px) {
    :root {
        --font-size: 12px;
    }

    .console-button {
        padding: 3px 6px;
        font-size: 11px;
    }
}

#home_content,
#about_content,
#update_content,
#ots_content {
    display: none;
}

.zhushi {
    color: #6a9955;
    /* VS Code 注释绿 */
}

/* 链接样式：与按钮配色一致、无下划线，随主题切换 */
a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.15s ease, opacity 0.15s ease;
    cursor: pointer;
}

a:visited {
    color: var(--text-color);
}

a:hover {
    color: var(--accent-color);
    outline: none;
}

a:active {
    opacity: 0.7;
}