/* XO Development - Premium Metallic Gold Theme
   Matching the logo's rich amber/gold gradient aesthetic */

:root {
  /* Premium Gold Palette - Metallic gradient tones */
  --gold-light: #F5D76E;
  --gold-primary: #D4AC0D;
  --gold-dark: #9A7B0A;
  --gold-deep: #7D640A;
  
  /* Gradient definitions */
  --gold-gradient: linear-gradient(135deg, #F5D76E 0%, #D4AC0D 50%, #9A7B0A 100%);
  --gold-gradient-hover: linear-gradient(135deg, #F9E79F 0%, #F5D76E 50%, #D4AC0D 100%);
  --gold-gradient-subtle: linear-gradient(180deg, #D4AC0D 0%, #9A7B0A 100%);
  
  /* Dark theme base */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a25;
  --bg-input: #0d0d14;
  
  /* Text colors */
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  
  /* Borders */
  --border-color: #2a2a35;
  --border-gold: #9A7B0A;
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

a {
  color: var(--gold-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--gold-light);
}

/* ========================================
   BUTTONS - Premium Metallic Gold
   ======================================== */
.btn, button, input[type="submit"], .xo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Primary Button - Metallic Gold Gradient */
.btn-primary, .xo-btn-primary, button[type="submit"], input[type="submit"] {
  background: var(--gold-gradient);
  color: #000000;
  border: 1px solid var(--gold-dark);
  box-shadow: 0 2px 8px rgba(212, 172, 13, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  text-shadow: 0 1px 0 rgba(255,255,255,0.2);
}

.btn-primary:hover, .xo-btn-primary:hover, button[type="submit"]:hover, input[type="submit"]:hover {
  background: var(--gold-gradient-hover);
  box-shadow: 0 4px 16px rgba(212, 172, 13, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

/* Secondary Button - Outlined */
.btn-secondary, .xo-btn-secondary {
  background: transparent;
  color: var(--gold-primary);
  border: 2px solid var(--gold-primary);
}

.btn-secondary:hover, .xo-btn-secondary:hover {
  background: rgba(212, 172, 13, 0.1);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

/* Filter/Tag Buttons */
.filter-btn, .tag-btn {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  font-size: 13px;
}

.filter-btn:hover, .tag-btn:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.filter-btn.active, .tag-btn.active {
  background: var(--gold-gradient);
  color: #000000;
  border-color: var(--gold-dark);
  font-weight: 600;
}

/* ========================================
   FORM INPUTS - Dark Theme
   ======================================== */
input, textarea, select {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 172, 13, 0.15);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ========================================
   HEADER - Public Pages
   ======================================== */
.xo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  height: 70px;
}

.xo-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.xo-header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.xo-header-logo {
  height: 48px;
  width: auto;
}

.xo-header-title {
  display: flex;
  flex-direction: column;
}

.xo-header-title h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.xo-header-title span {
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--gold-dark);
  text-transform: uppercase;
}

.xo-header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.xo-header-nav a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s;
}

.xo-header-nav a:hover, .xo-header-nav a.active {
  color: var(--gold-primary);
}

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

/* Hamburger Menu */
.xo-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.xo-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--gold-primary);
  transition: all 0.3s;
}

/* Mobile Menu */
.xo-mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 20px;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
}

.xo-mobile-menu.active {
  display: flex;
}

.xo-mobile-menu a {
  padding: 12px 16px;
  color: var(--text-primary);
  border-radius: 8px;
  transition: background 0.2s;
}

.xo-mobile-menu a:hover {
  background: var(--bg-card);
}

/* ========================================
   SIDEBAR - Portal Pages  
   ======================================== */
.portal-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 0;
}

.portal-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand img {
  height: 40px;
  width: auto;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-text h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-brand-text span {
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--gold-dark);
  text-transform: uppercase;
}

.sidebar-section {
  padding: 16px 12px 8px;
}

.sidebar-section-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-muted);
  padding: 0 12px;
  margin-bottom: 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

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

.sidebar-link.active {
  background: var(--gold-gradient);
  color: #000000;
  font-weight: 600;
}

.sidebar-link svg, .sidebar-link i {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

.portal-content {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
  min-height: 100vh;
}

/* ========================================
   CARDS
   ======================================== */
.card, .api-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s;
}

.card:hover, .api-card:hover {
  border-color: var(--gold-dark);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.card-title, .api-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.card-description {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* Price Tags */
.price-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--gold-gradient);
  color: #000000;
  font-weight: 700;
  font-size: 14px;
  border-radius: 4px;
}

