/* =============================================
   OpenDex - Professional Token Scanner Styles
   ============================================= */

/* CSS Variables - Premium Dark Theme */
:root {
  /* Background layers */
  --bg-base: #07080a;
  --bg-primary: #0c0d10;
  --bg-secondary: #12141a;
  --bg-tertiary: #181b23;
  --bg-elevated: #1e222d;
  --bg-hover: #252a37;

  /* Text hierarchy */
  --text-primary: #f0f2f5;
  --text-secondary: #9ca3b4;
  --text-muted: #5d6577;
  --text-dim: #3d4452;

  /* Brand colors */
  --accent-primary: #6366f1;
  --accent-hover: #818cf8;
  --accent-muted: rgba(99, 102, 241, 0.15);
  --accent-glow: rgba(99, 102, 241, 0.4);

  /* Semantic colors */
  --green: #10b981;
  --green-light: rgba(16, 185, 129, 0.12);
  --green-glow: rgba(16, 185, 129, 0.3);
  --red: #ef4444;
  --red-light: rgba(239, 68, 68, 0.12);
  --red-glow: rgba(239, 68, 68, 0.3);
  --yellow: #f59e0b;
  --yellow-light: rgba(245, 158, 11, 0.12);
  --blue: #3b82f6;
  --blue-light: rgba(59, 130, 246, 0.12);

  /* Borders & Shadows */
  --border-color: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.03);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Fira Code', monospace;
}

/* =============================================
   Reset & Base Styles
   ============================================= */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle animated background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(16, 185, 129, 0.04), transparent);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

::selection {
  background: var(--accent-muted);
  color: var(--text-primary);
}

/* =============================================
   Header
   ============================================= */

.header {
  position: sticky;
  top: 0;
  background: rgba(12, 13, 16, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
}

.header-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-weight: 700;
  transition: opacity var(--transition-fast);
}

.logo:hover {
  opacity: 0.9;
  color: var(--text-primary);
}

.logo-text {
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-badge {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--accent-primary), #a855f7);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
}

.logo-img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.nav {
  display: flex;
  gap: 0.5rem;
}

.nav-link {
  position: relative;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* =============================================
   Buttons
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
  color: white;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-hover), #8b5cf6);
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
}

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

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.1);
}

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

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-large {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-icon.spinning svg {
  animation: spin 1s linear infinite;
}

/* Connect wallet button special styling */
#connect-wallet {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

#connect-wallet:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
}

#connect-wallet.connected {
  background: var(--accent-muted);
  border-color: var(--accent-primary);
  color: var(--accent-hover);
}

/* =============================================
   Main Content
   ============================================= */

.main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 64px - 80px);
}

/* =============================================
   Hero Section
   ============================================= */

.hero {
  text-align: center;
  padding: 3.5rem 0 4.5rem;
  position: relative;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.08), transparent);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 800px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 50%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Search Container */
.search-container {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  gap: 0.75rem;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
}

.search-input {
  width: 100%;
  padding: 1rem 3rem 1rem 3.25rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-tertiary);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.search-input:focus + .search-icon,
.search-input:focus ~ .search-icon {
  color: var(--accent-primary);
}

