/* === GOOGLE FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Figtree:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* === CSS VARIABLES — DARK === */
:root {
  --bg:           #080a0f;
  --surface:      #0f1117;
  --surface-2:    #171921;
  --surface-3:    #1e2029;
  --border:       rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.18);
  --text:         #e8e9ed;
  --text-muted:   #666c7e;
  --text-subtle:  #353848;
  --accent:       #ffffff;
  --accent-dim:   rgba(255,255,255,0.08);
  --accent-glow:  rgba(255,255,255,0.15);
  --accent-text:  #080a0f;
  --danger:       #f87171;
  --radius:       12px;
  --radius-sm:    8px;
  --nav-h:        62px;
  --shadow-sm:    0 2px 14px rgba(0,0,0,0.45);
  --shadow:       0 8px 32px rgba(0,0,0,0.55);
  --transition:   0.2s ease;
}

/* === LIGHT THEME === */
[data-theme="light"] {
  --bg:           #f0f1f5;
  --surface:      #ffffff;
  --surface-2:    #e9eaef;
  --surface-3:    #dddfe6;
  --border:       rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.18);
  --text:         #0d0f18;
  --text-muted:   #60657a;
  --text-subtle:  #b8bcc8;
  --accent:       #0d0f18;
  --accent-dim:   rgba(13,15,24,0.09);
  --accent-glow:  rgba(13,15,24,0.15);
  --accent-text:  #ffffff;
  --shadow-sm:    0 2px 12px rgba(0,0,0,0.07);
  --shadow:       0 6px 28px rgba(0,0,0,0.10);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.25s ease, color 0.25s ease;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 28px 28px;
}
[data-theme="light"] body::before {
  background-image: radial-gradient(circle, rgba(0,0,0,0.045) 1px, transparent 1px);
}

.navbar, .search, .page-container, .center,
.profile-container, .dev-container, footer { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.75; }

/* === ANIMATIONS === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.anim-1 { animation: fadeUp 0.4s 0.05s ease both; }
.anim-2 { animation: fadeUp 0.4s 0.15s ease both; }
.anim-3 { animation: fadeUp 0.4s 0.25s ease both; }
.anim-4 { animation: fadeUp 0.4s 0.35s ease both; }

/* === NAVBAR === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.35s ease both;
  transition: background 0.3s;
}
.navbar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 55%);
  opacity: 0.45;
}

.nav-left { display: flex; align-items: center; gap: 4px; }

.brand {
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: bold;
  color: var(--text);
  letter-spacing: -0.7px;
  margin-right: 14px;
  line-height: 1;
  transition: color 0.2s;
}
.brand:hover { color: var(--accent); opacity: 1; }

.nav-left a:not(.brand) {
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 7px;
  transition: color var(--transition), background var(--transition);
}
.nav-left a:not(.brand):hover {
  color: var(--text);
  background: var(--surface-2);
  opacity: 1;
}

.nav-right { display: flex; align-items: center; gap: 8px; }

/* === BUTTONS === */
button {
  cursor: pointer;
  font-family: 'Figtree', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  border: none;
  outline: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  background: var(--accent);
  color: var(--accent-text);
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
button:hover {
  transform: translateY(-1px);
  opacity: 0.88;
  box-shadow: 0 4px 16px var(--accent-glow);
}
button:active { transform: translateY(0); opacity: 1; }

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface-3);
  box-shadow: none;
  border-color: var(--border-hover);
  opacity: 1;
}

.btn-sm  { padding: 6px 13px; font-size: 12.5px; }
.btn-full { width: 100%; padding: 11px 18px; font-size: 14px; }

.theme-toggle {
  background: var(--surface-2);
  color: var(--text);
  padding: 7px 9px;
  font-size: 15px;
  line-height: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.theme-toggle:hover {
  transform: rotate(18deg) translateY(-1px);
  box-shadow: none;
  opacity: 1;
  background: var(--surface-3);
}

/* === NAV DISCORD === */
.btn-nav-discord {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #5865F2;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 7px;
  opacity: 1 !important;
  transition: box-shadow 0.2s, transform 0.15s, opacity 0.15s;
}
.btn-nav-discord:hover {
  box-shadow: 0 4px 14px rgba(88,101,242,0.45);
  transform: translateY(-1px);
  opacity: 0.92 !important;
}

/* === INPUTS === */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"] {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
  transition: border 0.2s, box-shadow 0.2s;
}
input::placeholder { color: var(--text-muted); }
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* === SEARCH === */
.search {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 24px 36px;
}
.search-row { display: flex; gap: 10px; width: 100%; max-width: 480px; }
.search-row input { flex: 1; }
.search-hint { font-size: 12.5px; color: var(--text-muted); }
.search-hint kbd {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 11px;
  font-family: inherit;
  color: var(--text-muted);
  margin: 0 2px;
}

