/* ============================================================
   去AI写作 — 用户端基础样式（极简白色风格，移动端优先）
   ============================================================ */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
        Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #fff;
    min-height: 100vh;
}

a {
    color: #2563eb;
    text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ---------------- 顶部导航 ---------------- */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 50;
}
.nav-brand {
    font-size: 18px;
    font-weight: 600;
    color: #111;
}
.nav-brand a { color: #111; }
.nav-brand a:hover { text-decoration: none; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links li { display: inline-flex; align-items: center; }
.nav-points {
    color: #f59e0b;
    font-weight: 600;
}
.nav-badge {
    position: relative;
}
.nav-badge::after {
    content: "";
    position: absolute;
    top: -2px;
    right: -10px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #333;
}

/* ---------------- 公告横幅 ---------------- */
.announcement {
    background: #fef3c7;
    color: #92400e;
    padding: 10px 24px;
    text-align: center;
    border-bottom: 1px solid #fde68a;
    position: relative;
}
.announcement .close-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #92400e;
}

/* ---------------- 主容器 ---------------- */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px;
}

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    transition: background .15s ease;
}
.btn:hover { background: #1d4ed8; text-decoration: none; color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-secondary { background: #fff; color: #333; border-color: #d1d5db; }
.btn-secondary:hover { background: #f9fafb; color: #333; }

.btn-danger { background: #ef4444; }
.btn-danger:hover { background: #dc2626; }

.btn-link {
    background: none;
    border: none;
    color: #2563eb;
    padding: 0;
    cursor: pointer;
    font: inherit;
}
.btn-link:hover { text-decoration: underline; }

/* ---------------- 表单 ---------------- */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-size: 13px;
}
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: border-color .15s ease;
}
.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
textarea.form-control {
    min-height: 240px;
    resize: vertical;
}

/* ---------------- 卡片 / 提示 ---------------- */
.card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    margin-bottom: 16px;
}
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}
.alert-info    { background: #dbeafe; color: #1e40af; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-error   { background: #fee2e2; color: #991b1b; }

/* ---------------- 表格 ---------------- */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.table th, .table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    text-align: left;
    font-size: 13px;
}
.table th {
    background: #f9fafb;
    color: #555;
    font-weight: 500;
}

/* ---------------- 状态标签 ---------------- */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
}
.tag-pending     { background: #9ca3af; }
.tag-processing  { background: #3b82f6; }
.tag-done        { background: #10b981; }
.tag-failed      { background: #ef4444; }
.tag-reviewing   { background: #f59e0b; }
.tag-refunded    { background: #8b5cf6; }
.tag-cancelled   { background: #d1d5db; color: #555; }

/* ---------------- 页脚 ---------------- */
.footer {
    margin-top: 48px;
    padding: 24px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #999;
    font-size: 13px;
}
.footer a { color: #666; margin: 0 8px; }

/* ---------------- 移动端 ---------------- */
@media (max-width: 640px) {
    .container { padding: 16px; }
    .nav { padding: 0 16px; }

    .nav-toggle { display: inline-flex; }
    .nav-links {
        position: absolute;
        top: 56px;
        right: 0;
        left: 0;
        background: #fff;
        border-bottom: 1px solid #eee;
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px;
        gap: 12px;
        display: none;
    }
    .nav-links.open { display: flex; }

    .table th, .table td { padding: 8px 6px; font-size: 12px; }
}