.search-clear {
  position: absolute;
  right: 1rem;
  width: 24px;
  height: 24px;
  background: var(--bg-hover);
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.search-clear:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.btn-search {
  background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
  color: white;
  padding: 1rem 1.75rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-search:hover {
  box-shadow: 0 4px 24px var(--accent-glow);
  transform: translateY(-1px);
}

/* Search Results Dropdown */
.search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  max-height: 420px;
  overflow-y: auto;
  animation: fadeSlideDown 0.2s ease;
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: var(--text-primary);
  transition: background var(--transition-fast);
}

.search-result-item:hover {
  background: var(--bg-hover);
}

.search-result-item:not(:last-child) {
  border-bottom: 1px solid var(--border-subtle);
}

.search-result-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  object-fit: cover;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-name {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-symbol {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.search-result-price {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.search-no-results {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

/* =============================================
   Filter Section
   ============================================= */

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

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-secondary);
  padding: 0.375rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.filter-tab {
  position: relative;
  padding: 0.625rem 1.25rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-tab:hover {
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.filter-icon {
  font-size: 1rem;
}

.filter-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

#result-count {
  padding: 0.375rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* Data Freshness Indicator */
.data-freshness {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.25rem 0.625rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.data-freshness .freshness-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}

.data-freshness.stale .freshness-dot {
  background: var(--yellow);
  animation: none;
}

.data-freshness .freshness-text {
  white-space: nowrap;
}

.data-freshness .countdown {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Token detail price freshness */
.price-freshness {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.price-freshness .freshness-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.price-freshness.stale .freshness-dot {
  background: var(--yellow);
}

/* =============================================
   Token Table
   ============================================= */

.token-list-section {
  position: relative;
}

.token-table-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.token-table {
  width: 100%;
  border-collapse: collapse;
}

.token-table th {
  text-align: left;
  padding: 1rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.token-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}

.token-table tbody tr {
  cursor: pointer;
  transition: all var(--transition-fast);
}

.token-table tbody tr:hover {
  background: linear-gradient(90deg, var(--bg-hover), transparent);
}

.token-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

.token-table tbody tr:hover td {
  border-bottom-color: transparent;
}

.token-table tbody tr:last-child td {
  border-bottom: none;
}

/* Table column widths */
.th-rank { width: 60px; text-align: center; }
.th-token { min-width: 240px; }
.th-price { width: 140px; text-align: right; }
.th-change { width: 110px; text-align: right; }
.th-volume { width: 140px; text-align: right; }
.th-mcap { width: 140px; text-align: right; }
.th-views { width: 90px; text-align: right; }

/* Sortable columns */
.sortable {
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-fast);
}

.sortable:hover {
  color: var(--text-secondary);
}

.sortable.active {
  color: var(--accent-primary);
}

.sort-icon {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.375rem;
  vertical-align: middle;
  opacity: 0.7;
}

.sort-icon.desc {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.sort-icon.asc {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 5px solid currentColor;
}

/* Token Cell */
.token-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.token-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.token-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.token-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.token-symbol-cell {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Table cells */
.cell-rank {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.cell-price,
.cell-change,
.cell-volume,
.cell-mcap,
.cell-views {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
}

.cell-price {
  color: var(--text-primary);
}

.cell-volume,
.cell-mcap {
  color: var(--text-secondary);
}

.cell-views {
  color: var(--text-muted);
}

.change-positive {
  color: var(--green);
}

.change-negative {
  color: var(--red);
}

/* =============================================
   Watchlist
   ============================================= */

/* Watchlist column */
.th-watchlist {
  width: 48px;
  text-align: center;
  color: var(--text-muted);
}

.cell-watchlist {
  width: 48px;
  text-align: center;
  padding: 0.5rem !important;
}

/* Watchlist button */
.watchlist-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.watchlist-btn:hover {
  background: var(--bg-tertiary);
  color: var(--yellow);
}

.watchlist-btn.active {
  color: var(--yellow);
}

.watchlist-btn.active:hover {
  color: var(--text-muted);
}

.watchlist-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.watchlist-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.watchlist-btn-sm {
  width: 32px;
  height: 32px;
}

.watchlist-btn-sm svg {
  width: 14px;
  height: 14px;
}

/* Watchlist badge in filter tab */
.watchlist-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  margin-left: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--bg-primary);
  background: var(--yellow);
  border-radius: var(--radius-full);
}

/* Watchlist empty state */
.empty-state .empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.5rem;
}

.empty-state .empty-text {
  color: var(--text-muted);
  max-width: 280px;
}

.empty-state .empty-icon svg {
  color: var(--text-muted);
  opacity: 0.4;
}

/* Make clickable cells look interactive */
.cell-token-clickable {
  cursor: pointer;
}

.token-row td:not(.cell-watchlist) {
  cursor: pointer;
}

/* Watchlist button in token header */
.watchlist-btn-header {
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.watchlist-btn-header:hover {
  color: var(--yellow);
}

.watchlist-btn-header.active {
  color: var(--yellow);
}

.watchlist-btn-header.active:hover {
  color: var(--text-muted);
}

/* =============================================
   Loading & States
   ============================================= */

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

.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
  margin-right: 0.75rem;
  vertical-align: middle;
}

.loading-spinner.large {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

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

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem;
  color: var(--text-muted);
}

.error-state,
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 2rem;
  text-align: center;
}

.error-icon,
.empty-icon {
  font-size: 2.5rem;
  opacity: 0.5;
}

.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* =============================================
   Pagination
   ============================================= */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem 0;
}

.pagination-left,
.pagination-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 140px;
}

.pagination-right {
  justify-content: flex-end;
}

.pagination-center {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Rows per page selector */
.rows-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.rows-selector {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-tertiary);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.rows-btn {
  padding: 0.375rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.rows-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.rows-btn.active {
  background: var(--bg-elevated);
  color: var(--accent-primary);
}

/* Page tabs */
.page-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-tertiary);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.page-tab {
  min-width: 36px;
  height: 32px;
  padding: 0 0.625rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

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

.page-ellipsis {
  padding: 0 0.375rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Pagination arrows */
.pagination-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination-arrow:hover:not(:disabled) {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.1);
}

.pagination-arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Page info text */
.page-info-text {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* =============================================
   API Status Banner
   ============================================= */

.api-status {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.1);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--red);
  color: var(--red);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 100;
}

/* =============================================
   Token Detail Page
   ============================================= */

.token-page {
  padding-top: 1rem;
}

/* Token Header */
.token-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
}

.token-header-left {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.token-logo-large {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  flex-shrink: 0;
}

.token-info-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.token-name-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.token-name-row h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.token-symbol-badge {
  padding: 0.25rem 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.token-address-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.token-address {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.token-address:hover {
  color: var(--accent-primary);
}

.token-address-row .btn-icon {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
}

/* Price Section */
.token-header-right {
  text-align: right;
}

.token-price-large {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.price-change-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.price-change-badge.positive {
  background: var(--green-light);
  color: var(--green);
}

.price-change-badge.negative {
  background: var(--red-light);
  color: var(--red);
}

.price-stats-mini {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  justify-content: flex-end;
}

.price-stat-mini {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.price-stat-mini .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.price-stat-mini .value {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Banner & Community Section */
.banner-section {
  margin-bottom: 2rem;
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.community-banner {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.banner-voting {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
}

/* Combined Community Section (Banner + Links) */
.community-section {
  margin-bottom: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.community-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.community-section-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.community-section-header h2 svg {
  width: 18px;
  height: 18px;
  color: var(--accent-primary);
}

.community-banner-wrapper {
  position: relative;
  background: var(--bg-tertiary);
}

.community-banner-wrapper .community-banner {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

.community-links-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-subtle);
}

.community-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.community-link-chip:hover {
  background: var(--accent-muted);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

.community-link-chip svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.community-link-chip.twitter:hover {
  background: rgba(29, 161, 242, 0.1);
  border-color: #1DA1F2;
  color: #1DA1F2;
}

.community-link-chip.telegram:hover {
  background: rgba(0, 136, 204, 0.1);
  border-color: #0088cc;
  color: #0088cc;
}

.community-link-chip.discord:hover {
  background: rgba(114, 137, 218, 0.1);
  border-color: #7289DA;
  color: #7289DA;
}

.community-link-chip.website:hover {
  background: var(--accent-muted);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

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

.community-empty p {
  margin-bottom: 1rem;
}

.community-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Content Grid */
.token-content-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Card Base */
.chart-section,
.stats-section,
.social-section,
.trade-section,
.submissions-section,
.pools-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
}

.chart-section h2,
.stats-section h2,
.social-section h2,
.trade-section h2,
.submissions-section h2,
.pools-section h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

/* Chart Section */
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.chart-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chart-metric-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-tertiary);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.chart-metric-btn {
  padding: 0.375rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.chart-metric-btn:hover {
  color: var(--text-primary);
}

.chart-metric-btn.active {
  background: var(--accent-primary);
  color: white;
}

.chart-type-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-tertiary);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}

.chart-type-btn {
  padding: 0.375rem 0.5rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chart-type-btn:hover {
  color: var(--text-primary);
}

.chart-type-btn.active {
  background: var(--bg-hover);
  color: var(--accent-primary);
}

.chart-timeframes {
  display: flex;
  gap: 0.375rem;
  background: var(--bg-tertiary);
  padding: 0.25rem;
  border-radius: var(--radius-md);
}

.timeframe-btn {
  padding: 0.5rem 0.875rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.timeframe-btn:hover {
  color: var(--text-primary);
}

.timeframe-btn.active {
  background: var(--bg-elevated);
  color: var(--accent-primary);
}

.chart-container {
  position: relative;
  height: 360px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.chart-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 20, 26, 0.9);
  z-index: 10;
}

.chart-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.chart-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.chart-stat .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.chart-stat .value {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.stat-card {
  background: var(--bg-tertiary);
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

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

.stat-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.625rem;
}

.stat-label svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.stat-value.text-muted {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Social Links */
.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.social-link-btn {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-weight: 500;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-subtle);
}

.social-link-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-color);
  color: var(--text-primary);
  transform: translateX(4px);
}

.social-link-btn svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.no-links,
.no-submissions {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem 1rem;
}

/* Trade Links */
.trade-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.trade-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  color: white;
  transition: all var(--transition-fast);
}

.trade-btn:hover {
  transform: translateY(-2px);
  color: white;
}

.trade-btn.jupiter {
  background: linear-gradient(135deg, #00d18c, #00a67d);
  box-shadow: 0 4px 16px rgba(0, 209, 140, 0.3);
}

.trade-btn.jupiter:hover {
  box-shadow: 0 6px 24px rgba(0, 209, 140, 0.4);
}

.trade-btn.raydium {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.trade-btn.raydium:hover {
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.4);
}

/* Pools Section */
.pools-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pool-card {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.pool-card:hover {
  border-color: var(--border-color);
}

.pool-pair {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pool-symbols {
  font-weight: 600;
  font-size: 1rem;
}

.pool-type {
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  background: var(--accent-muted);
  color: var(--accent-primary);
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pool-stats {
  display: flex;
  gap: 2rem;
}

.pool-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: right;
}

.pool-stat .label {
  font-size: 0.625rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pool-stat .value {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
}

.pool-stat .value.positive {
  color: var(--green);
}

.pools-loading,
.pools-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  color: var(--text-muted);
}

/* Submissions */
.submissions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.submissions-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.submissions-header-left h2 {
  margin: 0;
}

#voting-info-btn {
  gap: 0.375rem;
  font-size: 0.75rem;
}

.submissions-tabs {
  display: flex;
  gap: 0.375rem;
  background: var(--bg-tertiary);
  padding: 0.25rem;
  border-radius: var(--radius-md);
}

.submissions-tab {
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.submissions-tab.active {
  background: var(--bg-elevated);
  color: var(--accent-primary);
}

.submissions-list {
  display: grid;
  gap: 1rem;
}

.submission-card {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.submission-card:hover {
  border-color: var(--border-color);
}

.submission-content {
  padding: 1rem;
}

.submission-preview {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.submission-type-badge {
  display: inline-block;
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  background: var(--accent-muted);
  color: var(--accent-primary);
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  font-weight: 600;
}

.submission-url {
  color: var(--accent-primary);
  font-size: 0.875rem;
  word-break: break-all;
}

.submission-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
}

.submission-votes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vote-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.vote-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.vote-up:hover,
.vote-up.voted {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-light);
}

.vote-down:hover,
.vote-down.voted {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-light);
}

.submission-score-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.submission-score {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  padding: 0 0.5rem;
}

.submission-score.positive {
  color: var(--green);
}

.submission-score.negative {
  color: var(--red);
}

.submission-score-container .weighted-score {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  cursor: help;
}

.submission-score-container .weighted-score.positive {
  color: rgba(16, 185, 129, 0.7);
}

.submission-score-container .weighted-score.negative {
  color: rgba(239, 68, 68, 0.7);
}

.submission-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* =============================================
   Submit Page
   ============================================= */

.submit-hero {
  text-align: center;
  padding: 2.5rem 0 3rem;
}

.submit-hero-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--accent-muted), rgba(168, 85, 247, 0.1));
  border-radius: var(--radius-full);
  color: var(--accent-primary);
}

.submit-hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.submit-hero p {
  color: var(--text-secondary);
}

.submit-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.submit-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.submit-feature svg {
  color: var(--green);
}

/* Form Section */
.submit-form-section {
  max-width: 640px;
  margin: 0 auto 3rem;
}

.submit-form {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
}

/* Form Progress */
.form-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.step-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.step-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.progress-step.active .step-number {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.progress-step.active .step-label {
  color: var(--accent-primary);
}

.progress-step.completed .step-number {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.progress-step.completed .step-label {
  color: var(--green);
}

.progress-line {
  width: 40px;
  height: 2px;
  background: var(--border-color);
}

/* Form Groups */
.form-group {
  margin-bottom: 1.75rem;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 500;
  margin-bottom: 0.625rem;
  color: var(--text-primary);
}

.required {
  color: var(--red);
}

.form-group input[type="text"],
.form-group input[type="url"] {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.form-error {
  color: var(--red);
  font-size: 0.8125rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* Token Preview */
.token-preview-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--green);
  border-radius: var(--radius-lg);
}

.preview-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
}

.preview-info {
  flex: 1;
}

.preview-name {
  display: block;
  font-weight: 600;
}

.preview-symbol {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.preview-badge {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--green-light);
  color: var(--green);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Type Selector */
.type-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.type-option {
  cursor: pointer;
}

.type-option input {
  display: none;
}

.type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  padding: 1.25rem 0.75rem;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.type-card:hover {
  border-color: var(--accent-primary);
}

.type-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.5rem;
}

.type-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.type-option input:checked + .type-card {
  border-color: var(--accent-primary);
  background: var(--accent-muted);
}

.type-option input:checked + .type-card .type-icon,
.type-option input:checked + .type-card .type-name {
  color: var(--accent-primary);
}

/* Banner Preview */
.banner-preview-wrapper {
  position: relative;
  min-height: 120px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.banner-preview {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
}

.banner-loading,
.banner-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.banner-error {
  color: var(--red);
}

/* Wallet Input */
.wallet-group {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-color);
}

.wallet-input-container {
  display: flex;
  gap: 0.75rem;
}

.wallet-input-container input {
  flex: 1;
}

.wallet-input-container .btn.connected {
  background: var(--green-light);
  border-color: var(--green);
  color: var(--green);
}

/* Form Actions */
.form-actions {
  text-align: center;
  margin-top: 2rem;
}

.form-disclaimer {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1.5rem;
}

/* My Submissions */
.my-submissions-section {
  max-width: 640px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.my-submissions {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
}

.empty-submissions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

.my-submission-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-subtle);
}

.submission-type-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
}

.submission-info {
  flex: 1;
  min-width: 0;
}

.submission-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.type-label {
  text-transform: capitalize;
  font-weight: 500;
}

.content-url {
  font-size: 0.8125rem;
  color: var(--accent-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.submission-status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pending {
  background: var(--yellow-light);
  color: var(--yellow);
}

.status-approved {
  background: var(--green-light);
  color: var(--green);
}

.status-rejected {
  background: var(--red-light);
  color: var(--red);
}

/* Wallet Required Card */
.wallet-required-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 2rem;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-xl);
  text-align: center;
}

.wallet-required-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-muted);
  border-radius: var(--radius-full);
  color: var(--accent-primary);
  margin-bottom: 1.25rem;
}

.wallet-required-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.wallet-required-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 320px;
}

/* Wallet Connected Card */
.wallet-connected-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--green);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}

.wallet-connected-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wallet-connected-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  border-radius: var(--radius-full);
  color: white;
  flex-shrink: 0;
}

.wallet-connected-info {
  flex: 1;
  min-width: 0;
}

.wallet-label {
  display: block;
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.wallet-address {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Holder Verification Card */
.holder-verification-card {
  margin-top: 0.75rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.holder-verification-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.holder-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.holder-status.verified {
  background: var(--green-light);
  color: var(--green);
}

.holder-status.not-holder {
  background: var(--red-light);
  color: var(--red);
}

.holder-status-icon {
  display: flex;
}

.holder-status-text {
  font-weight: 500;
  font-size: 0.875rem;
}

.holder-balance {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
}

.balance-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.balance-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.875rem;
}

/* URL Hint with Help Button */
.form-hint-with-help {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
}

.form-hint-with-help .form-hint {
  margin-top: 0;
  flex: 1;
}

.help-btn {
  flex-shrink: 0;
  font-size: 0.75rem;
  gap: 0.25rem;
}

/* Ghost Button Style */
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.375rem 0.625rem;
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Large Button */
.btn-large {
  padding: 1rem 1.5rem;
  font-size: 1rem;
}

/* =============================================
   Enhanced Submit Form - Side-by-Side Layout
   ============================================= */

.submit-form-section-enhanced {
  max-width: 1200px;
  margin: 0 auto 3rem;
}

.submit-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Left side: Form Container */
.submit-form-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
}

.submit-form-container h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* Token Address Section */
.token-address-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

/* Submission Types Grid */
.submission-types-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.submission-type-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--transition-fast);
}

.submission-type-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.submission-type-card.has-value {
  border-color: var(--accent-primary);
  background: var(--accent-muted);
}

.submission-type-card.valid {
  border-color: var(--green);
  background: var(--green-light);
}

.submission-type-card.invalid {
  border-color: var(--red);
  background: var(--red-light);
}

.type-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.type-card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.submission-type-card.valid .type-card-icon {
  background: var(--green);
  color: white;
}

.type-card-label {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.type-card-sublabel {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 0.125rem;
}

.type-card-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.type-card-input::placeholder {
  color: var(--text-muted);
}

.type-card-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.submission-type-card.valid .type-card-input {
  border-color: var(--green);
}

.submission-type-card.invalid .type-card-input {
  border-color: var(--red);
}

.validation-status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  min-height: 1.25rem;
}

.validation-status.valid {
  color: var(--green);
}

.validation-status.invalid {
  color: var(--red);
}

.validation-status svg {
  width: 14px;
  height: 14px;
}

/* Submission Count Indicator */
.submission-count-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.submission-count-indicator #filled-count {
  font-weight: 700;
  color: var(--accent-primary);
}