/* === PAGE CONTAINER === */
.page-container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 28px 80px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* === BUBBLES === */
.bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.bubble:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.04);
  transform: translateY(-2px);
}
.bubble h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.bubble h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* === LOCK OVERLAY === */
.locked-section { position: relative; overflow: hidden; }
.locked-section .lockable-content {
  filter: blur(3px);
  user-select: none;
  pointer-events: none;
  opacity: 0.35;
}
.lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 26px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    color-mix(in srgb, var(--surface) 55%, transparent) 30%,
    var(--surface) 58%
  );
  border-radius: var(--radius);
}
.lock-prompt { display: flex; align-items: center; gap: 12px; }
.lock-label { font-size: 13.5px; font-weight: 600; color: var(--text-muted); }

/* === USER GRID === */
.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition),
              box-shadow var(--transition), background var(--transition);
}
.user-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  background: var(--surface);
}
.user-card img {
  height: 88px;
  display: block;
  transition: transform 0.3s ease;
  image-rendering: pixelated;
}
.user-card:hover img { transform: scale(1.1) rotate(-2deg); }

/* === SERVER GRID === */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.grid div:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  transform: translateX(4px);
}
.grid div img { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }

/* === CENTER === */
.center { flex: 1; display: flex; justify-content: center; align-items: center; padding: 48px 20px; }

/* === AUTH BOX === */
.auth-box { width: 100%; max-width: 368px; }
.auth-box h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.4px;
  text-transform: none;
  color: var(--text);
  margin-bottom: 6px;
}
.auth-subtitle { color: var(--text-muted); font-size: 13.5px; margin-bottom: 28px; }
.input-group { margin-bottom: 14px; }
.input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--text-subtle);
  font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-footer { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--text-muted); }

/* === DISCORD BUTTON (forms) === */
.btn-discord {
  width: 100%;
  background: #5865F2;
  color: #fff;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
}
.btn-discord:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(88,101,242,0.35);
}

/* === DISCORD CONTINUE === */
.discord-card { text-align: center; max-width: 360px; width: 100%; }
.discord-icon-wrap {
  width: 68px; height: 68px;
  background: rgba(88,101,242,0.12);
  border: 1px solid rgba(88,101,242,0.25);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 24px rgba(88,101,242,0.15);
}
.discord-card h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 22px; letter-spacing: -0.3px; margin-bottom: 8px;
}
.discord-card > p { color: var(--text-muted); font-size: 13.5px; line-height: 1.6; margin-bottom: 20px; }
.discord-back { margin-top: 16px; font-size: 13px; color: var(--text-muted); }
.discord-perms { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; text-align: left; }
.discord-perm-item {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--text-muted);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 7px; padding: 8px 12px;
}
.perm-check { color: #4ade80; font-size: 13px; flex-shrink: 0; }

/* === PROFILE === */
.profile-container { max-width: 1100px; margin: 0 auto; padding: 40px 28px 80px; }
.profile-header { margin-bottom: 28px; }
.profile-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: 40px; font-weight: 800; letter-spacing: -0.8px; line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.profile-tags { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}
.tag-unclaimed { background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.25); color: #fbbf24; }
.tag-claimed   { background: rgba(74,222,128,0.08);  border-color: rgba(74,222,128,0.25);  color: #4ade80; }
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.profile-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 20px; align-items: start;
}
.overview     { grid-column: 1; }
.name-history { grid-column: 2; }
.skin         { grid-column: 3; }
.skins        { grid-column: 1 / span 3; }
.capes        { grid-column: 1 / span 3; }

.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px;
}
.stat-row:last-of-type { border-bottom: none; }
.stat-label { color: var(--text-muted); font-size: 12.5px; }
.stat-value { font-weight: 600; }
.connections-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); font-weight: 700; margin: 18px 0 10px;
}
.connection-icons { display: flex; gap: 8px; }
.connection-icon {
  width: 34px; height: 34px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 15px; cursor: pointer; transition: border-color var(--transition), transform var(--transition);
}
.connection-icon:hover { border-color: var(--accent); transform: scale(1.12); }

