/* 微信端直播系统 - 全局样式 */

:root {
  --primary: #2E5395;
  --primary-dark: #1a3a6b;
  --primary-light: #4a72b8;
  --accent: #ff6b35;
  --bg-dark: #0d1b2a;
  --bg-card: #1b2d44;
  --bg-input: #0f1f35;
  --text-primary: #ffffff;
  --text-secondary: #8da5bf;
  --text-muted: #5a7088;
  --border: #2a3f5f;
  --success: #00c853;
  --warning: #ffab00;
  --danger: #ff1744;
  --radius: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; font-family: -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; }
body { background: var(--bg-dark); color: var(--text-primary); overflow-x: hidden; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* 通用按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 20px; border: none; border-radius: var(--radius); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.85; }
.btn-success { background: var(--success); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--primary-light); color: #fff; }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 输入框 */
.input, .textarea, .select { width: 100%; padding: 10px 14px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-primary); font-size: 14px; outline: none; transition: border-color 0.2s; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--primary-light); }
.textarea { resize: vertical; min-height: 80px; }

/* 卡片 */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }

/* 标签 */
.tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.tag-blue { background: rgba(46,83,149,0.3); color: var(--primary-light); }
.tag-green { background: rgba(0,200,83,0.15); color: var(--success); }
.tag-orange { background: rgba(255,107,53,0.15); color: var(--accent); }
.tag-red { background: rgba(255,23,68,0.15); color: var(--danger); }
.tag-gray { background: rgba(138,165,191,0.15); color: var(--text-secondary); }

/* 弹窗 */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay.active { display: flex; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; max-width: 500px; width: 90%; max-height: 85vh; overflow-y: auto; }
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }

/* Toast */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); padding: 10px 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; z-index: 2000; font-size: 14px; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.toast.show { opacity: 1; }
.toast-success { border-color: var(--success); color: var(--success); }
.toast-error { border-color: var(--danger); color: var(--danger); }

/* 空状态 */
.empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-icon { font-size: 48px; margin-bottom: 12px; }

/* 动画 */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.pulse { animation: pulse 1.5s infinite; }

@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.slide-up { animation: slideUp 0.3s ease-out; }

/* 网格 */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Flex工具 */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }

/* 文字工具 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 12px; }
.text-md { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 28px; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* 间距 */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