/* Wallet Section Enhanced */
.wallet-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Form Actions Enhanced */
.form-actions-enhanced {
  margin-top: 1.5rem;
}

.form-actions-enhanced .btn-primary {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1rem;
}

/* Right side: Live Preview Container */
.submit-preview-container {
  position: sticky;
  top: 80px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.preview-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.preview-header h3 svg {
  width: 16px;
  height: 16px;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  background: var(--green-light);
  color: var(--green);
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Preview Token Page Mock */
.preview-token-page {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.preview-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  min-height: 400px;
}

.preview-empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.preview-empty-state p {
  max-width: 240px;
}

/* Preview Token Header */
.preview-token-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.preview-token-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
}

.preview-token-info h4 {
  font-size: 1.125rem;
  margin-bottom: 0.125rem;
}

.preview-token-symbol {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Preview Community Section */
.preview-community-section {
  padding: 1.5rem;
}

.preview-section-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.preview-section-label svg {
  width: 14px;
  height: 14px;
}

/* Preview Banner Area */
.preview-banner-area {
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.preview-banner-area.has-banner {
  border-style: solid;
  border-color: var(--green);
}

.preview-banner-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.8125rem;
}

.preview-banner-placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.5;
}

.preview-banner-img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  display: none;
}

.preview-banner-area.has-banner .preview-banner-placeholder {
  display: none;
}