.name-entry { padding: 11px 0; border-bottom: 1px solid var(--border); }
.name-entry:last-child { border-bottom: none; }
.name-val { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.name-date { font-size: 12px; color: var(--text-muted); }

.skin-render { display: flex; justify-content: center; padding: 8px 0; }
.skin-render img {
  height: 180px; image-rendering: pixelated;
  transition: transform 0.35s ease;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.45));
}
.skin:hover .skin-render img { transform: scale(1.06) rotate(3deg); }

.skin-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; }
.skin-box {
  aspect-ratio: 1; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
}
.skin-box:hover { border-color: var(--accent); transform: scale(1.08); }

.cape-list { display: flex; gap: 12px; flex-wrap: wrap; }
.cape {
  width: 60px; height: 100px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
}
.cape:hover { border-color: var(--accent); transform: scale(1.07); }

/* === DEV PANEL === */
.dev-container { max-width: 660px; width: 100%; margin: 0 auto; padding: 48px 28px 80px; }

.dev-gate {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 72px 20px; text-align: center;
}
.dev-gate-icon { font-size: 36px; line-height: 1; }
.dev-gate h2 {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 22px; letter-spacing: -0.3px;
}
.dev-gate > p { color: var(--text-muted); font-size: 13.5px; margin-top: -2px; }
.dev-gate-form { display: flex; gap: 8px; width: 100%; max-width: 290px; margin-top: 4px; }
.dev-gate-form input { flex: 1; }
.dev-gate-error { font-size: 13px; color: var(--danger); display: none; }
.dev-gate-error.visible { display: block; }

.dev-panel { display: none; }
.dev-panel.visible { display: block; }

.dev-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.dev-panel-header h1 {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 22px; letter-spacing: -0.4px;
}

.dev-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 12px;
  transition: border-color var(--transition);
}
.dev-section:hover { border-color: var(--border-hover); }
.dev-section-label {
  font-family: 'Syne', sans-serif; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 12px;
}
.dev-input-row { display: flex; gap: 8px; align-items: center; }
.dev-input-row input { flex: 1; }
.dev-note { font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.dev-link-row { display: flex; align-items: center; gap: 8px; }
.dev-link-row input { flex: 1; }
.dev-link-arrow { color: var(--text-muted); font-size: 14px; flex-shrink: 0; }
.dev-save-notice { font-size: 12px; margin-top: 8px; display: none; color: #4ade80; }
.dev-save-notice.visible { display: block; }
.dev-accounts-empty { font-size: 13.5px; color: var(--text-muted); padding: 14px 0 4px; text-align: center; }
.dev-account-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px;
}
.dev-account-row:last-child { border-bottom: none; }

/* === FOOTER === */
footer {
  margin-top: auto; border-top: 1px solid var(--border);
  padding: 16px 28px; font-size: 12.5px; color: var(--text-muted);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-brand {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 13px; color: var(--text-muted);
}
.footer-sep { color: var(--text-subtle); user-select: none; }
.footer-right { display: flex; align-items: center; gap: 16px; }
footer a { color: var(--text-muted); font-size: 12.5px; }
footer a:hover { color: var(--text); opacity: 1; }
.footer-discord {
  display: inline-flex; align-items: center; gap: 5px;
  color: #7983f5 !important; font-weight: 500;
}
.footer-discord:hover { color: #5865F2 !important; opacity: 1 !important; }

/* ============================================================
   MOBILE RESPONSIVE — added for full mobile support
   ============================================================ */

/* === MOBILE HAMBURGER NAV === */
.nav-hamburger {
  display: none;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition);
}
.nav-hamburger:hover { background: var(--surface-3); box-shadow: none; transform: none; opacity: 1; }

.nav-mobile-drawer {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 190;
  padding: 12px 16px 20px;
  flex-direction: column;
  gap: 4px;
  animation: fadeIn 0.15s ease both;
}
.nav-mobile-drawer.open { display: flex; }
.nav-mobile-drawer a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition), color var(--transition);
  opacity: 1;
}
.nav-mobile-drawer a:hover { background: var(--surface-2); color: var(--text); opacity: 1; }
.nav-mobile-drawer .drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}
.nav-mobile-drawer .drawer-actions {
  display: flex;
  gap: 8px;
  padding: 8px 4px 0;
}
.nav-mobile-drawer .drawer-actions a { flex: 1; justify-content: center; }
.nav-mobile-drawer .btn-nav-discord { padding: 10px 14px; border-radius: 8px; }

