/* ============================================
   LOIK_H — One Piece Theme — Variables + Reset
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Pirata+One&family=Nunito:wght@300;400;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg-primary:    #0A0E1A;
  --bg-secondary:  #0F1628;
  --bg-card:       #141C35;
  --gold:          #D4A017;
  --gold-light:    #F0C040;
  --red:           #C0392B;
  --red-light:     #E74C3C;
  --ocean:         #1A5F8C;
  --ocean-light:   #2980B9;
  --text-primary:  #F0F0E8;
  --text-muted:    #8A9BB5;
  --border:        rgba(212, 160, 23, 0.2);
  --border-hover:  rgba(212, 160, 23, 0.6);

  --font-title: 'Pirata One', cursive;
  --font-body:  'Nunito', sans-serif;
  --font-code:  'JetBrains Mono', monospace;

  --radius: 12px;
  --transition: 0.25s ease;
  --max-width: 1200px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

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

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; opacity: 0.5; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }

p { color: var(--text-muted); max-width: 65ch; }

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

/* ---- Layout ---- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-title {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.section-subtitle { color: var(--text-muted); margin-bottom: 3rem; }

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 20px rgba(212, 160, 23, 0.1);
}

/* ---- Grid ---- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* ---- Rang badges ---- */
.badge-rang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-body);
}
.badge-Nakama      { background: rgba(26,95,140,0.2); color: #2980B9; border: 1px solid #1A5F8C; }
.badge-Mugiwara    { background: rgba(212,160,23,0.15); color: var(--gold); border: 1px solid var(--gold); }
.badge-Shichibukai { background: rgba(192,57,43,0.15); color: var(--red-light); border: 1px solid var(--red); }
.badge-Yonko       { background: rgba(155,89,182,0.15); color: #9B59B6; border: 1px solid #8E44AD; }
.badge-Empereur    { background: rgba(240,192,64,0.15); color: var(--gold-light); border: 1px solid var(--gold-light); box-shadow: 0 0 10px rgba(240,192,64,0.3); }

/* ---- Utilities ---- */
.text-gold  { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ---- Live badge ---- */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}
.live-badge.live {
  background: rgba(192, 57, 43, 0.2);
  border: 1px solid var(--red);
  color: var(--red-light);
}
.live-badge.live::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red-light);
  animation: pulse 1.5s ease-in-out infinite;
}
.live-badge.offline {
  background: rgba(138, 155, 181, 0.1);
  border: 1px solid rgba(138,155,181,0.3);
  color: var(--text-muted);
}
.live-badge.offline::before {
  content: '💤';
  font-size: 0.8rem;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .section { padding: 3rem 0; }
  .hide-mobile { display: none !important; }
}
