/* =========================================================
   Bloxxia Modern Theme - Index
   ========================================================= */
:root {
  --bg: #0b0b0d;
  --panel: #121216;
  --muted: #1b1b22;
  --text: #e9eaee;
  --sub: #9aa0aa;
  --accent: #44abef;
  --ring: #1b4d99;
  --border: #23232b;
  --shadow: rgba(0,0,0,0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: all 0.25s ease;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
}

img {
  display: block;
  max-width: 100%;
  border-radius: 6px;
}

/* =========================================================
   Topbar
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
  gap: 20px;
}

.logo-main img {
  max-width: 180px;
  height: auto;
}

.nav-center {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.nav-center a {
  color: var(--sub);
  font-weight: 600;
  position: relative;
  padding: 6px 8px;
  text-decoration: none;
}

.nav-center a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.nav-center a.active {
  color: var(--accent);
  font-weight: 700;
}

.nav-center a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* =========================================================
   Container / Layout
   ========================================================= */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

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

.main-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

.count-badge {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--sub);
  font-weight: 600;
}

/* =========================================================
   Grid
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.card {
  background: linear-gradient(180deg, #131318, #101016);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 18px var(--shadow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px var(--shadow);
}

.card .thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  background: #0c0c10;
  overflow: hidden;
}

.card .thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.card .body {
  padding: 14px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 1px solid var(--border);
}

.card .name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text);
  line-height: 1.3;
}

.card .meta {
  font-size: 0.85rem;
  color: var(--sub);
  font-weight: 600;
}

/* =========================================================
   Loading / Footer
   ========================================================= */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--sub);
  font-size: 1.2rem;
}

.footer {
  width: 100%;
  text-align: center;
  padding: 24px 0;
  margin-top: 40px;
  background: var(--panel);
  border-top: 1px solid var(--border);
  color: var(--sub);
  font-size: 0.9rem;
}

/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  
  .topbar {
    flex-direction: column;
    padding: 12px;
    gap: 12px;
  }
}
