:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #1a1a24;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f0f5;
  --text-muted: #9a9aab;
  --accent: #a78bfa;
  --accent-2: #ec4899;
  --success: #34d399;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font: "Noto Sans Thai", "Inter", system-ui, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(167, 139, 250, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(236, 72, 153, 0.08), transparent);
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.logo-icon {
  font-size: 1.5rem;
}

.search-box {
  flex: 1;
  max-width: 480px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  width: 100%;
  padding: 10px 40px 10px 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-box input:focus {
  border-color: var(--accent);
}
.search-box input::placeholder {
  color: var(--text-muted);
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box kbd {
  position: absolute;
  right: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-sm:hover {
  border-color: var(--accent);
}

/* Hero */
.hero {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px 30px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

.hero-badge {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 500;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.hero-curator {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.hero-curator a {
  color: var(--accent);
}

.stats-bar {
  display: flex;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  width: fit-content;
}

.stat {
  text-align: center;
  min-width: 80px;
}
.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Spotlight */
.spotlight {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.spotlight::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.2), transparent 70%);
  pointer-events: none;
}

.spotlight-badge {
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 500;
}

.spotlight-body {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.spotlight-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}

.spotlight-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.spotlight-handle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.spotlight-bio {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spotlight-tag {
  display: inline-block;
  background: rgba(167, 139, 250, 0.2);
  color: var(--accent);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Filters */
.filters {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tab {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-tab span {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.7rem;
}
.filter-tab:hover {
  border-color: var(--accent);
  color: var(--text);
}
.filter-tab.active {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.25), rgba(236, 72, 153, 0.15));
  border-color: var(--accent);
  color: var(--text);
}

.filter-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sort-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  outline: none;
}

/* Grid */
.grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* Creator Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: var(--shadow);
}

.card-banner {
  height: 90px;
  background: linear-gradient(135deg, #312e81, #7c3aed, #db2777);
  position: relative;
}

.card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--bg-card);
  object-fit: cover;
  position: absolute;
  bottom: -32px;
  left: 16px;
  background: var(--bg-elevated);
}

.card-body {
  padding: 40px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-name {
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.card-verified {
  color: #1d9bf0;
  font-size: 0.9rem;
}

.card-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.3), rgba(236, 72, 153, 0.2));
  color: #e9d5ff;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
}

.card-handle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-followers {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.card-followers strong {
  color: var(--text);
}

.card-bio {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
  flex: 1;
  line-height: 1.45;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.card-link {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: var(--bg-elevated);
  border-radius: 999px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.15s;
}
.card-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.card-footer a.btn-visit {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  transition: all 0.15s;
}
.card-footer a.btn-visit:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.empty-state h3 {
  color: var(--text);
  margin-bottom: 8px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-note {
  margin-top: 6px;
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow);
  text-align: center;
}

.modal-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  margin-bottom: 12px;
}

.modal-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.modal-handle {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.modal-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .spotlight {
    order: -1;
  }
  .header-inner {
    flex-wrap: wrap;
  }
  .search-box {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.6rem;
  }
  .stats-bar {
    width: 100%;
    justify-content: space-around;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .filters {
    flex-direction: column;
    align-items: flex-start;
  }
}
