* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

body {
    background: #f7f8fa;
}

header {
    background: #1677ff;
    color: #fff;
    padding: 15px 20px;
}

h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.nav {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.nav a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
}

.nav a:hover {
    background: rgba(255,255,255,0.2);
}

.nav a.active {
    background: rgba(255,255,255,0.3);
    font-weight: bold;
}

.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

h2 {
    color: #222;
    margin-bottom: 20px;
    border-left: 4px solid #1677ff;
    padding-left: 10px;
}

.card {
    border: 1px solid #e5e7eb;
    padding: 24px;
    border-radius: 10px;
    margin: 16px 0;
    transition: all 0.25s ease;
    cursor: pointer;
}

.card:hover {
    box-shadow: 0 4px 16px #d0e3ff;
    transform: translateY(-2px);
}

.card h3 {
    color: #1677ff;
    margin-bottom: 10px;
    font-size: 18px;
    position: relative;
    padding-right: 24px;
}

.card h3::after {
    content: "▼";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 12px;
    color: #999;
    transition: transform 0.25s;
}

.card.open h3::after {
    transform: rotate(180deg);
}

.card p {
    color: #555;
    line-height: 1.6;
}

.card-detail {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #ddd;
    color: #444;
    line-height: 1.8;
    font-size: 15px;
}

.card-detail ul {
    padding-left: 20px;
    margin: 8px 0;
}

.card-detail li {
    margin: 6px 0;
}

.card.open .card-detail {
    display: block;
}

footer {
    background: #fff;
    border-top: 1px solid #eee;
    text-align: center;
    padding: 28px 24px;
    margin-top: 60px;
    color: #999;
    font-size: 13px;
    line-height: 1.8;
}

/* ===== 导航+登录区域 ===== */
.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.auth-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.auth-loading, .auth-placeholder {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}
.auth-user {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}
.btn-auth {
    padding: 5px 16px;
    border: 1px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.btn-auth:hover {
    background: rgba(255,255,255,0.3);
}
.btn-logout {
    font-size: 12px;
    padding: 4px 10px;
}

/* ===== 登录模态框 ===== */
.auth-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-modal {
    background: #fff;
    border-radius: 12px;
    padding: 30px 28px 24px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.auth-close {
    position: absolute;
    top: 12px; right: 16px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.auth-close:hover { color: #333; }
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}
.auth-tab {
    padding: 8px 20px;
    cursor: pointer;
    color: #999;
    font-size: 15px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.auth-tab.active {
    color: #1677ff;
    border-bottom-color: #1677ff;
    font-weight: bold;
}
.auth-form input {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 12px;
    box-sizing: border-box;
}
.auth-form input:focus {
    border-color: #1677ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(22,119,255,0.15);
}
.auth-form button {
    width: 100%;
    padding: 11px;
    background: #1677ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.2s;
}
.auth-form button:hover { background: #0958d9; }
.auth-form button:disabled { background: #93c0f5; cursor: not-allowed; }
.auth-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: #1677ff;
    cursor: pointer;
}
.auth-link:hover { text-decoration: underline; }
.auth-error {
    background: #fff1f0;
    border: 1px solid #ffa39e;
    color: #cf1322;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
}
.auth-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width:768px) {
    .nav {
        gap: 12px;
    }
    h1 {
        font-size: 20px;
    }
    .nav-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    .auth-modal {
        padding: 20px 18px 16px;
    }
}
