/* Каталог активных дропсов — витрина компаний */

.drops-body {
  min-height: 100vh;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.drops-main {
  padding: 2.5rem 0 4.5rem;
}

.drops-hero {
  margin-bottom: 1.75rem;
}

.drops-kicker {
  margin: 0 0 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-hot);
}

.drops-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.drops-lead {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.drops-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: center;
  margin-top: 1.5rem;
}

.drops-search {
  flex: 1 1 240px;
  max-width: 420px;
}

.drops-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 0.7rem 1rem;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.drops-search input:focus {
  border-color: rgba(244, 63, 154, 0.45);
  background: rgba(244, 63, 154, 0.06);
}

.drops-stats {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--muted);
}

.drops-toolbar-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin-left: auto;
}

.drops-total-viewers {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 63, 154, 0.28);
  background: linear-gradient(135deg, rgba(244, 63, 154, 0.14), rgba(139, 92, 246, 0.1));
  color: #f9a8d4;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 650;
}

.drops-total-viewers[hidden] {
  display: none !important;
}

.drops-total-viewers svg {
  flex-shrink: 0;
  opacity: 0.95;
}

.drops-refresh {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.42rem 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.drops-refresh:hover:not(:disabled) {
  border-color: rgba(244, 63, 154, 0.4);
  background: rgba(244, 63, 154, 0.1);
  color: #f9a8d4;
}

.drops-refresh:disabled {
  opacity: 0.55;
  cursor: wait;
}

.drops-state {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 1.05rem;
}

.drops-state--err {
  color: #fb7185;
}

.drops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 1rem;
}

@media (min-width: 720px) {
  .drops-grid {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 1.15rem;
  }
}

.drops-card {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  color: inherit;
  text-align: left;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.drops-card:hover,
.drops-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(244, 63, 154, 0.35);
  background: var(--card-hover);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  outline: none;
}

.drops-card-art {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  background: #1a1524;
  display: block;
}

.drops-card-media {
  position: relative;
  overflow: hidden;
}

.drops-card-views {
  position: absolute;
  left: 0.55rem;
  bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  width: fit-content;
  max-width: calc(100% - 1.1rem);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  color: #fff;
  font-family: var(--font), 'Outfit', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 0 10px rgba(0, 0, 0, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.65);
  box-shadow: none;
  pointer-events: none;
}

.drops-card-views svg {
  flex-shrink: 0;
  opacity: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 6px rgba(0, 0, 0, 0.55));
}

.drops-modal-views {
  margin: 0.55rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 63, 154, 0.28);
  background: linear-gradient(135deg, rgba(244, 63, 154, 0.16), rgba(139, 92, 246, 0.12));
  color: #f9a8d4;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 650;
}

.drops-modal-views svg {
  flex-shrink: 0;
  opacity: 0.95;
}

.drops-modal-views[hidden] {
  display: none !important;
}

.drops-card-body {
  padding: 0.75rem 0.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 4.4rem;
}

.drops-card-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.drops-card-meta {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--muted);
}

/* Modal */
.drops-modal[hidden] {
  display: none !important;
}

.drops-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.drops-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 3, 8, 0.72);
  backdrop-filter: blur(8px);
}

.drops-modal-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 920px);
  max-height: min(92vh, 900px);
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(244, 63, 154, 0.22);
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(244, 63, 154, 0.14), transparent 55%),
    linear-gradient(180deg, #16121f, #100e18);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  padding: 1.35rem 1.4rem 1.25rem;
  animation: drops-modal-in 0.22s ease;
}

@keyframes drops-modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.drops-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.drops-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.drops-modal-head {
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
  padding-right: 2.4rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.drops-modal-art {
  width: 88px;
  height: 118px;
  border-radius: 12px;
  object-fit: cover;
  background: #1a1524;
  flex-shrink: 0;
}

.drops-modal-head h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  letter-spacing: -0.02em;
}

.drops-modal-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.drops-modal-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 0.35rem;
  margin-right: -0.15rem;
  scrollbar-gutter: stable;
}

@media (min-width: 780px) {
  .drops-modal-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
  }

  /* Одна кампания — на всю ширину, награды в 2 колонки */
  .drops-campaign:only-child {
    grid-column: 1 / -1;
  }

  .drops-campaign:only-child .drops-reward-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
}

.drops-campaign {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.drops-campaign-title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 600;
}

.drops-campaign-dates {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-ui);
}

.drops-reward-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

/* Много кампаний: внутри каждой тоже плотнее на широком экране */
@media (min-width: 900px) {
  .drops-campaign:not(:only-child) .drops-reward-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
}

.drops-reward {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.drops-reward img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: #221a2e;
}

.drops-reward-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 560;
  line-height: 1.3;
}

.drops-reward-sub {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.drops-reward-badge {
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(244, 63, 154, 0.16);
  color: #fda4d0;
  white-space: nowrap;
}

.drops-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

body.drops-modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .drops-modal {
    padding: 0.65rem;
  }
  .drops-modal-dialog {
    width: 100%;
    max-height: 94vh;
    border-radius: 18px;
    padding: 1.1rem 1rem 1.05rem;
  }
  .drops-modal-art {
    width: 64px;
    height: 86px;
  }
  .drops-reward {
    grid-template-columns: 44px 1fr;
  }
  .drops-reward-badge {
    grid-column: 2;
    justify-self: start;
  }
}
