* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #16213e;
  --bg-card: #1a1a2e;
  --accent: #00d4ff;
  --text: #eee;
  --text-muted: #888;
  --fire: #ff6b6b;
  --water: #4dabf7;
  --earth: #a9845b;
  --wind: #69db7c;
  --light: #fff066;
  --dark: #9775fa;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  min-height: 100vh;
}

.navbar {
  background: var(--bg-secondary);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333;
}

.nav-brand a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--accent);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 20px;
  border-left: 1px solid #333;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  text-align: center;
  padding: 60px 20px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 12px;
  color: var(--accent);
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.feature {
  background: var(--bg-card);
  padding: 24px;
  border-radius: 8px;
  text-align: left;
}

.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: 14px; }

.stats-grid {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 30px 0;
}

.stat-card {
  background: var(--bg-card);
  padding: 24px 40px;
  border-radius: 8px;
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--accent);
}

.stat-label {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 500;
}

.btn-primary:hover { background: #00b8e6; }

.btn-secondary {
  background: #333;
  color: var(--text);
}

.btn-secondary:hover { background: #444; }

.btn-large {
  padding: 16px 40px;
  font-size: 16px;
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Collection page */
.collection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.tab {
  padding: 12px 24px;
  background: var(--bg-card);
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  font-size: 14px;
}

.tab:hover { color: var(--text); }
.tab.active { background: var(--bg-secondary); color: var(--accent); }

.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filters input, .filters select {
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid #333;
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}

.filters input { flex: 1; min-width: 200px; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--accent); }

.collection-stats {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 16px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.item-card {
  background: var(--bg-secondary);
  border-radius: 6px;
  padding: 14px;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.item-name {
  font-weight: 500;
  font-size: 14px;
}

.item-id {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
  margin-bottom: 8px;
}

.item-count {
  background: var(--accent);
  color: #000;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  font-family: sans-serif;
  margin-left: 6px;
}

.item-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
}

.badge-ssr { background: #ffd700; color: #000; }
.badge-sr { background: #c0c0c0; color: #000; }
.badge-r { background: #cd7f32; color: #000; }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px;
  color: var(--text-muted);
}

/* Settings */
.settings-section {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.settings-section h2 {
  margin-bottom: 12px;
  color: var(--accent);
}

.settings-section p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.token-display {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.token-display input {
  flex: 1;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid #333;
  border-radius: 6px;
  color: var(--text);
  font-family: monospace;
}

.extension-info {
  background: var(--bg-card);
  padding: 16px;
  border-radius: 6px;
}

.extension-info h3 { margin-bottom: 12px; }
.extension-info ol { padding-left: 20px; }
.extension-info li { margin-bottom: 8px; color: var(--text-muted); }
.extension-info code { background: #333; padding: 2px 6px; border-radius: 3px; }

textarea {
  width: 100%;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid #333;
  border-radius: 6px;
  color: var(--text);
  font-family: monospace;
  font-size: 12px;
  resize: vertical;
  margin-bottom: 12px;
}

.account-info p {
  margin-bottom: 8px;
}
