/* =========================================================
   muaaa Official Website — Windows 98/XP Classic Theme
   经典灰色 · 3D 凸起边框 · 系统字体 · 方角控件
   ========================================================= */

:root {
    /* 经典 98 配色 */
    --face: #c0c0c0;
    /* 窗口/按钮表面 */
    --face-dark: #a0a0a0;
    --highlight: #ffffff;
    /* 高光（上左亮边）*/
    --light: #dfdfdf;
    /* 次高光 */
    --shadow: #808080;
    /* 阴影（下右暗边）*/
    --dark-shadow: #404040;
    /* 外阴影 */
    --black: #000000;
    --window: #c0c0c0;
    --desktop: #008080;
    /* 经典 teal 桌面 */

    --text: #000000;
    --text-disabled: #808080;

    --title-active-1: #6e6e6e;
    /* 标题栏渐变起点（灰）*/
    --title-active-2: #9a9a9a;
    /* 标题栏渐变终点 */
    --title-text: #ffffff;

    --accent: #a01f1f;
    /* 品牌陶土色（保留）*/
    --link: #0000ee;
    --link-visited: #551a8b;

    --field-sunken: inset 1px 1px var(--shadow), inset -1px -1px var(--highlight);
}

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

html {
    scroll-behavior: smooth;
    user-select: none;
}

body {
    font-family: Tahoma, "MS Sans Serif", "Microsoft YaHei", "Segoe UI", sans-serif;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text);
    background: var(--desktop);
    padding: 12px;
    padding-bottom: 44px;
    /* 留出任务栏空间 */
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

body > .win {
    margin: 0;
}

