/* PrettyCamGirl Rank — UI Components (Cards, Buttons, Cooldown, Accordion, Modal, Toasts) */

/* Quick Filter Pills */
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  border-color: var(--border-hover);
  color: var(--text-main);
  background: var(--bg-surface-elevated);
}

.filter-pill.is-active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 18px var(--accent-glow);
}

.filter-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-live);
}

.filter-pill.is-active .filter-pill__dot {
  background: #ffffff;
}

/* Search & Select Controls */
.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  pointer-events: none;
}

.input-field,
.select-field {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.875rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-field {
  width: 100%;
  padding: 0.58rem 0.9rem 0.58rem 2.4rem;
}

.input-field::placeholder {
  color: var(--text-soft);
}

.select-field {
  padding: 0.56rem 0.85rem;
  min-width: 150px;
}

.input-field:hover,
.select-field:hover {
  border-color: var(--border-hover);
}

.input-field:focus,
.select-field:focus {
  outline: none;
  border-color: var(--accent-rose);
  box-shadow: 0 0 0 3px rgba(255, 42, 122, 0.16);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.52rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent-rose);
  color: #ffffff;
}

.btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.active-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 42, 122, 0.14);
  border: 1px solid rgba(255, 42, 122, 0.4);
  color: #ff7fb0;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Creator Card */
.creator-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-med), border-color var(--transition-med), box-shadow var(--transition-med);
}

.creator-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 42, 122, 0.48);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d0b12;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.card-media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.creator-card:hover .card-media__img {
  transform: scale(1.04);
}

.card-media__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(9, 8, 12, 0.68) 0%,
    rgba(9, 8, 12, 0) 42%,
    rgba(9, 8, 12, 0.75) 100%
  );
  pointer-events: none;
}

.card-media__top {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  right: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-media__bottom {
  position: absolute;
  bottom: 0.65rem;
  left: 0.7rem;
  right: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Badges */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(9, 8, 12, 0.82);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-main);
}

.rank-badge--1 {
  border-color: rgba(255, 209, 102, 0.65);
  color: var(--gold-rank);
  box-shadow: 0 0 16px rgba(255, 209, 102, 0.25);
}

.rank-badge--2 {
  border-color: rgba(212, 216, 232, 0.55);
  color: var(--silver-rank);
}

.rank-badge--3 {
  border-color: rgba(232, 155, 108, 0.55);
  color: var(--bronze-rank);
}

.badge-live,
.badge-offline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.badge-live {
  background: rgba(0, 230, 118, 0.18);
  border: 1px solid rgba(0, 230, 118, 0.55);
  color: var(--green-live);
}

.badge-live__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-live);
  box-shadow: 0 0 8px var(--green-live);
  animation: pulseLive 1.6s ease-in-out infinite;
}

.badge-offline {
  background: rgba(18, 16, 23, 0.82);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.viewer-chip,
.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(9, 8, 12, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-main);
  backdrop-filter: blur(8px);
}

/* Card Body */
.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem;
  gap: 0.85rem;
}

.creator-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.creator-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.creator-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
  background: var(--bg-base);
}

.creator-avatar--online {
  border-color: var(--green-live);
}

.creator-titles {
  min-width: 0;
  flex: 1;
}

.creator-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creator-handle {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creator-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 26px;
}

.category-chip {
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 42, 122, 0.12);
  border: 1px solid rgba(255, 42, 122, 0.3);
  color: #ff7fb0;
  font-size: 0.72rem;
  font-weight: 700;
}

.tag-chip {
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.tag-chip:hover {
  border-color: var(--accent-rose);
  color: var(--text-main);
}

/* Footer / Vote Tally + Vote Button */
.card-footer {
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vote-tally-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.vote-tally-label {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.vote-tally-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  transition: transform 220ms ease, color 220ms ease;
}

.vote-tally-value.is-bumped {
  transform: scale(1.12);
  color: var(--accent-rose-hover);
}

.vote-btn {
  position: relative;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.68rem 1rem;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(255, 42, 122, 0.25);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.vote-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(255, 42, 122, 0.42);
  filter: brightness(1.06);
}

.vote-btn:active:not(:disabled) {
  transform: translateY(0);
}

.vote-btn.is-loading {
  opacity: 0.85;
  cursor: wait;
}

.vote-btn--cooldown {
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(255, 42, 122, 0.35);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.vote-btn--cooldown::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: calc(var(--cooldown-progress, 1) * 100%);
  background: var(--accent-gradient);
  transition: width 900ms linear;
}

.btn-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Skeleton Cards */
.skeleton-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-block {
  background: linear-gradient(
    90deg,
    var(--bg-surface-elevated) 25%,
    #252132 50%,
    var(--bg-surface-elevated) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.skeleton-media {
  aspect-ratio: 16 / 9;
}

.skeleton-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.skeleton-line {
  height: 14px;
  border-radius: 6px;
}

.skeleton-line--short {
  width: 55%;
}

.skeleton-btn {
  height: 40px;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Empty & Error States */
.grid-state-panel {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.85rem;
  padding: 3.5rem 1.5rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
}

.grid-state-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.grid-state-desc {
  color: var(--text-muted);
  max-width: 44ch;
  font-size: 0.92rem;
}

/* FAQ Accordion */
details.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.05rem 1.25rem;
  transition: border-color var(--transition-fast);
}

details.faq-item:hover {
  border-color: var(--border-hover);
}

details.faq-item[open] {
  border-color: rgba(255, 42, 122, 0.45);
}

summary.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

summary.faq-question::-webkit-details-marker {
  display: none;
}

summary.faq-question::after {
  content: "+";
  font-size: 1.3rem;
  line-height: 1;
  color: var(--accent-rose);
  font-weight: 400;
  flex-shrink: 0;
}

details.faq-item[open] summary.faq-question::after {
  content: "−";
}

.faq-answer {
  margin-top: 0.8rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Turnstile Verification Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(6, 5, 9, 0.78);
  backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] {
  display: none;
}

.turnstile-modal {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  animation: modalIn 180ms ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.modal-title {
  font-size: 1.08rem;
  font-weight: 700;
}

.modal-close-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.modal-close-btn:hover {
  color: var(--text-main);
  border-color: var(--accent-rose);
}

.modal-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.turnstile-widget-slot {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
}

/* Toast Notifications */
.toast-stack {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: min(360px, calc(100vw - 2.5rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  animation: modalIn 180ms ease-out;
}

.toast--success {
  border-color: rgba(0, 230, 118, 0.48);
}

.toast--error {
  border-color: rgba(255, 42, 122, 0.55);
}

.toast--info {
  border-color: rgba(155, 77, 255, 0.45);
}

.toast-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
}

.toast-message {
  font-size: 0.8rem;
  color: var(--text-muted);
}