.preview-banner-area.has-banner .preview-banner-img {
  display: block;
}

/* Preview Social Links */
.preview-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.preview-link-chip {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.preview-link-chip.visible {
  display: flex;
}

.preview-link-chip svg {
  width: 16px;
  height: 16px;
}

.preview-link-chip.twitter {
  border-color: #1d9bf0;
  background: rgba(29, 155, 240, 0.1);
  color: #1d9bf0;
}

.preview-link-chip.telegram {
  border-color: #26a5e4;
  background: rgba(38, 165, 228, 0.1);
  color: #26a5e4;
}

.preview-link-chip.discord {
  border-color: #5865f2;
  background: rgba(88, 101, 242, 0.1);
  color: #5865f2;
}

.preview-link-chip.website {
  border-color: var(--accent-primary);
  background: var(--accent-muted);
  color: var(--accent-primary);
}

.no-links-placeholder {
  color: var(--text-dim);
  font-size: 0.8125rem;
  font-style: italic;
}

/* Responsive: Stack on smaller screens */
@media (max-width: 900px) {
  .submit-layout {
    grid-template-columns: 1fr;
  }

  .submit-preview-container {
    position: static;
    order: -1;
  }

  .submission-types-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   About / How It Works Sections
   ============================================= */

.about-section {
  max-width: 900px;
  margin: 3rem auto;
  padding: 2.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
}

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

.about-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-muted);
  border-radius: var(--radius-lg);
  color: var(--accent-primary);
}

