/* UX polish — layout & interactions only, same color palette */

/* Focus & accessibility */
:focus-visible {
  outline: 2px solid var(--of-blue);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* Page hero */
.page-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.page-hero .page-title { margin-bottom: 4px; }
.page-hero .page-sub { margin-bottom: 0; }

.page-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.stat-pill--live {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.25);
  background: rgba(22, 163, 74, 0.08);
}

.stat-pill--live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.35);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.search-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: -12px 0 20px;
}

.search-meta a {
  color: var(--of-blue);
  font-weight: 600;
  margin-left: 6px;
}

/* Empty state */
.empty-state {
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
}

.empty-state .empty-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 12px;
  opacity: 0.7;
}

.empty-state p {
  font-size: 1rem;
  margin-bottom: 16px;
}

/* Cards */
.model-card-cover {
  overflow: hidden;
  transition: transform 0.35s ease;
}

.model-card:hover .model-card-cover {
  transform: scale(1.03);
}

.model-card-preview img {
  transition: filter 0.2s ease, transform 0.2s ease;
}

.model-card:hover .model-card-preview .preview-free img {
  transform: scale(1.04);
}

/* Profile */
.profile-meta .meta-online {
  color: #16a34a;
  font-weight: 600;
}

.profile-tab-panel {
  display: none;
}

.profile-tab-panel.active {
  display: block;
}

.profile-tab-panel .vault-placeholder {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

.profile-tab-panel .vault-placeholder strong {
  display: block;
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.tab {
  transition: color 0.15s ease, border-color 0.15s ease;
}

.media-item {
  transition: transform 0.15s ease;
}

.media-item:not(.locked):hover {
  transform: scale(1.02);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

.mobile-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 104;
  backdrop-filter: blur(2px);
}

body.mobile-menu-open {
  overflow: hidden;
}

body.mobile-menu-open .mobile-menu-backdrop {
  display: block;
}

@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .header {
    gap: 12px;
  }

  .logo span:not(.logo-icon) {
    display: none;
  }

  .sidebar {
    display: flex;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 110;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.2);
  }

  body.mobile-menu-open .sidebar {
    transform: translateX(0);
  }

  .main {
    padding-bottom: 100px;
  }

  .profile-page .main {
    padding-bottom: 120px;
  }

  .filters {
    position: sticky;
    top: calc(var(--header-h) + 4px);
    z-index: 20;
    background: var(--bg);
    padding: 8px 0 12px;
    margin-bottom: 16px;
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px;
    padding-right: 4px;
  }
}

/* Mobile search */
.mobile-search {
  display: none;
  position: relative;
  margin-bottom: 16px;
}

.mobile-search input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.9rem;
  font-family: inherit;
}

.mobile-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

@media (max-width: 900px) {
  .mobile-search { display: block; }
}

/* Skeleton loading */
.models-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

body.content-ready .models-skeleton { display: none; }

.skeleton-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.skeleton-cover {
  height: 100px;
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.skeleton-body { padding: 16px; }

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }

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

/* Notifications */
.notif-wrap { position: relative; }

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--of-blue);
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 12px;
  z-index: 120;
}

.notif-dropdown-title {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notif-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.notif-list a:hover { background: #f5f5f5; }

.notif-list img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.notif-list em {
  margin-left: auto;
  font-size: 0.7rem;
  color: #16a34a;
  font-style: normal;
  font-weight: 600;
}

.notif-dropdown-empty {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Video previews & connecting */
.video-locked img {
  filter: blur(18px) brightness(0.65);
  transform: scale(1.08);
}

.video-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 0.78rem;
  font-weight: 600;
}

.video-play-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.video-connecting {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #111;
  color: white;
  z-index: 5;
  text-align: center;
  padding: 24px;
}

.video-connecting[hidden] { display: none !important; }

.video-connecting-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--of-blue);
}

.connecting-dots {
  display: flex;
  gap: 6px;
}

.connecting-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--of-blue);
  animation: connecting-bounce 1.2s ease infinite;
}

.connecting-dots span:nth-child(2) { animation-delay: 0.15s; }
.connecting-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes connecting-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

.video-connecting-sub {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

.ext-help-note {
  width: 100%;
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}

/* Trial banner */
.trial-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--of-blue);
  border-radius: var(--radius);
  font-size: 0.88rem;
}

.trial-banner strong { color: var(--of-blue); }

/* Checkout & modals */
.modal-trial-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: -12px 0 20px;
}

.checkout-faq {
  margin-top: 16px;
  font-size: 0.82rem;
}

.checkout-faq details {
  border-top: 1px solid var(--border);
  padding: 10px 0;
}

.checkout-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.checkout-faq p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

/* Auth */
.auth-forgot {
  text-align: right;
  font-size: 0.82rem;
  margin: 4px 0 0;
}

.auth-forgot a { color: var(--of-blue); font-weight: 600; }

.auth-success {
  background: rgba(22, 163, 74, 0.1);
  color: #166534;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 12px;
}

/* Legal & footer */
.legal-page { max-width: 720px; }

.legal-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.legal-block h2 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.legal-block p {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.55;
}

.legal-block a { color: var(--of-blue); }

.legal-back { margin-top: 24px; }

.site-footer {
  margin-left: var(--sidebar-w);
  padding: 24px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--white);
}

.site-footer-age {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.site-footer-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
}

.site-footer-nav a {
  color: var(--of-blue);
  font-weight: 600;
}

/* Account extras */
.account-actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.account-manage,
.account-history {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.account-manage h2,
.account-history h2 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.account-manage-list {
  margin-top: 12px;
  padding-left: 18px;
  font-size: 0.88rem;
  color: var(--muted);
}

.account-manage-list a { color: var(--of-blue); }

.account-history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.account-history-row span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.account-history-row em {
  font-style: normal;
  font-weight: 700;
  color: var(--of-blue);
}

.model-card-preview picture,
.model-card-preview picture img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

@media (max-width: 900px) {
  .site-footer { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .model-card,
  .model-card-cover,
  .media-item,
  .sidebar,
  .stat-pill--live::before {
    transition: none;
    animation: none;
  }
}
