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

:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s ease;
  --max-width: 1200px;
}

[data-theme="dark"] {
  --bg: #0A0A12;
  --bg-alt: #0F0F1C;
  --surface: #161626;
  --surface-hover: #1C1C32;
  --border: rgba(255,255,255,0.06);
  --text: #F4F4FA;
  --text-secondary: #9B9BB4;
  --text-muted: #6B6B80;
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --gradient: linear-gradient(135deg, #7C3AED, #4F46E5, #14B8A6);
  --gradient-subtle: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(79,70,229,0.15), rgba(20,184,166,0.15));
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --positive: #14B8A6;
  --negative: #EF4444;
}

[data-theme="light"] {
  --bg: #F8F9FC;
  --bg-alt: #FFFFFF;
  --surface: #FFFFFF;
  --surface-hover: #F0F1F5;
  --border: rgba(0,0,0,0.08);
  --text: #0F0F1C;
  --text-secondary: #555570;
  --text-muted: #8888A0;
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --gradient: linear-gradient(135deg, #7C3AED, #4F46E5, #14B8A6);
  --gradient-subtle: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(79,70,229,0.08), rgba(20,184,166,0.08));
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
  --positive: #059669;
  --negative: #DC2626;
}

[data-theme="dark"] .logo-light,
[data-theme="light"] .logo-dark { display: none; }
[data-theme="dark"] .logo-dark,
[data-theme="light"] .logo-light { display: block; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.7; -webkit-font-smoothing: antialiased; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: 0.95rem;
  padding: 12px 28px; border-radius: 12px; border: none; cursor: pointer;
  transition: all var(--transition); text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(79,70,229,0.4); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; border-radius: 10px; }
.btn-block { width: 100%; }

.gradient-text { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,18,0.8); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
[data-theme="light"] .navbar { background: rgba(248,249,252,0.85); }

.navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.navbar-logo img { height: 32px; width: auto; }
.nav-links { display: flex; list-style: none; gap: 32px; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color var(--transition); }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: all var(--transition);
}
.theme-toggle:hover { background: var(--surface-hover); }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.mobile-menu-btn {
  display: none; flex-direction: column; gap: 5px; background: none; border: none;
  cursor: pointer; padding: 4px;
}
.mobile-menu-btn span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--transition); }

/* Hero */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 120px 0 80px; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg canvas { width: 100%; height: 100%; opacity: 0.4; }
.hero-content { position: relative; z-index: 1; text-align: center; max-width: 800px; }
.hero-title { font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 16px; }
.hero-subtitle { font-size: clamp(1.1rem, 2.5vw, 1.5rem); color: var(--text-secondary); font-weight: 500; margin-bottom: 20px; }
.hero-desc { font-size: 1.05rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 40px; line-height: 1.8; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 64px; }

.trust-bar { display: flex; gap: 48px; justify-content: center; flex-wrap: wrap; padding-top: 48px; border-top: 1px solid var(--border); }
.trust-item { text-align: center; }
.trust-number { display: block; font-size: 1.6rem; font-weight: 700; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.trust-label { font-size: 0.85rem; color: var(--text-muted); }

/* Sections */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; text-align: center; margin-bottom: 48px; letter-spacing: -0.02em; }
.section-desc { text-align: center; color: var(--text-secondary); max-width: 600px; margin: -24px auto 40px; font-size: 1.05rem; line-height: 1.8; }

/* About */
.about-content, .vision-content {
  max-width: 720px; margin: 0 auto; text-align: center;
}
.about-content p, .vision-content p {
  color: var(--text-secondary); font-size: 1.05rem; line-height: 1.9; margin-bottom: 20px;
}

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: all var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(79,70,229,0.2); }

/* Values */
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.value-card { padding: 40px 28px; text-align: center; }
.value-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--gradient-subtle); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: var(--primary); }
.value-card h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.value-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* Why */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.why-card { padding: 36px 28px; }
.why-number { font-size: 2rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 12px; }
.why-card h3 { font-size: 1rem; font-weight: 500; color: var(--text-secondary); line-height: 1.6; }

