/* 卡密代理系统 - 全局样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f5f6fa; color: #333; line-height: 1.6; }

/* 导航栏 */
.navbar { background: #2c3e50; padding: 0 20px; position: sticky; top: 0; z-index: 1000; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.navbar .logo { color: #fff; font-size: 20px; font-weight: bold; text-decoration: none; padding: 14px 0; }
.navbar .nav-links { display: flex; align-items: center; gap: 5px; }
.navbar .nav-links a { color: #ddd; text-decoration: none; padding: 14px 12px; font-size: 14px; transition: color 0.2s; }
.navbar .nav-links a:hover { color: #fff; }
.navbar .user-info { color: #aaa; font-size: 13px; padding: 0 10px; }
.navbar .btn-logout { color: #e74c3c !important; }
.navbar .menu-toggle { display: none; color: #fff; font-size: 24px; cursor: pointer; }
.admin-nav { background: #1a252f; }

/* 容器 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.main-content { padding: 20px 0; min-height: calc(100vh - 120px); }

/* 卡片 */
.card { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); padding: 20px; margin-bottom: 20px; }
.card-title { font-size: 18px; font-weight: 600; margin-bottom: 15px; color: #2c3e50; border-bottom: 1px solid #eee; padding-bottom: 10px; }

/* 表单 */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-size: 14px; color: #555; font-weight: 500; }
.form-control { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; transition: border-color 0.2s; }
.form-control:focus { outline: none; border-color: #3498db; box-shadow: 0 0 0 3px rgba(52,152,219,0.1); }
textarea.form-control { min-height: 100px; resize: vertical; }

/* 按钮 */
.btn { display: inline-block; padding: 10px 20px; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; text-decoration: none; transition: all 0.2s; text-align: center; }
.btn-primary { background: #3498db; color: #fff; }
.btn-primary:hover { background: #2980b9; }
.btn-success { background: #27ae60; color: #fff; }
.btn-success:hover { background: #219a52; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-warning { background: #f39c12; color: #fff; }
.btn-warning:hover { background: #d68910; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { display: block; width: 100%; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.table th { background: #f8f9fa; padding: 12px 15px; text-align: left; font-size: 13px; color: #555; font-weight: 600; border-bottom: 2px solid #eee; }
.table td { padding: 12px 15px; font-size: 13px; border-bottom: 1px solid #f0f0f0; }
.table tr:hover { background: #f8f9fa; }
.table-responsive { overflow-x: auto; }

/* 徽章 */
.badge { display: inline-block; padding: 3px 8px; border-radius: 12px; font-size: 12px; color: #fff; }
.badge-success { background: #27ae60; }
.badge-warning { background: #f39c12; }
.badge-danger { background: #e74c3c; }
.badge-info { background: #3498db; }
.badge-secondary { background: #95a5a6; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); text-align: center; }
.stat-card .stat-value { font-size: 28px; font-weight: bold; color: #2c3e50; }
.stat-card .stat-label { font-size: 13px; color: #888; margin-top: 5px; }

/* 登录/注册页面 */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.auth-box { background: #fff; border-radius: 12px; padding: 40px; width: 100%; max-width: 420px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.auth-box h2 { text-align: center; margin-bottom: 25px; color: #2c3e50; }
.auth-box .form-control { margin-bottom: 15px; }
.auth-box .btn { margin-top: 10px; }
.auth-box .switch-link { text-align: center; margin-top: 15px; font-size: 14px; }
.auth-box .switch-link a { color: #3498db; text-decoration: none; }

/* 提示消息 */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 15px; font-size: 14px; }
.alert-info { background: #e3f2fd; color: #1976d2; border: 1px solid #bbdefb; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.alert-danger { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.alert-warning { background: #fff3e0; color: #e65100; border: 1px solid #ffe0b2; }

/* 分页 */
.pagination { display: flex; gap: 5px; justify-content: center; margin-top: 20px; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid #ddd; border-radius: 4px; text-decoration: none; color: #333; font-size: 14px; }
.pagination .active { background: #3498db; color: #fff; border-color: #3498db; }

/* 页脚 */
.footer { background: #2c3e50; color: #aaa; text-align: center; padding: 20px 0; font-size: 13px; }

/* 响应式 */
@media (max-width: 768px) {
    .navbar .nav-links { display: none; flex-direction: column; position: absolute; top: 50px; left: 0; right: 0; background: #2c3e50; padding: 10px; }
    .navbar .nav-links.show { display: flex; }
    .navbar .menu-toggle { display: block; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .table-responsive { font-size: 12px; }
}

/* 价格标签 */
.price-tag { font-size: 18px; font-weight: bold; color: #e74c3c; }
.price-original { text-decoration: line-through; color: #999; font-size: 13px; margin-left: 5px; }

/* 卡密展示 */
.card-key { background: #f8f9fa; border: 1px dashed #ddd; padding: 15px; border-radius: 6px; font-family: monospace; font-size: 16px; letter-spacing: 1px; margin: 10px 0; word-break: break-all; }
