/* From anket.php */
:root {
  --bg: #0a0212;
  --surface: #160a25;
  --surface-2: #1c0f2e;
  --accent: #bc13fe;
  --accent-soft: rgba(188, 19, 254, 0.14);
  --border: rgba(188, 19, 254, 0.22);
  --text: #ffffff;
  --muted: #bda6d5;
}

body.page-anket {
  background: var(--bg);
  color: var(--text);
}

.anket-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 14px 28px;
}

@media (max-width: 1199px) {
  .anket-wrap {
    padding-bottom: calc(24px + var(--bottom-nav-h, 62px) + env(safe-area-inset-bottom, 0px));
  }
}

.anket-top {
  background: linear-gradient(160deg, #1a0829 0%, #0d0415 100%);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.anket-top-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.anket-top-head h1 {
  margin: 0 0 6px;
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 900;
  line-height: 1.2;
  background: linear-gradient(to right, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.anket-top-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.anket-top-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.anket-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

.anket-action.primary {
  border: none;
  background: linear-gradient(135deg, #6a1b9a, var(--accent));
  box-shadow: 0 0 18px rgba(188, 19, 254, 0.35);
}

.search-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(188, 19, 254, 0.12);
  border-radius: 18px;
  padding: 14px;
}

.search-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.search-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.search-panel-title i {
  color: var(--accent);
}

.search-reset {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: 0.2s;
}

.search-reset:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.gender-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.gender-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  transition: 0.2s;
}

.gender-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.gender-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(106, 27, 154, 0.95), rgba(188, 19, 254, 0.95));
  box-shadow: 0 4px 14px rgba(188, 19, 254, 0.28);
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.search-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.search-field input,
.search-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(188, 19, 254, 0.16);
  background: #201133;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-field input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.search-field input:focus,
.search-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(188, 19, 254, 0.18);
}

.search-field select option {
  background: #1c0d2b;
  color: #fff;
}

.search-field select:disabled {
  opacity: 0.55;
}

.search-age-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.search-online {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(188, 19, 254, 0.14);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.search-online.is-disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.search-online input {
  width: auto;
  margin-top: 2px;
  accent-color: var(--accent);
}

.search-online span {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.search-online em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}

.search-online-note {
  margin: -2px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.search-online-note a {
  color: #00e676;
  font-weight: 800;
  text-decoration: none;
}

.search-submit-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 2px;
}

.search-submit {
  border: none;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #6a1b9a, var(--accent));
  box-shadow: 0 8px 22px rgba(188, 19, 254, 0.28);
}

.search-toggle {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.search-toggle i {
  margin-left: 4px;
  transition: transform 0.2s;
}

.search-panel.is-expanded .search-toggle i {
  transform: rotate(180deg);
}

.search-extra {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.search-panel.is-expanded .search-extra {
  display: flex;
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 4px 0 16px;
}

.results-count {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.results-count strong {
  color: var(--accent);
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(188, 19, 254, 0.28);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.filter-chip:hover {
  background: rgba(188, 19, 254, 0.22);
}

.filter-chip i {
  font-size: 10px;
  opacity: 0.85;
}

.grid-prem {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.tile-prem {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  display: block;
}

.tile-prem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-prem .info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 42px 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 40%, rgba(0,0,0,0.4) 70%, transparent 100%);
}

.tile-prem .name {
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}

.badge-top {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 900;
  z-index: 5;
}

.btn-want {
  grid-column: 1 / -1;
  aspect-ratio: unset;
  min-height: 76px;
  display: flex;
  flex-direction: row;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(188, 19, 254, 0.35);
  background: linear-gradient(135deg, rgba(106, 27, 154, 0.18), rgba(188, 19, 254, 0.1));
  color: #f0d7ff;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

.btn-want:hover {
  border-color: rgba(188, 19, 254, 0.55);
  background: linear-gradient(135deg, rgba(106, 27, 154, 0.28), rgba(188, 19, 254, 0.16));
}

.btn-want__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 215, 64, 0.16);
  color: #ffd740;
  font-size: 20px;
  flex-shrink: 0;
}

.btn-want__body strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.btn-want__body span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.section-title {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 900;
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.rows-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  grid-template-areas: "img content time";
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  align-items: center;
  transition: 0.2s;
}

.row-item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.row-img {
  grid-area: img;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}

.row-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-content {
  grid-area: content;
  min-width: 0;
}

.row-content h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #fff;
}

.row-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.row-meta {
  display: flex;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.row-meta span {
  background: rgba(255,255,255,0.05);
  padding: 3px 8px;
  border-radius: 999px;
}

.row-time {
  grid-area: time;
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
  align-self: start;
  justify-self: end;
}

.row-item.woman { border-left: 3px solid #ff4da6; }
.row-item.man { border-left: 3px solid #0099ff; }
.row-item.couple { border-left: 3px solid #ffd700; }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed rgba(188, 19, 254, 0.25);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  color: #fff;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.pagination-simple {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.pag-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: 0.2s;
}

.pag-btn:hover {
  border-color: var(--accent);
}

.pag-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.pag-info {
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  padding: 8px 14px;
  border-radius: 10px;
}

.pag-info span {
  color: var(--accent);
}

@media (max-width: 720px) {
  .anket-top-head {
    flex-direction: column;
  }

  .anket-top-actions {
    width: 100%;
  }

  .anket-action {
    flex: 1;
    justify-content: center;
  }

  .search-grid,
  .search-age-row {
    grid-template-columns: 1fr;
  }

  .search-submit-row {
    grid-template-columns: 1fr;
  }

  .results-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .active-filters {
    justify-content: flex-start;
  }

  .row-item {
    grid-template-columns: 72px 1fr;
    grid-template-areas:
      "img time"
      "img content";
    gap: 10px 12px;
    align-items: start;
  }

  .row-img {
    width: 72px;
    height: 72px;
  }

  .row-time {
    font-size: 11px;
    padding-top: 2px;
  }

  .grid-prem {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .gender-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pag-btn {
    padding: 12px 10px;
    font-size: 13px;
  }
}