/* NFT Grid */
.nft-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.nft-card { overflow: hidden; }
.nft-image { height: 240px; overflow: hidden; }
.nft-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.nft-card:hover .nft-image img { transform: scale(1.05); }
.nft-info { padding: 20px; }
.nft-info h4 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.nft-creator { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }
.nft-bid { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.bid-label { font-size: 0.8rem; color: var(--text-muted); }
.bid-amount { font-weight: 700; font-size: 1rem; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Collections */
.collections-list { max-width: 900px; margin: 0 auto; }
.collection-header { display: grid; grid-template-columns: 48px 1fr 120px 80px; gap: 16px; padding: 12px 24px; font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.collection-row { display: grid; grid-template-columns: 48px 1fr 120px 80px; gap: 16px; padding: 16px 24px; align-items: center; margin-bottom: 8px; }
.col-rank { font-weight: 700; color: var(--text-muted); }
.col-name { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.collection-avatar { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; object-fit: cover; }
.col-volume { font-weight: 600; font-size: 0.95rem; }
.col-change { font-weight: 600; font-size: 0.9rem; }
.col-change.positive { color: var(--positive); }
.col-change.negative { color: var(--negative); }

/* Stake */
.stake-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stake-card { padding: 32px; }
.stake-token { font-size: 1.2rem; font-weight: 700; margin-bottom: 24px; }
.stake-stats { display: flex; justify-content: space-between; margin-bottom: 24px; }
.stake-stat { text-align: center; }
.stat-label { display: block; font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.stat-value { font-size: 1.15rem; font-weight: 700; }

/* Community */
.community-section { text-align: center; }
.community-links { display: flex; gap: 16px; justify-content: center; }
.community-link {
  width: 56px; height: 56px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: all var(--transition); text-decoration: none;
}
.community-link:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }

/* CTA Section */
.cta-section { background: var(--gradient-subtle); }
.cta-content { text-align: center; padding: 40px 0; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 16px; line-height: 1.6; }
.footer-links h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 16px; }
.footer-links a { display: block; color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; padding: 4px 0; transition: color var(--transition); }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 32px; border-top: 1px solid var(--border); }
.footer-bottom p { color: var(--text-muted); font-size: 0.85rem; }
.footer-socials { display: flex; gap: 16px; }
.footer-socials a { color: var(--text-muted); transition: color var(--transition); }
.footer-socials a:hover { color: var(--primary); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; width: 90%; max-width: 420px; transform: translateY(20px); transition: transform var(--transition);
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h3 { font-size: 1.2rem; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; padding: 4px; }
.wallet-option {
  width: 100%; display: flex; align-items: center; gap: 16px; padding: 16px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; margin-bottom: 10px; color: var(--text); font-size: 1rem; font-weight: 500;
  font-family: var(--font); transition: all var(--transition);
}
.wallet-option:hover { border-color: var(--primary); background: var(--gradient-subtle); }

.nav-mobile-auth { display: none; }

/* Reveal animation — noscript fallback ensures content shows if JS fails */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 1024px) {
  .values-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .nft-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; position: fixed; top: 72px; left: 0; right: 0; background: var(--surface);
    flex-direction: column; padding: 24px; gap: 16px; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.active { display: flex; }
  .mobile-menu-btn { display: flex; }
  .nav-actions .btn { display: none; }
  .nav-mobile-auth { display: list-item; }
  .nav-mobile-auth a { color: var(--primary); font-weight: 600; }

  .hero { min-height: auto; padding: 120px 0 60px; }
  .hero-title { font-size: 2.8rem; }
  .trust-bar { gap: 24px; }
  .trust-item { flex: 1 0 40%; }

  .section { padding: 64px 0; }
  .values-grid, .why-grid, .stake-grid { grid-template-columns: 1fr; }
  .nft-grid { grid-template-columns: 1fr; }

  .collection-header, .collection-row { grid-template-columns: 36px 1fr 90px 70px; gap: 8px; padding: 12px 16px; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

/* ===================== ADMIN DASHBOARD ===================== */

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 250px;
  background: #1a1a2e;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.admin-sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-sidebar-logo h2 {
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #7C3AED, #4F46E5, #14B8A6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.admin-sidebar-logo span {
  font-size: 0.75rem;
  color: #888;
  display: block;
  margin-top: 4px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  background: transparent;
  color: #aaa;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, color 0.2s;
}

.admin-nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.admin-nav-item.active {
  background: rgba(124,58,237,0.15);
  color: #a78bfa;
  border-right: 3px solid #7C3AED;
}

.admin-main {
  flex: 1;
  margin-left: 250px;
  background: #f5f7fa;
  min-height: 100vh;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.admin-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a1a2e;
}

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

.admin-content {
  padding: 24px 32px;
}

/* Admin Stats Grid */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.admin-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.admin-stat-card .label {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.admin-stat-card .value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a2e;
}

/* Admin Tables */
.admin-table-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
}

.admin-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.admin-table-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table thead {
  background: #f9fafb;
}

.admin-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #555;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e5e7eb;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
}

.admin-table tbody tr:hover {
  background: #f9fafb;
}

/* Admin Buttons */
.admin-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-btn-primary {
  background: linear-gradient(135deg, #7C3AED, #4F46E5);
  color: #fff;
}

.admin-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.admin-btn-edit {
  background: #eef2ff;
  color: #4F46E5;
}

.admin-btn-edit:hover {
  background: #e0e7ff;
}

.admin-btn-approve {
  background: #ecfdf5;
  color: #059669;
}

.admin-btn-approve:hover {
  background: #d1fae5;
}

.admin-btn-reject, .admin-btn-delete {
  background: #fef2f2;
  color: #dc2626;
}

.admin-btn-reject:hover, .admin-btn-delete:hover {
  background: #fee2e2;
}

/* Admin Badges */
.admin-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
}

.admin-badge-pending {
  background: #fef3c7;
  color: #d97706;
}

.admin-badge-approved {
  background: #d1fae5;
  color: #059669;
}

.admin-badge-rejected {
  background: #fee2e2;
  color: #dc2626;
}

/* Admin Modal */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.admin-modal {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.admin-modal h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 20px;
}

/* Admin Form */
.admin-form-group {
  margin-bottom: 16px;
}

.admin-form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}

.admin-form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #333;
  background: #fff;
  transition: border-color 0.2s;
}

.admin-form-input:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.admin-form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  z-index: 9999;
  animation: toastIn 0.3s ease;
}

.toast-error {
  background: #dc2626;
}

.toast-success {
  background: #059669;
}

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

/* Spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0,0,0,0.1);
  border-top-color: #7C3AED;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 0 auto;
}

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

/* Admin Responsive */
@media (max-width: 768px) {
  .admin-sidebar {
    width: 60px;
    overflow: hidden;
  }

  .admin-sidebar-logo h2,
  .admin-sidebar-logo span {
    display: none;
  }

  .admin-sidebar-logo {
    padding: 16px 10px;
  }

  .admin-nav-item {
    justify-content: center;
    padding: 14px 10px;
    font-size: 1.1rem;
  }

  .admin-main {
    margin-left: 60px;
  }

  .admin-content {
    padding: 16px;
  }

  .admin-header {
    padding: 16px;
  }
}
