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

:root {
  --bg-primary: #111214;
  --bg-secondary: #1a1b1e;
  --bg-card: #232529;
  --bg-input: #2b2d31;
  --border: #2e3035;
  --text-primary: #f2f3f5;
  --text-secondary: #949ba4;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --gold: #fbbf24;
  --silver: #9ca3af;
  --bronze: #d97706;
}

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

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.logo-icon {
  font-size: 2rem;
}

.logo h1 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #5865f2, #22c55e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.tab.active {
  background: var(--accent);
  color: white;
}

.content h2 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.hidden {
  display: none !important;
}

.search-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  max-width: 500px;
}

.search-box.small {
  max-width: 350px;
}

.search-box input {
  flex: 1;
  padding: 0.7rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--accent);
}

.search-box button {
  padding: 0.7rem 1.2rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
}

.search-box button:hover {
  background: var(--accent-hover);
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  max-width: 500px;
}

.result-card.error {
  border-color: var(--error);
}

.result-card.success {
  border-color: var(--success);
}

.result-card .user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.result-card .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-input);
}

.result-card .details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.result-card .details p {
  margin-bottom: 0.15rem;
  font-size: 0.85rem;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.verified {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.badge.unverified {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
}

.badge.rank {
  background: rgba(88, 101, 242, 0.15);
  color: var(--accent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.leaderboard-list, .tryouts-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lb-entry, .tryout-entry {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
}

.lb-rank {
  font-size: 1.1rem;
  font-weight: 700;
  min-width: 2rem;
  text-align: center;
}

.lb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-input);
}

.lb-info {
  flex: 1;
}

.lb-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.lb-detail {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.lb-value {
  font-weight: 700;
  color: var(--gold);
  font-size: 1rem;
}

.tryout-entry {
  flex-direction: column;
  align-items: flex-start;
}

.tryout-header {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
}

.tryout-title {
  font-weight: 600;
}

.tryout-status {
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.tryout-details {
  font-size: 0.85rem;
  color: var(--text-secondary);
  width: 100%;
}

.tryout-reqs {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

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

.footer {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.code-display {
  font-family: 'Courier New', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--warning);
  background: var(--bg-primary);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-align: center;
  margin: 0.5rem 0;
}

@media (max-width: 600px) {
  .container {
    padding: 1rem 0.75rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .result-card .user-info {
    flex-direction: column;
    text-align: center;
  }
}
