/* =========================
   Variáveis de Tema Gaming
   ========================= */
:root {
  --bg: #0f0f14;
  --bg-secondary: #161622;
  --bg-card: #1a1a2e;
  --text: #ffffff;
  --text-muted: #888;
  --accent: #5b6cff;
  --accent-light: #7c8cff;
  --accent-hover: #4a5aee;
  --border: #2a2a40;
  --border-light: #3a3a55;
  --success: #00c853;
  --warning: #ffd600;
  --error: #ff5252;
  --gold: #ffd700;
  --gradient: linear-gradient(135deg, #5b6cff 0%, #7c8cff 100%);
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --shadow-glow: 0 4px 30px rgba(91, 108, 255, 0.2);
}

/* =========================
   Reset & Base
   ========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3 {
  font-weight: 600;
  margin: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =========================
   Header / Navbar
   ========================= */
.header {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 24px;
  margin: 20px auto 0;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease;
}

.header:hover {
  box-shadow: var(--shadow-glow);
}

.header .brand h1 {
  font-size: 1.5rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================
   Botões
   ========================= */
.btn {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.btn:hover {
  background: var(--accent-light);
  color: #fff;
  border-color: var(--accent-light);
  transform: translateY(-2px);
}

.btn.primary {
  background: var(--gradient);
  color: #fff;
  border: none;
  font-weight: 600;
}

.btn.primary:hover {
  background: linear-gradient(135deg, #4a5aee 0%, #6b7cee 100%);
  box-shadow: 0 4px 15px rgba(91, 108, 255, 0.4);
}

.btn.support {
  background: transparent;
  border: 1px solid var(--success);
  color: var(--success);
}

.btn.support:hover {
  background: var(--success);
  color: #fff;
}

/* =========================
   Wiki Main Layout
   ========================= */
.wiki-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* =========================
   Wiki Sections
   ========================= */
.wiki-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  animation: fadeIn 0.5s ease forwards;
}

.wiki-section:nth-child(2) { animation-delay: 0.1s; }
.wiki-section:nth-child(3) { animation-delay: 0.2s; }
.wiki-section:nth-child(4) { animation-delay: 0.3s; }
.wiki-section:nth-child(5) { animation-delay: 0.4s; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-header h2 {
  font-size: 1.4rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================
   Community Posts
   ========================= */
.community-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.post:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.post summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  list-style: none;
  padding: 16px;
}

.post summary::-webkit-details-marker {
  display: none;
}

.post-title {
  font-weight: 600;
  color: var(--warning);
  font-size: 1.05rem;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.post-content {
  padding: 0 16px 16px;
  color: #ccc;
  line-height: 1.7;
}

.video {
  margin-top: 16px;
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 8px;
  overflow: hidden;
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* =========================
   XP Calculator
   ========================= */
.xp-calculator-box {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.xp-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.xp-field {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.3s ease;
}

.xp-field:focus-within {
  border-color: var(--accent);
}

.xp-field span {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.xp-field input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 600;
  width: 100%;
}

.xp-calc-btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #885716;
  background: linear-gradient(180deg, #ffdf2b 0%, #a88013 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 0 #5f3d09, 0 8px 20px rgba(0,0,0,0.4);
}

.xp-calc-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #5f3d09, 0 12px 25px rgba(0,0,0,0.5);
}

.xp-calc-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #5f3d09, 0 4px 10px rgba(0,0,0,0.4);
}

.xp-display {
  margin-top: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.xp-display span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.xp-display strong {
  display: block;
  font-size: 2rem;
  color: var(--accent);
  font-weight: 700;
  text-shadow: 0 0 20px rgba(91, 108, 255, 0.3);
}

.xp-display small {
  display: block;
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* =========================
   Tables (Inimigos)
   ========================= */
.table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.desktop-table {
  display: block;
}

.mobile-cards-container {
  display: none;
}

.wiki-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.wiki-table th,
.wiki-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.wiki-table th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.wiki-table tbody tr {
  transition: all 0.2s ease;
}

.wiki-table tbody tr:hover {
  background: rgba(91, 108, 255, 0.1);
}

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

/* Raridades */
.r-common { color: #ffffff; }
.r-uncommon { color: #00b7ff; }
.r-rare { color: var(--warning); }
.r-epic { color: #ff5252; }
.r-legendary { color: #ff8c00; }

.drops-cell {
  font-size: 0.85rem;
  color: #aaa;
  max-width: 200px;
}

.drops-cell span {
  display: block;
  margin-bottom: 4px;
}

/* =========================
   Equipment Grid
   ========================= */
.equipment-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.equipment-grid h3 {
  font-size: 1.2rem;
  color: var(--accent-light);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.equipment-table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.equipment-mobile-cards {
  display: none;
  flex-direction: column;
  gap: 10px;
}

/* Desktop: show table, hide mobile cards */
.equipment-grid .equipment-table-container {
  display: block;
}

.equipment-grid .equipment-mobile-cards {
  display: none;
}

.equipment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.equipment-table th,
.equipment-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.equipment-table th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.equipment-table tbody tr {
  transition: all 0.2s ease;
}

.equipment-table tbody tr:hover {
  background: rgba(91, 108, 255, 0.1);
}

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

/* =========================
   Footer
   ========================= */
.footer {
  width: 100%;
  max-width: 1200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin: 40px auto 20px;
  box-shadow: var(--shadow);
}

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

.footer-brand h3 {
  font-size: 1.1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

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

.copyright {
  text-align: center;
  color: #666;
  font-size: 0.85rem;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* =========================
   Mobile Cards for Enemies
   ========================= */
.mobile-cards-container {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.mobile-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.mobile-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.mobile-card-header {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: var(--bg);
}

.mobile-card-header strong {
  font-size: 1rem;
  color: var(--text);
}

.mobile-card-header span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.mobile-card-body {
  display: none;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.mobile-card.open .mobile-card-body {
  display: block;
}

.mobile-card-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mobile-card-row:last-child {
  border-bottom: none;
}

.mobile-card-row b {
  color: var(--text-muted);
  font-weight: 500;
}

.mobile-card-row span {
  color: var(--text);
  text-align: right;
}

/* =========================
   Mobile Styles
   ========================= */
.mobile-only { display: none; }
.desktop-only { display: table-row; }

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 20px;
  }
  
  .header nav {
    justify-content: center;
  }
  
  .header .brand h1 {
    font-size: 1.3rem;
  }
  
  .wiki-main {
    padding: 12px;
  }
  
  .wiki-section {
    padding: 16px;
    border-radius: 12px;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .section-header h2 {
    font-size: 1.2rem;
  }
  
  .xp-inputs {
    grid-template-columns: 1fr;
  }
  
  .xp-field {
    padding: 16px;
    min-height: 70px;
  }
  
  .xp-field input {
    font-size: 1.4rem;
  }
  
  .xp-field span {
    font-size: 0.8rem;
  }
  
  .xp-calc-btn {
    padding: 18px;
    font-size: 1.1rem;
    min-height: 56px;
  }
  
  .xp-display {
    padding: 16px;
  }
  
  .xp-display strong {
    font-size: 1.5rem;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
  
  /* Desktop table hidden on mobile */
  .desktop-table {
    display: none;
  }
  
  /* Mobile cards visible on mobile */
  .mobile-cards-container {
    display: flex;
  }
  
  /* Touch-friendly buttons */
  .btn {
    padding: 12px 16px;
    min-height: 44px;
    font-size: 0.95rem;
  }
  
  .community-grid {
    gap: 12px;
  }
  
  .post summary {
    padding: 14px;
    min-height: 60px;
  }
  
  .post-title {
    font-size: 1rem;
  }
  
  .post-meta {
    font-size: 0.8rem;
    white-space: normal;
    max-width: 120px;
    text-align: right;
  }
  
  .post-content {
    padding: 0 14px 14px;
    font-size: 0.95rem;
  }
  
  /* Equipment mobile cards */
  .equipment-grid {
    gap: 16px;
  }
  
  .equipment-set h3 {
    font-size: 1.1rem;
    padding: 12px;
    margin-bottom: 0;
  }
  
  .equipment-table-container {
    border: none;
    border-radius: 0;
  }
  
  .equipment-mobile-cards {
    display: none;
    flex-direction: column;
    gap: 10px;
  }
  
  .equipment-mobile-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
  }
  
  .equipment-mobile-card.open {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
  }
  
  .equipment-mobile-header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    min-height: 52px;
    -webkit-tap-highlight-color: transparent;
  }
  
  .equipment-mobile-header strong {
    font-size: 0.95rem;
    color: var(--text);
  }
  
  .equipment-mobile-header .rarity-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
  }
  
  .equipment-mobile-body {
    display: none;
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
  }
  
  .equipment-mobile-card.open .equipment-mobile-body {
    display: block;
  }
  
  .equipment-mobile-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
  }
  
  .equipment-mobile-row:last-child {
    border-bottom: none;
  }
  
  .equipment-mobile-row b {
    color: var(--text-muted);
    font-weight: 500;
  }
  
  .equipment-mobile-row span {
    color: var(--text);
    text-align: right;
  }
  
  .equipment-toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
  }
  
  .equipment-mobile-card.open .equipment-toggle-icon {
    transform: rotate(180deg);
  }
  
  /* Equipment: On mobile, hide table, show mobile cards */
  .equipment-grid .equipment-table-container {
    display: none;
  }
  
  .equipment-grid .equipment-mobile-cards {
    display: flex;
  }
}

/* =========================
   Animations
   ========================= */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

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