@media (max-width: 700px) {
  /* Navbar: hide desktop links, show hamburger */
  .navbar { padding: 0 16px; }
  .nav-left a:not(.brand) { display: none; }
  .nav-right .btn-ghost,
  .nav-right > a { display: none; }
  .nav-hamburger { display: flex; align-items: center; justify-content: center; }

  /* Hero section */
  .hero { padding: 60px 20px 50px; }

  /* Search section */
  .search { padding: 28px 16px 24px; }
  .search-row { max-width: 100%; }

  /* Page container */
  .page-container { padding: 0 14px 60px; }

  /* Bubbles */
  .bubble { padding: 16px; }

  /* User grid — fewer columns on small screens */
  .user-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
  .user-card { padding: 12px 8px 10px; font-size: 11.5px; }
  .user-card img { height: 66px; }

  /* Server grid — 1 or 2 columns */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .grid div { font-size: 12.5px; padding: 9px 10px; }

  /* Footer */
  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
  }
  .footer-right { gap: 12px; flex-wrap: wrap; }

  /* Profile page */
  .profile-container { padding: 24px 14px 60px; }
  .profile-header h1 { font-size: 28px; }
  .profile-tags { gap: 6px; }

  /* Profile grid: stack to single column */
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .overview     { grid-column: 1; }
  .name-history { grid-column: 1; }
  .skin         { grid-column: 1; }
  .skins        { grid-column: 1; }
  .capes        { grid-column: 1; }

  /* Skin grid — fewer columns */
  .skin-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; }

  /* Dev panel */
  .dev-container { padding: 28px 14px 60px; }
  .dev-input-row { flex-direction: column; }
  .dev-input-row input { width: 100%; }
  .dev-link-row { flex-direction: column; }
  .dev-link-arrow { transform: rotate(90deg); align-self: center; }

  /* Auth box */
  .auth-box { padding: 0 4px; }

  /* Cape list */
  .cape-list { gap: 8px; }
  .cape { width: 50px; height: 84px; }

  /* Center padding for auth pages */
  .center { padding: 32px 16px; }
}

@media (max-width: 420px) {
  .user-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .grid { grid-template-columns: 1fr; }
  .skin-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-pills { gap: 6px; }
  .hero-pill { font-size: 11.5px; padding: 6px 11px; }
}

/* Profile page top-row: 3 cols → 1 col on mobile */
@media (max-width: 700px) {
  .top-row {
    grid-template-columns: 1fr;
  }
  .top-row .bubble.overview  { grid-column: 1; }
  .top-row .bubble.name-history { grid-column: 1; }
  .skin-col { grid-column: 1; position: static; }
  .btn-claim {
    position: static;
    width: 100%;
    margin-bottom: 8px;
    display: none; /* keep JS show logic */
  }
  .btn-claim.visible { display: flex; }
  .top-row.has-claim { margin-top: 0; }
}

/* Tablet: 2-col profile grid */
@media (min-width: 701px) and (max-width: 900px) {
  .top-row { grid-template-columns: 1fr 1fr; }
  .top-row .bubble.overview  { grid-column: 1; }
  .top-row .bubble.name-history { grid-column: 2; }
  .skin-col { grid-column: 1 / span 2; }
  .profile-grid { grid-template-columns: 1fr 1fr; }
  .skins { grid-column: 1 / span 2; }
  .capes { grid-column: 1 / span 2; }
  .skin-grid { grid-template-columns: repeat(6, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .page-container { padding: 0 20px 60px; }
}

/* Ensure hamburger button is always visible in the flex navbar */
.nav-hamburger {
  margin-left: auto;
}
