/* 全局样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #f5f7fa; color: #333; line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* 导航栏 */
.navbar { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 100; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-size: 18px; font-weight: 600; color: #1a73e8; }
.nav-links { display: flex; gap: 24px; }
.nav-link { color: #555; font-size: 14px; transition: color 0.2s; }
.nav-link:hover { color: #1a73e8; }

/* 主内容 */
.main-content { max-width: 1200px; margin: 0 auto; padding: 24px 20px; min-height: calc(100vh - 60px); }

/* 按钮 */
.btn { padding: 10px 20px; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; transition: all 0.2s; font-weight: 500; }
.btn-primary { background: #1a73e8; color: #fff; }
.btn-primary:hover { background: #1557b0; }
.btn-secondary { background: #e8eaed; color: #333; }
.btn-secondary:hover { background: #d8dade; }
.btn-danger { background: #ea4335; color: #fff; }
.btn-danger:hover { background: #c5221f; }
.btn-success { background: #34a853; color: #fff; }
.btn-success:hover { background: #1e8e3e; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* 卡片 */
.card { background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); padding: 24px; margin-bottom: 20px; }
.card-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; color: #202124; }

/* 活动列表 */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.event-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; }
.event-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.event-cover { width: 100%; height: 180px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 32px; position: relative; }
.event-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-status { position: absolute; top: 12px; left: 12px; background: #34a853; color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 12px; }
.event-info { padding: 16px; }
.event-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: #202124; }
.event-meta { font-size: 13px; color: #666; margin-bottom: 4px; }
.event-desc { font-size: 13px; color: #888; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: #333; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 10px 12px; border: 1px solid #dadce0; border-radius: 6px; font-size: 14px; transition: border-color 0.2s; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 2px rgba(26,115,232,0.1); }
.form-textarea { min-height: 80px; resize: vertical; }
.form-hint { font-size: 12px; color: #999; margin-top: 4px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px; text-align: left; border-bottom: 1px solid #e8eaed; font-size: 14px; }
.table th { background: #f8f9fa; font-weight: 600; color: #555; }
.table tr:hover { background: #f8f9fa; }

/* 标签 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.badge-success { background: #e6f4ea; color: #1e8e3e; }
.badge-warning { background: #fef7e0; color: #b06000; }
.badge-danger { background: #fce8e6; color: #c5221f; }
.badge-info { background: #e8f0fe; color: #1967d2; }
.badge-secondary { background: #f1f3f4; color: #5f6368; }

/* 座位图 */
.seat-map-container { position: relative; width: 100%; overflow: auto; background: #fafafa; border-radius: 8px; min-height: 400px; }
.seat-map { position: relative; display: inline-block; min-width: 100%; }
.seat-map img { max-width: 100%; display: block; }
.seat { position: absolute; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; transform: translate(-50%, -50%); transition: all 0.15s; border: 2px solid transparent; }
.seat-available { background: #34a853; }
.seat-available:hover { transform: translate(-50%, -50%) scale(1.3); border-color: #fff; box-shadow: 0 0 8px rgba(52,168,83,0.6); }
.seat-selected { background: #1a73e8; border-color: #fff; box-shadow: 0 0 8px rgba(26,115,232,0.6); }
.seat-selected::after { content: '✓'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 12px; font-weight: bold; }
.seat-sold, .seat-held { background: #9aa0a6; cursor: not-allowed; }
.seat-locked { background: #dadce0; cursor: not-allowed; }
.seat-legend { display: flex; gap: 20px; margin-top: 16px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #666; }
.legend-dot { width: 16px; height: 16px; border-radius: 50%; }

/* 管理后台布局 */
.admin-layout { display: flex; gap: 20px; }
.admin-sidebar { width: 200px; background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); height: fit-content; position: sticky; top: 80px; }
.admin-menu { list-style: none; }
.admin-menu-item { padding: 10px 12px; border-radius: 6px; cursor: pointer; font-size: 14px; color: #555; margin-bottom: 4px; transition: all 0.2s; }
.admin-menu-item:hover { background: #f1f3f4; color: #1a73e8; }
.admin-menu-item.active { background: #e8f0fe; color: #1a73e8; font-weight: 500; }
.admin-content { flex: 1; min-width: 0; }

/* 登录页 */
.login-container { max-width: 400px; margin: 80px auto; }
.login-card { background: #fff; border-radius: 16px; padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.08); text-align: center; }
.login-logo { font-size: 48px; margin-bottom: 16px; }
.login-title { font-size: 22px; font-weight: 600; margin-bottom: 8px; color: #202124; }
.login-subtitle { font-size: 14px; color: #999; margin-bottom: 32px; }

/* 订单摘要 */
.order-summary { background: #f8f9fa; border-radius: 8px; padding: 16px; }
.order-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e8eaed; font-size: 14px; }
.order-item:last-child { border-bottom: none; }
.order-total { display: flex; justify-content: space-between; padding-top: 12px; margin-top: 8px; border-top: 2px solid #dadce0; font-size: 16px; font-weight: 600; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.stat-value { font-size: 32px; font-weight: 700; color: #1a73e8; }
.stat-label { font-size: 14px; color: #666; margin-top: 4px; }

/* Toast */
.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%) translateY(-20px); background: #333; color: #fff; padding: 12px 24px; border-radius: 8px; font-size: 14px; opacity: 0; transition: all 0.3s; z-index: 1000; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: #34a853; }
.toast.error { background: #ea4335; }
.toast.warning { background: #fbbc04; color: #333; }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 999; }
.modal { background: #fff; border-radius: 12px; padding: 24px; max-width: 400px; width: 90%; }
.modal h3 { font-size: 18px; margin-bottom: 12px; }
.modal p { font-size: 14px; color: #666; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* 工具类 */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-8 { margin-top: 8px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #999; }
.text-small { font-size: 12px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* 响应式 */
@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; position: static; }
  .admin-menu { display: flex; overflow-x: auto; gap: 8px; }
  .admin-menu-item { white-space: nowrap; margin-bottom: 0; }
  .event-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
