/* ── Page layout ── */
.cracktros-layout {
  display: flex;
  align-items: flex-start;
}

/* ── Sidebar ── */
.groups-sidebar {
  width: 210px;
  flex-shrink: 0;
  background: #f8f9fa;
  border-right: 1px solid #ddd;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.groups-sidebar-header {
  padding: 14px 12px 10px;
  background: #fff;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}

.groups-sidebar-header h3 {
  font-size: 12px;
  font-weight: 700;
  color: #333;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.groups-filter-input {
  width: 100%;
  padding: 5px 9px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f8f9fa;
  color: #212529;
  outline: none;
}
.groups-filter-input:focus {
  border-color: #2196f3;
  background: #fff;
}

.groups-list {
  overflow-y: auto;
  flex: 1;
  padding: 5px 6px;
}
.groups-list::-webkit-scrollbar { width: 5px; }
.groups-list::-webkit-scrollbar-track { background: #f1f1f1; }
.groups-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.groups-list::-webkit-scrollbar-thumb:hover { background: #2196f3; }

.group-item {
  display: block;
  width: 100%;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 12px;
  color: #333;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: none;
  background: none;
  text-align: left;
}
.group-item:hover { background: #e3f2fd; color: #1565c0; }
.group-item.active { background: #2196f3; color: #fff; font-weight: 600; }

.groups-sidebar-footer {
  padding: 7px 12px;
  font-size: 11px;
  color: #666;
  background: #fff;
  border-top: 1px solid #ddd;
  text-align: center;
  flex-shrink: 0;
}

/* ── Main content ── */
.cracktros-main {
  flex: 1;
  min-width: 0;
  padding: 22px 26px;
}

/* ── Page intro banner ── */
.page-intro {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 20px;
}
.page-intro h1 {
  font-size: 21px;
  font-weight: 700;
  color: #212529;
  margin: 0 0 8px 0;
}
.page-intro p {
  color: #555;
  font-size: 14px;
  margin: 0;
  line-height: 1.65;
}

/* ── Results info ── */
.results-info {
  padding: 9px 14px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.results-info strong { color: #212529; }

/* ── Intros grid ── */
.intros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.intro-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
  display: flex;
  flex-direction: column;
}
.intro-card:hover {
  box-shadow: 0 4px 14px rgba(33,150,243,0.16);
  transform: translateY(-2px);
  border-color: #90caf9;
}
.intro-card a img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: #e9ecef;
}
.intro-card .card-body {
  padding: 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.intro-card .card-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}
.intro-card .card-title a { color: #212529; text-decoration: none; }
.intro-card .card-title a:hover { color: #2196f3; }
.intro-card .musician { font-size: 11px; color: #777; }
.intro-card .card-actions { margin-top: auto; padding-top: 6px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #555;
  text-decoration: none;
  font-size: 12px;
  transition: background 0.14s, color 0.14s;
}
.icon-btn:hover { background: #2196f3; color: #fff; }

/* ── Pagination ── */
.pagination { flex-wrap: wrap; gap: 4px; }
.page-link {
  border: 1px solid #ddd;
  color: #495057;
  border-radius: 4px !important;
  font-size: 13px;
  padding: 5px 11px;
}
.page-link:hover { background: #e3f2fd; border-color: #2196f3; color: #1565c0; }
.page-item.active .page-link { background: #2196f3; border-color: #2196f3; color: #fff; }

/* ── Welcome state ── */
.welcome-state {
  text-align: center;
  padding: 60px 20px;
  color: #777;
}
.welcome-state .lead { font-size: 15px; }

/* ── Credit footer ── */
.credit-box {
  text-align: center;
  padding: 16px;
  margin-top: 30px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #555;
}
.credit-box a { color: #2196f3; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .cracktros-layout { flex-direction: column; }
  .groups-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid #ddd;
  }
  .groups-list { max-height: 160px; }
  .cracktros-main { padding: 14px; }
  .intros-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