@media (max-height: 640px) {
    body {
        align-items: flex-start;
    }
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================================================
   3D 边框工具类
   ========================================================= */
.raised {
    border: 2px solid;
    border-color: var(--highlight) var(--shadow) var(--shadow) var(--highlight);
    outline: 1px solid var(--dark-shadow);
    outline-offset: -3px;
}

.sunken {
    border: 2px solid;
    border-color: var(--shadow) var(--highlight) var(--highlight) var(--shadow);
    outline: 1px solid var(--dark-shadow);
    outline-offset: -3px;
}

/* =========================================================
   窗口 .win
   ========================================================= */
.win {
    max-width: 820px;
    margin: 0 auto 16px;
    background: var(--window);
    border: 2px solid;
    border-color: var(--highlight) var(--dark-shadow) var(--dark-shadow) var(--highlight);
    box-shadow: 2px 2px 0 var(--black);
}

/* =========================================================
   模态框 — 点击菜单后居中弹出的窗口（除首页外）
   ========================================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1000;
    padding: 24px;
}

.modal-win {
    margin: 0;
    max-width: 860px;
    width: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 3px 3px 0 var(--black);
}

.modal-win .window-body {
    overflow: auto;
    flex: 1 1 auto;
}

.modal-win .status-bar {
    flex-shrink: 0;
}

/* ── 标题栏 ── */
.title-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 3px 0 4px;
    background: linear-gradient(90deg, navy, #1084d0);
    color: var(--title-text);
    user-select: none;
}

.title-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.title-icon img {
    display: block;
}

.title-text {
    flex: 1;
    font-size: 12px;
    font-weight: bold;
    padding-left: 2px;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-controls {
    display: flex;
    gap: 2px;
}

.title-btn {
    width: 22px;
    height: 18px;
    font-size: 10px;
    font-weight: bold;
    font-family: "Marlett", Tahoma, sans-serif;
    line-height: 1;
    background: var(--face);
    border: 1px solid;
    border-color: var(--highlight) var(--shadow) var(--shadow) var(--highlight);
    outline: 1px solid var(--dark-shadow);
    outline-offset: -2px;
    color: var(--text);
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.title-btn-inactive {
    color: #878787 !important;
    background: var(--face) !important;
    pointer-events: none;
    cursor: default;
}
.title-btn:active {
    border-color: var(--shadow) var(--highlight) var(--highlight) var(--shadow);
}

.title-btn:hover {
    background: var(--accent);
    color: #fff;
}
.title-btn-inactive:hover {
    background: var(--face) !important;
    color: #878787 !important;
}

/* ── 菜单栏 ── */
.menu-bar {
    display: flex;
    gap: 0;
    padding: 2px 4px;
    background: var(--face);
    border-bottom: 1px solid var(--shadow);
}

.menu-item {
    padding: 3px 10px;
    font-size: 12px;
    color: var(--text);
    cursor: pointer;
}

.menu-item:hover {
    background: var(--accent);
    color: #fff;
}

.menu-item.active {
    background: var(--accent);
    color: #fff;
}

/* ── 窗口内容区 ── */
.window-body {
    padding: 10px;
    background: var(--face);
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

/* ── 状态栏 ── */
.status-bar {
    display: flex;
    gap: 3px;
    padding: 3px 4px;
    background: var(--face);
    border-top: 1px solid var(--highlight);
}

.status-field {
    padding: 2px 8px;
    font-size: 11px;
    color: var(--text);
    border: 1px solid;
    border-color: var(--shadow) var(--highlight) var(--highlight) var(--shadow);
    white-space: nowrap;
}

.status-wide {
    flex: 1;
}

/* =========================================================
   按钮
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 16px;
    font-size: 12px;
    font-family: inherit;
    background: var(--face);
    border: 2px solid;
    border-color: var(--highlight) var(--shadow) var(--shadow) var(--highlight);
    outline: 1px solid var(--dark-shadow);
    outline-offset: -3px;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: none;
}

.btn:hover {
    border-color: var(--highlight) var(--shadow) var(--shadow) var(--highlight);
}

.btn:active {
    border-color: var(--shadow) var(--highlight) var(--highlight) var(--shadow);
    outline-offset: -3px;
    padding: 5px 15px 3px 17px;
}

.btn-primary {
    font-weight: bold;
}

.btn-large {
    padding: 8px 32px;
    font-size: 13px;
    font-weight: bold;
}

/* =========================================================
   Fieldset 分组框
   ========================================================= */
.fieldset {
    border: 1px solid var(--shadow);
    border-top-color: var(--highlight);
    border-left-color: var(--highlight);
    padding: 12px 14px 14px;
    margin-bottom: 10px;
    background: var(--face);
}

.fieldset>legend {
    padding: 0 6px;
    font-size: 12px;
    font-weight: normal;
    color: var(--text);
}

/* =========================================================
   Hero 首页内容
   ========================================================= */
.hero-body {
    padding: 10px;
}

.hero-panel {
    padding: 28px 24px;
    background: var(--face);
    text-align: center;
}

.hero-badge {
    display: inline-block;
    font-size: 11px;
    color: var(--text);
    margin-bottom: 18px;
}

.hero-title {
    font-family: Tahoma, "Microsoft YaHei", sans-serif;
    font-size: 32px;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 14px;
    color: var(--text);
}

.hero-em {
    color: var(--accent);
}

.hero-sub {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text);
    max-width: 520px;
    margin: 0 auto 24px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 元信息条 */
.info-bar {
    display: flex;
    align-items: center;
    margin-top: 10px;
    padding: 0;
    background: var(--face);
    border: 1px solid;
    border-color: var(--shadow) var(--highlight) var(--highlight) var(--shadow);
    height: 26px;
}

.info-cell {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 16px;
    font-size: 11px;
}

.info-label {
    color: var(--text);
}

.info-val {
    font-weight: bold;
    color: var(--text);
}

.info-sep {
    width: 1px;
    height: 16px;
    background: var(--shadow);
    box-shadow: 1px 0 0 var(--highlight);
}

/* =========================================================
   Features 功能列表
   ========================================================= */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.feature-item {
    padding: 10px 12px;
    background: var(--face);
    border: 1px solid;
    border-color: var(--shadow) var(--highlight) var(--highlight) var(--shadow);
}

.feature-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.feature-num {
    font-size: 11px;
    font-weight: bold;
    color: var(--accent);
    background: var(--highlight);
    padding: 1px 5px;
    border: 1px solid var(--shadow);
}

.feature-name {
    font-size: 13px;
    font-weight: bold;
    color: var(--text);
}

.feature-text {
    font-size: 11.5px;
    line-height: 1.65;
    color: var(--text);
}

/* =========================================================
   每日 muaaa 口号区
   ========================================================= */
.muaaa-mantra {
    text-align: center;
    padding: 16px 12px 8px;
}

.muaaa-mantra p {
    font-size: 13px;
    line-height: 2;
    color: var(--text);
}

.muaaa-mantra p:first-child {
    font-size: 16px;
    font-weight: bold;
    color: var(--accent);
}

.muaaa-mantra p:last-child {
    font-size: 12px;
    color: var(--text);
    margin-top: 6px;
}

/* =========================================================
   Download 下载
   ========================================================= */
.dl-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dl-row {
    display: flex;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
    border-bottom: 1px dotted var(--shadow);
}

.dl-row:last-child {
    border-bottom: none;
}

.dl-label {
    width: 70px;
    flex-shrink: 0;
    color: var(--text);
}

.dl-value {
    color: var(--text);
    padding: 2px 6px;
}

.sunken-text {
    border: 1px solid;
    border-color: var(--shadow) var(--highlight) var(--highlight) var(--shadow);
    background: var(--window);
    padding: 2px 6px;
}

.dl-features {
    list-style: none;
    padding: 0;
}

.dl-features li {
    font-size: 12px;
    padding: 3px 0;
    color: var(--text);
    padding: 2px 8px;
    background-color: #d8d8d8;
}

.dl-actions {
    text-align: center;
    padding: 14px 0 4px;
}

.dl-hint {
    width: 100%;
    min-height: 100px;
    font-size: 11px;
    color: var(--text);
    margin-top: 10px;
    padding: 6px 10px;
    background: #e1e1e1;
    border: 1px solid var(--shadow);
    display: inline-block;
}

/* =========================================================
   About 关于
   ========================================================= */
.about-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 4px;
}

.about-logo-icon {
    width: 48px;
    height: 48px;
    background: var(--face);
    border: 2px solid;
    border-color: var(--highlight) var(--shadow) var(--shadow) var(--highlight);
    outline: 1px solid var(--dark-shadow);
    outline-offset: -3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-size: 28px;
    font-weight: bold;
    font-style: italic;
    color: var(--accent);
    flex-shrink: 0;
}

.about-logo-name {
    font-size: 22px;
    font-weight: bold;
    color: var(--text);
}

.about-logo-ver {
    font-size: 12px;
    color: var(--text);
}

.about-logo-copy {
    font-size: 11px;
    color: var(--text);
    margin-top: 2px;
}

.about-text {
    font-size: 12px;
    line-height: 1.75;
    color: var(--text);
    padding: 2px 4px;
}

/* =========================================================
   Changelog 更新记录
   ========================================================= */
.changelog-empty {
    font-size: 12px;
    color: var(--text);
    padding: 16px 4px;
    text-align: center;
}

.changelog-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.changelog-item {
    border: 1px solid var(--shadow);
    border-left: 3px solid #484848;
    background: #c5c5c5;
    padding: 10px 14px;
}

.changelog-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.changelog-ver {
    font-size: 14px;
    font-weight: bold;
    color: var(--accent);
}

.changelog-tag {
    font-size: 10px;
    padding: 1px 6px;
    border: 1px solid var(--shadow);
    color: var(--text);
}

.changelog-tag.tag-1 {
    background: #818181;
    color: #dddddd;
    border-color: #b9d0fb;
}

.changelog-tag.tag-0 {
    background: #fef3e2;
    color: #b45309;
    border-color: #f6d8a8;
}

.changelog-title {
    font-size: 13px;
    font-weight: bold;
    color: var(--text);
}

.changelog-date {
    font-size: 11px;
    color: var(--text);
    margin-left: auto;
}

.changelog-remark {
    font-family: Consolas, "Microsoft YaHei", monospace;
    font-size: 11px;
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
    margin: 8px 0 0;
    padding: 6px 8px;
    background: var(--face);
    border: 1px solid var(--shadow);
}

.link {
    color: var(--link);
    text-decoration: underline;
}

.link:hover {
    color: var(--accent);
}

/* =========================================================
   任务栏（底部固定）
   ========================================================= */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: var(--face);
    border-top: 2px solid var(--highlight);
    box-shadow: 0 -1px 0 var(--dark-shadow);
    display: flex;
    align-items: center;
    padding: 2px 3px;
    gap: 3px;
    z-index: 999;
}

/* 开始按钮 */
.start-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 26px;
    padding: 0 8px 0 4px;
    font-size: 12px;
    font-weight: bold;
    background: var(--face);
    border: 2px solid;
    border-color: var(--highlight) var(--shadow) var(--shadow) var(--highlight);
    outline: 1px solid var(--dark-shadow);
    outline-offset: -3px;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}

.start-btn:active {
    border-color: var(--shadow) var(--highlight) var(--highlight) var(--shadow);
}

.start-logo {
    width: 18px;
    height: 18px;
    background: var(--accent);
    color: #fff;
    font-family: Georgia, serif;
    font-size: 13px;
    font-weight: bold;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--dark-shadow);
}

