/* hubs.css — Hubs grid, toolbar, create-server CTA, hub tiles */

/* Hubs Grid */
.hubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.hub-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.hub-card:hover { transform: translateY(-5px); }
.hub-card i { font-size: 3rem; margin-bottom: 10px; color: var(--neon-blue); }
.hub-card h3 { font-size: 2rem; }

/* Hubs Sub-header (Back to Lobby + Contact Support) */
.hub-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.hub-back-link {
  background: none;
  border: none;
  color: var(--neon-blue);
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
}
.hub-back-link:hover { text-decoration: underline; }
.hub-support-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}
.hub-support-btn:hover { color: var(--text-main); border-color: var(--neon-blue); }

/* Hubs Toolbar (search + sort) */
.hub-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.hub-search-input {
  flex: 1;
  padding: 10px 18px;
  font-size: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text-main);
  outline: none;
}
.hub-search-input:focus { border-color: var(--neon-blue); }
.hub-sort-select {
  padding: 10px 14px;
  font-size: 1.4rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
}

/* "Create Your Own Server!" CTA below the grid */
.hub-create-btn {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-main);
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.hub-create-btn:hover { transform: translateY(-2px); border-color: var(--neon-green); }
.hub-create-btn .plus-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--neon-green);
  color: #06281c;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* Hub Tiles */
.hub-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.hub-tile {
  position: relative;
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--tile-color, var(--neon-blue));
  box-shadow: 0 0 18px -4px var(--tile-color, var(--neon-blue));
  transition: transform 0.2s ease;
}
.hub-tile:hover { transform: translateY(-4px); }
.hub-tile-art {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--tile-color, var(--neon-blue)) 0%, #0a0b10 130%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}
.hub-tile-art i {
  font-size: 3.4rem;
  color: rgba(255,255,255,0.85);
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.4));
}
.hub-tile-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  background: linear-gradient(0deg, rgba(0,0,0,0.75) 20%, transparent 100%);
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  text-align: left;
}
.hub-tile-caption {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 6px;
}
.hub-slot {
  display: flex;
  flex-direction: column;
}

/* Empty slot placeholder */
.hub-tile-empty {
  height: 150px;
  border-radius: 16px;
  border: 2px dashed var(--border-color);
  background: linear-gradient(135deg, var(--empty-tile-a) 45%, var(--empty-tile-b) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 12px 14px;
  color: var(--text-muted);
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.hub-tile-empty:hover {
  border-color: var(--neon-green);
  color: var(--neon-green);
}

/* Hub picture on the tile (zoom / focus come from the owner's Size settings) + owner edit button + edit-hub modal */
.hub-tile-art.has-img { overflow: hidden; opacity: 1; background: #0a0b10; }
.hub-tile-img {
  position: absolute; inset: 0;
  background-size: cover; background-repeat: no-repeat;
  background-position: var(--fx, 50%) var(--fy, 50%);
  transform: scale(var(--zoom, 1)); transform-origin: var(--fx, 50%) var(--fy, 50%);
}
.hub-tile-art.has-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0) 60%);
}
.hub-tile-edit {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s;
}
.hub-tile:hover .hub-tile-edit, .hub-tile-edit:focus-visible { opacity: 1; }
@media (hover: none) { .hub-tile-edit { opacity: 1; } }
.hub-edit-preview {
  position: relative; overflow: hidden;
  width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; margin-bottom: 10px;
  border: 2px solid var(--tile-color, var(--neon-blue));
  background: linear-gradient(135deg, var(--tile-color, var(--neon-blue)) 0%, #0a0b10 130%);
  display: flex; align-items: center; justify-content: center;
}
.hub-edit-preview i { font-size: 3.4rem; color: rgba(255,255,255,0.85); }
.hub-edit-pic-actions { display: flex; gap: 8px; }
.hub-edit-pic-actions .hub-privacy-btn { flex: 1; }
.hub-edit-frame { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.hub-edit-frame label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 1.3rem; color: var(--text-muted); }
.hub-edit-frame input[type=range] { flex: 1; max-width: 62%; }
.hub-edit-frame input[type=range]:disabled { opacity: 0.35; }
.hub-edit-reset { align-self: flex-end; background: none; border: none; color: var(--neon-blue); font-size: 1.2rem; cursor: pointer; }
.hub-edit-danger { margin-top: 14px; }
.hub-edit-danger button {
  width: 100%; padding: 8px; border-radius: 10px; cursor: pointer; font-size: 1.4rem;
  background: transparent; color: var(--neon-red); border: 1px solid var(--neon-red);
}
.hub-edit-danger button:hover { background: var(--neon-red); color: #fff; }