.about-icon.opendex {
  background: transparent;
}

.about-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.about-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

/* Process Steps (How It Works) */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.process-step {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.process-step:hover {
  border-color: var(--border-color);
}

.process-step .step-number {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
  border-radius: var(--radius-full);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  border: none;
}

.step-content h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

.step-content strong {
  color: var(--accent-primary);
  font-weight: 600;
}

/* Voting Tiers */
.voting-tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 0.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.tier-range {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.tier-weight {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-primary);
}

/* Threshold Indicators */
.threshold-indicators {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.threshold {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
}

.threshold.approve {
  background: var(--green-light);
  color: var(--green);
}

.threshold.reject {
  background: var(--red-light);
  color: var(--red);
}

/* About Content Grid */
.about-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.about-card {
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.about-card:hover {
  border-color: var(--border-color);
}

.about-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-muted);
  border-radius: var(--radius-md);
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.about-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.about-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
}

.about-card .link {
  color: var(--accent-primary);
  font-weight: 500;
}

.about-card .link:hover {
  text-decoration: underline;
}

/* About CTA */
.about-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
  .about-section {
    padding: 1.5rem;
    margin: 2rem 1rem;
  }

  .about-header h2 {
    font-size: 1.5rem;
  }

  .process-step {
    flex-direction: column;
    gap: 1rem;
  }

  .process-step .step-number {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 0.875rem;
  }

  .voting-tiers {
    grid-template-columns: repeat(2, 1fr);
  }

  .threshold-indicators {
    flex-direction: column;
    gap: 0.75rem;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-cta {
    flex-direction: column;
  }

  .about-cta .btn {
    width: 100%;
  }
}

/* =============================================
   Imgur Help Modal
   ============================================= */

.imgur-help-modal {
  max-width: 520px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-right: 2rem;
}

.imgur-logo {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 183, 110, 0.1);
  border-radius: var(--radius-lg);
}

.modal-header h3 {
  font-size: 1.25rem;
  margin: 0;
}

.imgur-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.imgur-step {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
}

.step-number {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.step-content p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
}

.step-content code {
  background: var(--bg-elevated);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.step-content .link {
  color: var(--accent-primary);
}

.imgur-tips {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.imgur-tips h4 {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.imgur-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.imgur-tips li {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding: 0.25rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.imgur-tips li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.625rem;
  width: 6px;
  height: 6px;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
}

/* =============================================
   Modal Styles
   ============================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 450px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.success-modal {
  text-align: center;
}

.success-modal .success-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  background: var(--green);
  border-radius: var(--radius-full);
  color: white;
}

.success-modal h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.success-details {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin: 1rem 0;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.375rem 0;
}

.detail-row .label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.detail-row .value {
  font-weight: 500;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.modal-actions .btn {
  flex: 1;
}

/* =============================================
   Voting Modal Styles
   ============================================= */

.voting-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.voting-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.2s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.voting-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.voting-modal-icon.error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

.voting-modal-icon.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--yellow);
}

.voting-modal-icon.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
}

