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

:root {
    --primary: #2196f3;
    --primary-dark: #1976d2;
    --primary-light: #bbdefb;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ff9800;
    --text: #212121;
    --text-light: #757575;
    --bg: #f5f6fa;
    --card-bg: #ffffff;
    --border: #e0e0e0;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

/* ============ 首页 ============ */
.home-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.home-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2196f3 0%, #00bcd4 100%);
    z-index: 0;
}
.home-bg::before, .home-bg::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.home-bg::before { width: 500px; height: 500px; top: -150px; right: -100px; }
.home-bg::after { width: 400px; height: 400px; bottom: -120px; left: -80px; }

.home-container {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    width: 100%;
}
.home-title { color: #fff; margin-bottom: 40px; }
.home-title .logo {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.home-title h1 { font-size: 34px; font-weight: 700; letter-spacing: 3px; }
.home-title p { margin-top: 10px; opacity: 0.9; font-size: 16px; }

.home-cards {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}
.home-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 34px 30px;
    width: 320px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
    text-align: center;
}
.home-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 50px rgba(0,0,0,0.25);
}
.card-icon { font-size: 60px; margin-bottom: 18px; }
.card-title { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.card-desc { font-size: 14px; color: var(--text-light); line-height: 1.6; margin-bottom: 24px; min-height: 42px; }
.card-btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 24px;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}
.pc-card:hover { border: 2px solid transparent; }
.pc-card .card-btn { background: var(--primary); }
.mobile-card .card-btn { background: #00bcd4; }

.home-footer { margin-top: 40px; color: rgba(255,255,255,0.85); font-size: 13px; }

/* ============ 登录页 ============ */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #2196f3 0%, #00bcd4 100%);
}
.login-box {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    width: 420px;
    max-width: 100%;
    padding: 40px 36px;
}
.login-box .logo { font-size: 56px; text-align: center; margin-bottom: 8px; }
.login-box h2 { text-align: center; font-size: 24px; margin-bottom: 6px; }
.login-box .mode-tip { text-align: center; color: var(--text-light); font-size: 14px; margin-bottom: 28px; }
.login-box .mode-tip b { color: var(--primary); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; color: var(--text-light); margin-bottom: 7px; }
.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border 0.2s;
    background: #fff;
}
.form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(33,150,243,0.12); }
.form-group input::placeholder { color: #bbb; }

.login-btn {
    width: 100%;
    padding: 13px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.login-btn:hover { background: var(--primary-dark); }

.login-msg {
    text-align: center;
    color: var(--danger);
    font-size: 13px;
    min-height: 18px;
    margin-top: 12px;
}
.login-tools { text-align: center; margin-top: 16px; }
.login-tools a { color: var(--primary); font-size: 13px; }

.login-hint {
    background: #f0f7ff;
    border: 1px solid var(--primary-light);
    color: var(--primary-dark);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.7;
}

/* 通用按钮 */
.btn {
    display: inline-block;
    padding: 9px 18px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s;
    background: var(--primary);
    color: #fff;
}
.btn:hover { opacity: 0.88; }
.btn-danger { background: var(--danger); }
.btn-success { background: var(--success); }
.btn-warning { background: var(--warning); }
.btn-ghost { background: transparent; color: var(--text-light); border: 1px solid var(--border); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Toast */
.toast-wrap {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    pointer-events: none;
}
.toast {
    background: rgba(0,0,0,0.82);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    animation: toastIn 0.25s ease;
    max-width: 80vw;
}
.toast.toast-success { background: rgba(76,175,80,0.95); }
.toast.toast-error { background: rgba(244,67,54,0.95); }
.toast.toast-warning { background: rgba(255,152,0,0.95); }
@keyframes toastIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 模态框 */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal {
    background: #fff;
    border-radius: 12px;
    width: 520px;
    max-width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}
.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 { font-size: 18px; }
.modal-close {
    cursor: pointer;
    font-size: 22px;
    color: var(--text-light);
    border: none;
    background: none;
    line-height: 1;
}
.modal-body { padding: 24px; overflow-y: auto; }
.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 空状态 */
.empty {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
    font-size: 15px;
}
.empty .empty-icon { font-size: 48px; display: block; margin-bottom: 10px; }
