/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* CSS 变量 - 主题配色 */
:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #e0e7ff;
  --bg-gradient-start: #0f172a;
  --bg-gradient-end: #1e293b;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.1);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --success: #10b981;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

body {
  width: 320px;
  min-height: 400px;
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  color: var(--text-primary);
  overflow: hidden;
}

.container {
  display: flex;
  flex-direction: column;
  min-height: 400px;
  padding: 20px;
}

/* 头部样式 */
.header {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  background: linear-gradient(90deg, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 主内容区 */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.5;
}

/* 统计卡片 */
.stats {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 24px;
  text-align: center;
  transition: all 0.2s ease;
}

.stat-item:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 按钮样式 */
.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: white;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), #7c3aed);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
}

/* 事件列表 */
.event-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  max-height: 180px;
  overflow-y: auto;
}

.event-list::-webkit-scrollbar {
  width: 6px;
}

.event-list::-webkit-scrollbar-track {
  background: transparent;
}

.event-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.empty-hint {
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-align: center;
  padding: 20px 0;
}

.event-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.event-item:last-child {
  border-bottom: none;
}

.event-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.event-content {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-size: 0.8rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-meta {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* 消息提示 */
.message {
  min-height: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--success);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.message.show {
  opacity: 1;
}

/* 底部样式 */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--primary);
}

.version {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.6;
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  animation: fadeIn 0.3s ease;
}

