/* Destiny Rarity — Dark sci-fi theme */
:root {
  --bg-deep: #0a0c10;
  --bg-surface: #12151c;
  --bg-card: #181c24;
  --border: rgba(255, 200, 100, 0.15);
  --accent: #e8b84a;
  --accent-dim: #b8923a;
  --text: #e8e6e3;
  --text-muted: #8a8d92;
  --rarity-rare: #4a9eff;
  --rarity-legendary: #e8b84a;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Exo 2', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg-deep);
  min-height: 100vh;
  line-height: 1.5;
}

/* Landing */
.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.landing-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(232, 184, 74, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(74, 158, 255, 0.05) 0%, transparent 40%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-surface) 100%);
  pointer-events: none;
}

.landing-content {
  position: relative;
  text-align: center;
  max-width: 420px;
}

.landing-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  font-weight: 300;
}

.landing-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
  line-height: 1.6;
}

.landing-desc a {
  color: var(--accent);
  text-decoration: none;
}

.landing-desc a:hover {
  text-decoration: underline;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.8rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232, 184, 74, 0.3);
}

.btn-login-icon {
  width: 20px;
  height: 20px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%230a0c10"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg>') center/contain no-repeat;
}

.error-msg {
  margin-top: 1.5rem;
  color: #e85a5a;
  font-size: 0.9rem;
}

/* Dashboard */
.dashboard {
  min-height: 100vh;
  padding: 1.5rem;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.dashboard-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin: 0;
}

.btn-logout {
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.btn-logout:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.summary-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
  text-transform: uppercase;
}

.summary-text {
  font-size: 1.1rem;
  margin: 0;
}

.summary-text strong {
  color: var(--accent);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab {
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.tab:hover {
  color: var(--text);
  border-color: var(--accent-dim);
}

.tab.active {
  color: var(--bg-deep);
  background: var(--accent);
  border-color: var(--accent);
}

.category-section {
  display: none;
}

.category-section.active {
  display: block;
}

.category-section h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 1rem;
  text-transform: uppercase;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s;
}

.item-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.item-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.75rem;
  border-radius: 4px;
  background: var(--bg-surface);
  object-fit: contain;
}

.item-name {
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-rarity {
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.item-stats {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.loading {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

.empty-state p {
  margin: 0;
}
