* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: #f5f5f5; color: #333; padding-top: 56px; }

/* 导航栏 */
.navbar { background: #1a1a2e; padding: 0 20px; display: flex; align-items: center; height: 56px; position: fixed; top: 0; left: 0; right: 0; z-index: 999; }
.nav-brand { color: #fff; font-size: 18px; font-weight: 600; margin-right: 40px; cursor: default; }
.nav-brand .brand-sub { display: none; font-weight: 400; font-size: 14px; opacity: 0.8; }
.nav-brand:hover .brand-sub,
.nav-brand:focus-within .brand-sub { display: inline; }
.nav-menu { list-style: none; display: flex; gap: 20px; flex: 1; }
.nav-menu a { color: #ccc; text-decoration: none; font-size: 14px; transition: color 0.2s; }
.nav-menu a:hover { color: #fff; }
.nav-user { margin-left: auto; display: flex; align-items: center; gap: 12px; color: #aaa; font-size: 13px; }
.nav-user a { color: #4fc3f7; text-decoration: none; font-size: 13px; }
.nav-user a:hover { color: #81d4fa; }

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

/* 卡片 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-bottom: 30px; }
.card { background: #fff; border-radius: 8px; padding: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.card h3 { color: #666; font-size: 14px; margin-bottom: 10px; }
.card-value { font-size: 32px; font-weight: 700; color: #1a1a2e; }
.card-label { font-size: 12px; color: #999; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.feature-item { background: #fff; border-radius: 8px; padding: 24px; text-decoration: none; color: #333; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: transform 0.2s; }
.feature-item:hover { transform: translateY(-2px); }
.feature-item h4 { color: #1a1a2e; margin-bottom: 8px; }
.feature-item p { color: #666; font-size: 14px; }

/* 通用 */
.section { background: #fff; border-radius: 8px; padding: 24px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.section h3 { margin-bottom: 16px; color: #1a1a2e; }

.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-row input, .form-row select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.form-row input { flex: 1; min-width: 150px; }
button {padding: 8px 20px;background: #1a1a2e; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; transition: background 0.2s; }
button:hover { background: #2d2d5e; }

.btn-group { display: flex; gap: 10px; margin-bottom: 16px; }

.result-area { margin-top: 16px; background: #1e1e1e; color: #0f0; padding: 16px; border-radius: 4px; font-family: 'Consolas', monospace; font-size: 13px; white-space: pre-wrap; max-height: 400px; overflow-y: auto; }

.data-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.data-table th { background: #1a1a2e; color: #fff; padding: 10px; text-align: left; font-size: 13px;min-width:58px; }
.data-table td { padding: 10px; border-bottom: 1px solid #eee; font-size: 13px; }
.data-table tbody tr:hover { background: #f9f9f9; }

.footer { text-align: center; padding: 20px; color: #999; font-size: 12px; }

/* ========== +号下拉菜单 ========== */
.plus-menu-overlay { position:fixed;top:0;left:0;width:100%;height:100%;z-index:9998; }
.plus-menu-dropdown { position:absolute;top:48px;right:10px;background:#fff;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,0.18);min-width:140px;padding:6px 0;z-index:9999;animation:plusIn 0.15s ease; }
@keyframes plusIn { from{opacity:0;transform:translateY(-6px);} to{opacity:1;transform:translateY(0);} }
.plus-menu-item { display:block;padding:12px 20px;font-size:14px;color:#333;text-decoration:none;cursor:pointer;white-space:nowrap; }
.plus-menu-item:hover { background:#f5f5f5; }
.plus-menu-item .plus-icon { display:inline-block;width:22px;text-align:center;margin-right:8px;font-size:16px; }

/* ========== 弹窗 ========== */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.modal-content { background: #fff; border-radius: 12px; width: 95%; max-width: 600px; max-height: 85vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid #eee; }
.modal-header h3 { margin: 0; color: #1a1a2e; font-size:16px; }
.modal-close { background: none; border: none; font-size: 24px; color: #999; cursor: pointer; padding: 0 8px; }
.modal-close:hover { color: #333; }
.modal-body { padding: 10px 16px; overflow-y: auto; flex: 1; }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }
.form-group input, .form-group select { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }

.income { color: #27ae60; font-weight: 600; }
.expense { color: #e74c3c; font-weight: 600; }

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
    .navbar { height: auto; min-height: 56px; padding: 10px 12px; flex-wrap: wrap; gap: 6px; }
    body { padding-top: 56px; }
    .nav-brand { font-size: 16px; margin-right: 0; }
    .nav-menu { gap: 10px; flex-wrap: wrap; }
    .nav-menu a { font-size: 13px; }
    .nav-user { margin-left: auto; font-size: 12px; }

    .container { margin: 10px auto; padding: 0 10px; }

    .card-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .card { padding: 16px; }
    .card-value { font-size: 24px; }
    .card h3 { font-size: 13px; }

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

    .section { padding: 16px; }

    .form-row { flex-direction: column; }
    .form-row input { width: 100%; min-width: auto; }
 
    .data-table { font-size: 11px; }
    .data-table th, .data-table td { padding: 6px 8px; }

    /* 兑换中心 header */
    .exchange-header { grid-template-columns: 1fr !important; }
}