.price-tag.free {
  background: linear-gradient(135deg, #27AE60 0%, #1E8449 100%);
  color: white;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-gold {
  background: var(--bg-card);
  border: 1px solid var(--gold-dark);
  color: var(--gold-primary);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  padding: 160px 24px 80px;
  text-align: center;
  background: radial-gradient(ellipse at center top, rgba(212, 172, 13, 0.1) 0%, transparent 60%);
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.stat-card {
  text-align: center;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.stat-value {
  font-size: 36px;
  font-weight: 800;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ========================================
   CONNECT WALLET BUTTON
   ======================================== */
.connect-wallet-btn, #connectWallet {
  background: var(--gold-gradient);
  color: #000000;
  border: 1px solid var(--gold-dark);
  padding: 10px 20px;
  font-weight: 600;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(212, 172, 13, 0.3);
  transition: all 0.3s;
}

.connect-wallet-btn:hover, #connectWallet:hover {
  background: var(--gold-gradient-hover);
  box-shadow: 0 4px 16px rgba(212, 172, 13, 0.5);
  transform: translateY(-1px);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .portal-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .portal-sidebar.active {
    transform: translateX(0);
  }
  
  .portal-content {
    margin-left: 0;
    padding: 80px 20px 32px;
  }
  
  .sidebar-toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  .xo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
    padding: 0 16px;
    height: 60px;
  }
  
  .xo-header-nav {
    display: none;
  }
  
  .xo-hamburger {
    display: flex;
  }
  
  .xo-header-title h1 {
    font-size: 16px;
  }
  
  .xo-header-title span {
    display: none;
  }
  
  .xo-header-logo {
    height: 36px;
  }
  
  .hero {
    padding: 100px 16px 60px;
  }
  
  .hero h1 {
    font-size: 28px;
  }
  
  .hero p {
    font-size: 15px;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .filter-btn {
    padding: 8px 16px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .xo-header-brand {
    gap: 10px;
  }
  
  .xo-header-logo {
    height: 32px;
  }
  
  .xo-header-title h1 {
    font-size: 14px;
    letter-spacing: 1px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .card, .api-card {
    padding: 16px;
  }
}

/* ========================================
   UTILITIES
   ======================================== */
.text-gold {
  color: var(--gold-primary);
}

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

.bg-gold {
  background: var(--gold-gradient);
}

.border-gold {
  border-color: var(--gold-primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.grid {
  display: grid;
  gap: 24px;
}

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

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Fix: Add styles for actual HTML class names */
.xo-header-brand img {
  height: 50px;
  width: auto;
}

.xo-header-brand-text {
  display: flex;
  flex-direction: column;
}

.xo-header-brand-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.xo-header-brand-tagline {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .xo-header-brand img {
    height: 36px;
  }
  
  .xo-header-brand-name {
    font-size: 16px;
    letter-spacing: 1px;
  }
  
  .xo-header-brand-tagline {
    display: none;
  }
}

/* Portal Sidebar - Fixed for all portal pages */
.portal-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: #0d0d14;
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.portal-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
}

.portal-sidebar-brand img {
  height: 40px;
  width: auto;
}

.portal-sidebar-brand span {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.portal-sidebar-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.portal-sidebar-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 20px 12px;
}

.portal-sidebar-nav {
  display: flex;
  flex-direction: column;
}

.portal-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}

.portal-sidebar-nav a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.portal-sidebar-nav a:hover {
  color: var(--text-primary);
  background: rgba(255, 180, 0, 0.05);
}

.portal-sidebar-nav a.active {
  color: var(--gold-primary);
  background: rgba(255, 180, 0, 0.1);
  border-left: 3px solid var(--gold-primary);
}

/* Portal Main Content */
.portal-content, .portal-main {
  margin-left: 260px;
  padding: 32px;
  min-height: 100vh;
}

/* Mobile Portal Header */
.sidebar-toggle, .portal-mobile-header {
  display: none;
}

/* Mobile styles */
@media (max-width: 768px) {
  .portal-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }
  
  .portal-sidebar.active,
  .portal-sidebar.open {
    transform: translateX(0);
  }
  
  .portal-content, .portal-main {
    margin-left: 0;
    padding: 80px 16px 32px;
  }
  
  .sidebar-toggle {
    display: flex;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 99;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
  }
  
  .sidebar-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
  }
  
  .overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }
  
  .overlay.active {
    display: block;
  }
}