.voting-modal h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.voting-modal p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.voting-modal .holder-balance-info {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.voting-modal .holder-balance-info .balance-row {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0;
  font-size: 0.875rem;
}

.voting-modal .holder-balance-info .balance-row span:first-child {
  color: var(--text-muted);
}

.voting-modal .holder-balance-info .balance-row span:last-child {
  font-weight: 500;
  color: var(--text-primary);
}

.voting-modal .holder-balance-info .balance-row.required {
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}

.voting-modal .holder-balance-info .balance-row.required span:last-child {
  color: var(--yellow);
}

.voting-modal-actions {
  display: flex;
  gap: 0.75rem;
}

.voting-modal-actions .btn {
  flex: 1;
}

/* Submission modal (reuses voting modal styles) */
.submission-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.submission-modal {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.submission-modal .modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.submission-modal .modal-icon.error {
  background: var(--red-light);
  color: var(--red);
}

.submission-modal h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.submission-modal p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.submission-modal .error-list {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.submission-modal .error-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.submission-modal .error-item:last-child {
  border-bottom: none;
}

.submission-modal .error-type {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.submission-modal .error-message {
  font-size: 0.75rem;
  color: var(--red);
}

.submission-modal .modal-actions {
  display: flex;
  gap: 0.75rem;
}

.submission-modal .modal-actions .btn {
  flex: 1;
}

/* Small button variant */
.btn-small {
  padding: 0.375rem 0.5rem;
  min-height: 28px;
  min-width: 28px;
  font-size: 0.75rem;
}

/* Holder refresh button */
#holder-refresh-btn {
  margin-left: 0.5rem;
  padding: 0.25rem;
  min-height: 24px;
  min-width: 24px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

#holder-refresh-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

#holder-refresh-btn svg {
  width: 14px;
  height: 14px;
}

/* Vote weight badge */
.vote-weight-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Weighted score display */
.weighted-score {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.weighted-score.positive {
  color: var(--green);
}

.weighted-score.negative {
  color: var(--red);
}

/* Holder verification badge on votes */
.holder-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  color: var(--green);
  padding: 0.125rem 0.375rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-sm);
}

.holder-verified-badge svg {
  width: 10px;
  height: 10px;
}

/* Vote info tooltip */
.vote-info-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
}

.vote-info-tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

/* Voting info modal content */
.voting-info-content {
  text-align: left;
  margin: 1rem 0;
}

.voting-rule {
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.voting-rule:last-child {
  margin-bottom: 0;
}

.voting-rule strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.voting-rule p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.vote-tiers {
  margin-top: 0.5rem;
  font-size: 0.75rem;
}

.vote-tiers .tier-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.vote-tiers .tier-row:last-child {
  border-bottom: none;
}

.vote-tiers .tier-row span:first-child {
  color: var(--text-muted);
}

.vote-tiers .tier-row span:last-child {
  color: var(--accent-primary);
  font-weight: 600;
}

/* =============================================
   Footer
   ============================================= */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-content p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-tagline {
  font-size: 0.75rem !important;
  color: var(--text-dim) !important;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

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

.separator {
  color: var(--text-dim);
}

/* =============================================
   Responsive Design
   ============================================= */

@media (max-width: 1024px) {
  .token-content-grid {
    grid-template-columns: 1fr;
  }

  .pool-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .pool-stats {
    width: 100%;
    justify-content: space-between;
  }

  .pool-stat {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
    height: auto;
    padding: 1rem;
    gap: 1rem;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .main {
    padding: 1.5rem 1rem;
  }

  .hero {
    padding: 2rem 0 3rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .search-container {
    flex-direction: column;
  }

  .search-input-wrapper {
    width: 100%;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-tabs {
    justify-content: center;
    flex-wrap: wrap;
  }

  .filter-info {
    justify-content: center;
  }

  .token-table th,
  .token-table td {
    padding: 0.875rem 1rem;
  }

  .th-volume,
  .th-mcap,
  .th-views,
  .cell-volume,
  .cell-mcap,
  .cell-views {
    display: none;
  }

  .token-header {
    flex-direction: column;
    text-align: center;
  }

  .token-header-left {
    flex-direction: column;
    align-items: center;
  }

  .token-name-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .token-address-row {
    justify-content: center;
  }

  .token-header-right {
    text-align: center;
  }

  .price-stats-mini {
    justify-content: center;
  }

  .chart-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .chart-timeframes {
    width: 100%;
    justify-content: center;
  }

  .type-selector {
    grid-template-columns: repeat(3, 1fr);
  }

  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .pagination-left,
  .pagination-right {
    min-width: auto;
    order: 2;
    width: 100%;
    justify-content: center;
  }

  .pagination-center {
    order: 1;
    width: 100%;
    justify-content: center;
  }

  .pagination-right {
    display: none;
  }

  .rows-label {
    display: none;
  }

  .btn svg {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .filter-tabs {
    gap: 0.25rem;
    padding: 0.25rem;
  }

  .filter-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }

  .filter-icon {
    display: none;
  }

  .token-logo {
    width: 36px;
    height: 36px;
  }

  .token-name {
    font-size: 0.875rem;
  }

  .cell-price,
  .cell-change {
    font-size: 0.8125rem;
  }

  .token-price-large {
    font-size: 2rem;
  }

  .chart-container {
    height: 280px;
  }

  .type-selector {
    grid-template-columns: repeat(2, 1fr);
  }

  .type-selector .type-option:last-child {
    grid-column: span 2;
  }

  .wallet-input-container {
    flex-direction: column;
  }

  .wallet-input-container .btn {
    justify-content: center;
  }
}

/* =============================================
   Utility Classes
   ============================================= */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease;
}

.animate-slide-up {
  animation: slideUp 0.4s ease;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 25%,
    var(--bg-hover) 50%,
    var(--bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =============================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ============================================= */

/* Touch-friendly tap highlight */
* {
  -webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
}

/* Smooth scrolling with momentum */
html {
  -webkit-overflow-scrolling: touch;
}

/* Form inputs - prevent iOS zoom */
input[type="text"],
input[type="url"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
  font-size: 16px !important; /* Prevents iOS auto-zoom */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Touch target improvements - minimum 44x44px */
.btn {
  min-height: 44px;
  min-width: 44px;
}

.btn-sm {
  min-height: 36px;
  padding: 0.5rem 0.875rem;
}

.btn-icon {
  width: 44px;
  height: 44px;
}

.vote-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0.625rem 0.875rem;
}

.filter-tab {
  min-height: 44px;
  padding: 0.75rem 1.25rem;
}

.nav-link {
  min-height: 44px;
  display: flex;
  align-items: center;
}

.page-tab {
  min-height: 44px;
  min-width: 44px;
}

.pagination-arrow {
  width: 44px;
  height: 44px;
}

.rows-btn {
  min-height: 36px;
  padding: 0.5rem 0.875rem;
}

.timeframe-btn {
  min-height: 40px;
  padding: 0.625rem 1rem;
}

.chart-metric-btn,
.chart-type-btn {
  min-height: 36px;
  padding: 0.5rem 0.875rem;
}

.submissions-tab {
  min-height: 40px;
  padding: 0.625rem 1rem;
}

.modal-close {
  min-width: 44px;
  min-height: 44px;
  padding: 0.75rem;
}

/* =============================================
   900px Breakpoint - Tablets
   ============================================= */

@media (max-width: 900px) {
  .token-content-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .chart-controls {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .submit-features {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-left {
    align-items: center;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* =============================================
   768px Breakpoint - Small Tablets / Large Phones
   ============================================= */

/* Already exists - extending with additional fixes */
@media (max-width: 768px) {
  /* Stats grid - 2 column still works here */
  .stats-grid {
    gap: 0.5rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.125rem;
  }

  /* Pool stats optimization */
  .pool-stats {
    gap: 1rem;
  }

  /* Submission cards - stack on mobile */
  .submission-meta {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .submission-votes {
    width: 100%;
    justify-content: space-between;
  }

  /* My submissions card */
  .my-submission-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .submission-info {
    width: 100%;
  }

  .submission-status-badge {
    align-self: flex-start;
  }

  /* Chart header full stack */
  .chart-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .chart-controls {
    width: 100%;
  }

  .chart-metric-toggle,
  .chart-type-toggle {
    flex: 1;
    justify-content: center;
  }

  /* Community link chips */
  .community-links-inline {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .community-link-chip {
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
  }
}

/* =============================================
   600px Breakpoint - Landscape Phones
   ============================================= */

@media (max-width: 600px) {
  .header-content {
    padding: 0.75rem 1rem;
  }

  /* Hide logo text on smaller screens */
  .logo-text {
    display: none;
  }

  .logo-badge {
    display: none;
  }

  .main {
    padding: 1rem 0.75rem;
  }

  .hero {
    padding: 1.5rem 0 2rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
  }

  /* Stats grid to 1 column */
  .stats-grid {
    grid-template-columns: 1fr;
  }

  /* Token table - horizontal scroll wrapper */
  .token-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .token-table {
    min-width: 500px;
  }

  /* Search results mobile constraints */
  .search-results {
    max-height: 60vh;
    max-height: 60dvh;
  }

  .search-result-item {
    padding: 0.875rem 1rem;
  }

  /* Modals - full height option */
  .modal-overlay {
    padding: 0.5rem;
    align-items: flex-end;
  }

  .modal-content {
    max-width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1.5rem;
  }

  .voting-modal-overlay {
    padding: 0.5rem;
    align-items: flex-end;
  }

  .voting-modal {
    max-width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1.5rem;
  }

  /* Imgur modal */
  .imgur-help-modal {
    max-width: 100%;
    max-height: 85vh;
    max-height: 85dvh;
    overflow-y: auto;
  }

  /* Token header compact */
  .token-header {
    padding: 1rem;
    gap: 1rem;
  }

  .token-logo-large {
    width: 56px;
    height: 56px;
  }

  .token-name-row h1 {
    font-size: 1.375rem;
  }

  .token-price-large {
    font-size: 1.75rem;
  }

  .price-stats-mini {
    gap: 1rem;
    flex-wrap: wrap;
  }

  /* Form section */
  .submit-form {
    padding: 1.25rem;
  }

  .form-progress {
    flex-wrap: wrap;
    gap: 0.375rem;
  }

  .progress-line {
    width: 24px;
  }

  .step-label {
    display: none;
  }

  /* Type selector 2 columns */
  .type-selector {
    grid-template-columns: repeat(2, 1fr);
  }

  .type-selector .type-option:last-child {
    grid-column: span 2;
  }

  .type-card {
    padding: 1rem 0.5rem;
  }

  /* Pagination simplified */
  .page-tabs {
    gap: 0.125rem;
    padding: 0.125rem;
  }

  .page-tab {
    min-width: 40px;
    padding: 0 0.5rem;
  }

  .rows-selector {
    display: none;
  }

  /* Submissions section */
  .submissions-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .submissions-tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
  }

  /* Card sections */
  .chart-section,
  .stats-section,
  .social-section,
  .trade-section,
  .submissions-section,
  .pools-section {
    padding: 1rem;
  }

  /* Banner section */
  .community-banner-wrapper .community-banner {
    max-height: 150px;
  }

  /* Footer compact */
  .footer {
    padding: 1rem;
  }

  .footer-links {
    gap: 0.75rem;
  }

  .footer-links .separator {
    display: none;
  }

  .footer-links a span {
    display: none;
  }
}

/* =============================================
   480px Breakpoint - Small Phones
   ============================================= */

/* Already exists - extending */
@media (max-width: 480px) {
  /* Filter tabs scroll horizontally */
  .filter-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: flex-start;
  }

  .filter-tab {
    flex-shrink: 0;
    padding: 0.625rem 1rem;
  }

  /* Token table further simplification */
  .token-table {
    min-width: 400px;
  }

  .token-table th,
  .token-table td {
    padding: 0.75rem 0.5rem;
  }

  .th-rank,
  .cell-rank {
    width: 40px;
    padding-left: 0.5rem;
    padding-right: 0.25rem;
  }

  .token-cell {
    gap: 0.5rem;
  }

  .token-logo {
    width: 32px;
    height: 32px;
  }

  .token-name {
    font-size: 0.8125rem;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .token-symbol-cell {
    font-size: 0.75rem;
  }

  /* Hide change column on very small screens */
  .th-change,
  .cell-change {
    display: none;
  }

  /* Chart stats wrap */
  .chart-stats {
    gap: 1rem;
  }

  .chart-stat {
    flex: 1;
    min-width: 80px;
  }

  /* Voting buttons compact */
  .vote-btn {
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
  }

  .submission-score {
    font-size: 0.875rem;
  }

  /* Pool card compact */
  .pool-card {
    padding: 1rem;
  }

  .pool-stats {
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .pool-stat .value {
    font-size: 0.8125rem;
  }

  /* Wallet cards */
  .wallet-required-card {
    padding: 1.5rem 1rem;
  }

  .wallet-required-icon {
    width: 48px;
    height: 48px;
  }

  .wallet-required-card h3 {
    font-size: 1.125rem;
  }

  .wallet-connected-card {
    padding: 0.875rem 1rem;
  }

  /* Banner preview smaller */
  .banner-preview {
    max-height: 150px;
  }

  /* Trade buttons stack */
  .trade-links {
    gap: 0.5rem;
  }

  .trade-btn {
    padding: 0.875rem;
  }

  /* Social links compact */
  .social-link-btn {
    padding: 0.75rem;
    gap: 0.625rem;
  }

  /* API status banner */
  .api-status {
    font-size: 0.8125rem;
    padding: 0.75rem;
    flex-wrap: wrap;
    text-align: center;
  }
}

/* =============================================
   360px Breakpoint - Very Small Phones
   ============================================= */

@media (max-width: 360px) {
  .main {
    padding: 0.75rem 0.5rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .search-input {
    padding: 0.875rem 2.5rem 0.875rem 2.75rem;
    font-size: 0.875rem;
  }

  .search-icon {
    left: 1rem;
    width: 18px;
    height: 18px;
  }

  .btn-search {
    padding: 0.875rem 1rem;
  }

  /* Single column everything */
  .type-selector {
    grid-template-columns: 1fr;
  }

  .type-selector .type-option:last-child {
    grid-column: span 1;
  }

  /* Page tabs minimal */
  .page-tab {
    min-width: 36px;
    font-size: 0.8125rem;
  }

  /* Voting modal compact */
  .voting-modal {
    padding: 1.25rem;
  }

  .voting-modal-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
  }

  .voting-modal h3 {
    font-size: 1.125rem;
  }

  .voting-modal p {
    font-size: 0.875rem;
  }
}

/* =============================================
   Safe Area Support (Notch Devices)
   ============================================= */

@supports (padding: max(0px)) {
  .header {
    padding-top: max(0px, env(safe-area-inset-top));
  }

  .header-content {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .main {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .footer {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .modal-overlay {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  }

  .api-status {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* =============================================
   Landscape Phone Orientation
   ============================================= */

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 1rem 0;
  }

  .hero h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .hero p {
    margin-bottom: 1rem;
  }

  .modal-overlay {
    align-items: center;
  }

  .modal-content,
  .voting-modal {
    max-height: 85vh;
    border-radius: var(--radius-xl);
  }

  .chart-container {
    height: 200px;
  }
}

/* =============================================
   Reduced Motion Preference
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .loading-spinner {
    animation: none;
    border-top-color: var(--accent-primary);
  }

  .skeleton {
    animation: none;
    background: var(--bg-tertiary);
  }
}

/* =============================================
   High Contrast Mode Support
   ============================================= */

@media (prefers-contrast: high) {
  :root {
    --border-color: rgba(255, 255, 255, 0.2);
    --border-subtle: rgba(255, 255, 255, 0.1);
  }

  .btn {
    border: 2px solid currentColor;
  }

  .filter-tab.active,
  .page-tab.active {
    border: 2px solid var(--accent-primary);
  }
}

/* =============================================
   Developer API Section Styles
   ============================================= */

.api-section {
  max-width: 900px;
}

.about-icon.api {
  background: linear-gradient(135deg, #10b981, #059669);
}

/* API Key Management Section */
.api-key-section {
  margin-bottom: 2.5rem;
}

.api-key-section h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.api-key-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.api-key-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.api-key-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.api-key-card-content svg {
  color: var(--text-muted);
}

.api-key-card-content p {
  color: var(--text-secondary);
  margin: 0;
}

.api-key-register-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 400px;
}

.api-key-register-form input {
  flex: 1;
  min-width: 180px;
  padding: 0.625rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
}

.api-key-register-form input::placeholder {
  color: var(--text-muted);
}

.api-key-register-form input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Has key state */
.api-key-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.api-key-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.api-key-status.active {
  color: var(--green);
}

.api-key-status.active svg {
  color: var(--green);
}

.btn-danger {
  color: var(--red);
}

.btn-danger:hover {
  background: var(--red-light);
}

.api-key-details {
  display: grid;
  gap: 0.5rem;
}

.api-key-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.375rem 0;
}

.api-key-label {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.api-key-value {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-primary);
}

.api-key-note {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* New key created state */
.api-key-created-card {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.05);
}

.api-key-success-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.api-key-success-header svg {
  color: var(--green);
}

.api-key-success-header h4 {
  margin: 0;
  color: var(--green);
  font-size: 1.125rem;
}

.api-key-warning {
  color: var(--yellow);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.api-key-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.api-key-display code {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-primary);
  word-break: break-all;
}

/* API Documentation Section */
.api-docs-section h3 {
  font-size: 1.125rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.api-docs-section h3:first-child {
  margin-top: 0;
}

.api-docs-section > p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.api-docs-section code {
  background: var(--bg-tertiary);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent-primary);
}

.api-endpoint {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.api-endpoint-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.api-method {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.api-method.get {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.api-method.post {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.api-method.delete {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

.api-path {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: transparent;
  padding: 0;
}

.api-endpoint-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

.api-example {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.api-example-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.api-example pre {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 0;
  overflow-x: auto;
}

.api-example pre code {
  background: transparent;
  padding: 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.6;
  white-space: pre;
}

.api-rate-limits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.api-rate-limits li {
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.api-rate-limits li strong {
  color: var(--text-primary);
}

.api-error-codes {
  display: grid;
  gap: 0.5rem;
}

.api-error-code {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.625rem 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.api-error-code code {
  min-width: 40px;
  padding: 0.25rem 0.5rem;
  text-align: center;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--yellow);
}

.api-error-code span {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Responsive adjustments for API section */
@media (max-width: 640px) {
  .api-key-register-form {
    flex-direction: column;
  }

  .api-key-register-form input {
    min-width: 100%;
  }

  .api-endpoint-header {
    flex-wrap: wrap;
  }

  .api-example pre {
    font-size: 0.6875rem;
  }
}