.task-divider {
    width: 2px;
    height: 22px;
    background: var(--shadow);
    box-shadow: 1px 0 0 var(--highlight);
    flex-shrink: 0;
    margin: 0 2px;
}

/* 任务项 */
.task-items {
    display: flex;
    gap: 3px;
    flex: 1;
    overflow: hidden;
}

.task-item {
    display: flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    font-size: 11.5px;
    background: var(--face);
    border: 2px solid;
    border-color: var(--highlight) var(--shadow) var(--shadow) var(--highlight);
    outline: 1px solid var(--dark-shadow);
    outline-offset: -3px;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.task-item:hover {
    color: var(--accent);
}

.task-item.active {
    border-color: var(--shadow) var(--highlight) var(--highlight) var(--shadow);
    background: var(--face-dark);
    font-weight: bold;
}

/* 系统托盘 */
.system-tray {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 8px;
    background: var(--face);
    border: 1px solid;
    border-color: var(--shadow) var(--highlight) var(--highlight) var(--shadow);
    flex-shrink: 0;
}

.tray-icon {
    font-size: 14px;
    cursor: pointer;
}

.tray-time {
    font-size: 11.5px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

/* =========================================================
   首页最新版本角标 & 逛集市按钮
   ========================================================= */
.hero-ver {
    margin-top: 16px;
    padding: 10px 14px;
    font-size: 12px;
    background: var(--face);
    border: 1px solid;
    border-color: var(--shadow) var(--highlight) var(--highlight) var(--shadow);
    box-shadow: inset 1px 1px var(--light), inset -1px -1px var(--face-dark);
}

.hero-ver-dot {
    display: inline-block;
    margin-right: 6px;
    color: var(--accent);
    font-weight: bold;
}

.hero-ver b {
    font-weight: bold;
}

.hero-ver-date {
    margin-left: 8px;
    color: var(--text);
    opacity: 0.75;
}

/* =========================================================
   插件集市
   ========================================================= */
.plugin-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 2px;
}

.plugin-cat {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    color: var(--text);
    text-decoration: none;
    background: var(--face);
    border: 1px solid;
    border-color: var(--highlight) var(--shadow) var(--shadow) var(--highlight);
}

.plugin-cat:hover {
    text-decoration: underline;
}

.plugin-cat.active {
    background: var(--highlight);
    border-color: var(--shadow) var(--highlight) var(--highlight) var(--shadow);
    box-shadow: var(--field-sunken);
    padding: 4px 11px;
}

/* 插件列表 */
.plugin-empty {
    padding: 40px 0;
    text-align: center;
    color: var(--text);
    opacity: 0.7;
}

.plugin-empty-text {
    margin-top: 10px;
    font-size: 12.5px;
}

.loading-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2px solid var(--shadow);
    border-top-color: var(--accent);
    border-right-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

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

.plugin-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plugin-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
    background: var(--face);
    border: 1px solid;
    border-color: var(--highlight) var(--shadow) var(--shadow) var(--highlight);
    box-shadow: inset 1px 1px var(--light), inset -1px -1px var(--face-dark);
}

