@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  --bg: #0f0f1a;
  --panel: #1a1a2e;
  --panel2: #16213e;
  --accent: #e94560;
  --accent2: #ff6b6b;
  --gold: #ffd700;
  --text: #eaeaea;
  --muted: #a0a0a0;
  --shadow: 0 8px 32px rgba(233, 69, 96, 0.3);
}

* {
  box-sizing: border-box;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'VT323', monospace;
  font-size: 20px;
  color: var(--text);
  background: var(--bg);
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(233, 69, 96, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
  line-height: 1.6;
  min-height: 100vh;
}

.pixel-font {
  font-family: 'Press Start 2P', cursive;
}

.container {
  width: min(1200px, 94%);
  margin: 0 auto;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, var(--panel) 0%, rgba(26, 26, 46, 0.95) 100%);
  border-bottom: 4px solid var(--accent);
  box-shadow: var(--shadow);
  padding: 16px 0;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid var(--gold);
  background: var(--panel);
  box-shadow: 0 4px 0 #8b2635, 0 8px 16px rgba(233, 69, 96, 0.4);
}

.brand-text {
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  color: var(--gold);
  text-shadow: 2px 2px 0 rgba(233, 69, 96, 0.5);
}

.menu {
  display: flex;
  gap: 24px;
  align-items: center;
}

.menu a {
  text-decoration: none;
  color: var(--text);
  font-size: 22px;
  padding: 8px 16px;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.menu a:hover {
  border-color: var(--accent);
  background: rgba(233, 69, 96, 0.1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}

.btn-primary {
  background: linear-gradient(145deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 6px 0 #8b2635, 0 8px 20px rgba(233, 69, 96, 0.4);
  border-radius: 4px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #8b2635, 0 12px 24px rgba(233, 69, 96, 0.5);
}

.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #8b2635, 0 4px 12px rgba(233, 69, 96, 0.4);
}

.btn-ghost {
  background: var(--panel2);
  color: var(--text);
  border: 3px solid var(--accent);
  box-shadow: 0 4px 0 var(--accent);
  border-radius: 4px;
}

.btn-ghost:hover {
  background: rgba(233, 69, 96, 0.2);
}

.btn-ghost:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--accent);
}

/* Hero */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(145deg, var(--gold), #ffaa00);
  color: #1a1a2e;
  padding: 8px 16px;
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
  margin-bottom: 24px;
  border-radius: 4px;
  box-shadow: 0 4px 0 #cc8800;
}

.hero h1 {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(24px, 5vw, 42px);
  line-height: 1.4;
  margin: 0 0 24px;
  color: var(--gold);
  text-shadow: 4px 4px 0 var(--accent), 6px 6px 0 rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-size: 28px;
  color: var(--muted);
  margin-bottom: 32px;
}

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

/* Cards & Panels */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.card {
  background: var(--panel);
  border: 4px solid var(--panel2);
  border-radius: 8px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent));
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(145deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 24px;
}

.card h3 {
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  color: var(--gold);
  margin: 0;
}

.card p {
  margin: 0;
  color: var(--muted);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 40px 0;
}

.stat-box {
  background: var(--panel);
  border: 3px solid var(--panel2);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-family: 'Press Start 2P', cursive;
  font-size: 18px;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 18px;
  color: var(--muted);
}

/* Features Section */
.section {
  padding: 60px 0;
}

.section-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 18px;
  color: var(--gold);
  text-align: center;
  margin-bottom: 40px;
  text-shadow: 3px 3px 0 var(--accent);
}

/* Battle Arena Preview */
.arena-preview {
  background: linear-gradient(180deg, var(--panel2) 0%, var(--panel) 100%);
  border: 4px solid var(--accent);
  border-radius: 12px;
  padding: 32px;
  margin: 40px 0;
  position: relative;
}

.arena-preview::after {
  content: '⚔️ BATTLE ARENA ⚔️';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 4px 16px;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  border-radius: 4px;
}

.battle-slot {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.monster-card {
  background: var(--bg);
  border: 3px solid var(--gold);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  min-width: 200px;
}

.monster-sprite {
  width: 120px;
  height: 120px;
  background: linear-gradient(145deg, #2a2a4a, #1a1a2e);
  border-radius: 8px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 64px;
}

.hp-bar {
  height: 16px;
  background: #333;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 12px;
  border: 2px solid #555;
}

.hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff4444, #ff8844);
  width: 85%;
  transition: width 0.3s;
}

/* Wallet Connection */
.wallet-section {
  background: var(--panel);
  border: 4px solid var(--panel2);
  border-radius: 12px;
  padding: 32px;
  margin: 40px 0;
  text-align: center;
}

.wallet-status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--panel2);
  padding: 16px 24px;
  border-radius: 8px;
  border: 2px solid var(--accent);
  margin-top: 20px;
}

.wallet-status.connected {
  border-color: #00d26a;
  background: rgba(0, 210, 106, 0.1);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

.wallet-status.connected .status-dot {
  background: #00d26a;
}

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

/* Footer */
.footer {
  background: var(--panel);
  border-top: 4px solid var(--accent);
  margin-top: 60px;
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-text {
  font-size: 16px;
  color: var(--muted);
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: var(--panel2);
  border: 2px solid var(--accent);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s;
}

.social-links a:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .menu {
    display: none;
  }
  
  .hero h1 {
    font-size: 20px;
  }
  
  .battle-slot {
    flex-direction: column;
  }
}

/* Pixel border effect */
.pixel-border {
  box-shadow: 
    -4px 0 0 0 var(--panel2),
    4px 0 0 0 var(--panel2),
    0 -4px 0 0 var(--panel2),
    0 4px 0 0 var(--panel2);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--panel);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent2);
}
