body.devices-page {
  background: #000;
  color: #f8f9fa;
  font-family: "Poppins", sans-serif;
}

.devices-section {
  padding: 110px 0 80px;
  background: #000;
}

.devices-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.devices-filters {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(20, 20, 20, 0.95), rgba(8, 8, 8, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.devices-filter-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.brand-tile {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 96px;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.brand-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.brand-tile.is-active {
  border-color: rgba(40, 167, 69, 0.45);
  background: rgba(40, 167, 69, 0.14);
  box-shadow: 0 0 0 1px rgba(40, 167, 69, 0.12);
}

.brand-tile-name {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-tile-count {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  font-weight: 600;
}

.brand-tile.is-active .brand-tile-count {
  color: #7dff7d;
}

.devices-search-wrap {
  position: relative;
}

.devices-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.devices-search-input {
  width: 100%;
  padding: 0.95rem 1rem 0.95rem 2.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgba(20, 20, 20, 0.95), rgba(8, 8, 8, 0.98));
  color: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.devices-search-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.devices-search-input:focus {
  border-color: rgba(40, 167, 69, 0.45);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.12);
}

.devices-result-count {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
}

.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.devices-loading,
.devices-empty,
.devices-error {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 160px;
  padding: 1.25rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
}

.device-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  height: 100%;
  padding: 1.1rem;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(20, 20, 20, 0.95), rgba(8, 8, 8, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.device-card:hover {
  transform: translateY(-3px);
  border-color: rgba(40, 167, 69, 0.35);
}

.device-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.device-status,
.device-codename-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.device-status.is-active {
  background: rgba(40, 167, 69, 0.16);
  color: #7dff7d;
}

.device-status.is-inactive {
  background: rgba(255, 80, 80, 0.12);
  color: #ff9b9b;
}

.device-codename-badge {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
}

.device-avatar-wrap {
  display: flex;
  justify-content: center;
}

.device-avatar {
  width: 150px;
  height: 150px;
  border-radius: 18px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.device-title {
  margin: 0;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.device-meta-line {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.86rem;
  text-align: center;
}

.device-variant-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.device-variant-pill {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 600;
}

.device-card-actions {
  margin-top: auto;
  display: flex;
  justify-content: center;
}

.device-build-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(40, 167, 69, 0.35);
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.18), rgba(40, 167, 69, 0.06));
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.device-build-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 255, 125, 0.45);
  color: #fff;
}

.header.scrolled {
  backdrop-filter: blur(50px);
  background-color: rgba(0, 0, 0, 0.5);
  transition: backdrop-filter 0.3s, background-color 0.3s;
}

@media (max-width: 768px) {
  .devices-section {
    padding-top: 96px;
  }

  .brand-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-tile {
    min-width: 0;
    width: 100%;
  }

  .devices-grid {
    grid-template-columns: 1fr;
  }
}