.plugin-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid;
    border-color: var(--shadow) var(--highlight) var(--highlight) var(--shadow);
    box-shadow: var(--field-sunken);
}

.plugin-icon-block {
    font-size: 26px;
    font-weight: bold;
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--accent);
    font-style: italic;
}

.plugin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
}

.plugin-row-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.plugin-name {
    font-size: 14px;
    font-weight: bold;
}

.plugin-cat-tag {
    font-size: 11px;
    padding: 1px 6px;
    background: #ffffff;
    border: 1px solid var(--shadow);
    color: var(--text);
}

.plugin-ver-tag {
    font-size: 11px;
    padding: 1px 6px;
    background: var(--face);
    border: 1px solid;
    border-color: var(--shadow) var(--highlight) var(--highlight) var(--shadow);
    color: var(--text);
    font-family: 'Courier New', monospace;
}

.plugin-coin {
    font-size: 11px;
    padding: 1px 6px;
    background: var(--accent);
    color: #ffffff;
    border: 1px solid var(--dark-shadow);
    font-weight: bold;
}

.plugin-coin.free {
    background: #008000;
    border-color: #004000;
}

.plugin-descr {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text);
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.plugin-meta {
    display: flex;
    gap: 14px;
    font-size: 11.5px;
    color: var(--text);
    opacity: 0.8;
}

.plugin-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.btn-small {
    padding: 4px 10px !important;
    font-size: 11.5px !important;
    line-height: 1.4 !important;
}

/* 更新亮点列表 */
.plugin-updates {
    padding: 6px 4px 4px 18px;
    margin: 0;
}

.plugin-updates li {
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--text);
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 640px) {
    body {
        padding: 6px;
        padding-bottom: 44px;
    }

    .win {
        margin-bottom: 10px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-panel {
        padding: 20px 14px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .menu-item {
        padding: 3px 6px;
        font-size: 11px;
    }

    .task-item {
        max-width: 80px;
        padding: 0 6px;
        font-size: 10px;
    }

    .start-btn span:last-child {
        display: none;
    }

    .about-logo {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .plugin-row {
        flex-wrap: wrap;
    }

    .plugin-action {
        width: 100%;
        justify-content: flex-end;
    }

    .plugin-main {
        width: calc(100% - 56px - 12px);
    }
}