/* public/css/viewer-tools.css — Viewer Tools Account page styles */

:root {
  --vt-bg: #0A0A0A;
  --vt-surface: #1A1A1A;
  --vt-surface-2: #1A1A1A;
  --vt-border: #222222;
  --vt-teal: #00F2EA;
  --vt-teal-dim: rgba(0, 242, 234, 0.12);
  --vt-coral: #FF4D6D;
  --vt-coral-dim: rgba(255, 77, 109, 0.12);
  --vt-gold: #FFB800;
  --vt-gold-dim: rgba(255, 184, 0, 0.12);
  --vt-text: #AAAAAA;
  --vt-muted: #666666;
  --vt-white: #FFFFFF;
  --vt-radius: 12px;
  --vt-radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--vt-bg);
  color: var(--vt-white);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Page Layout ─────────────────────────────────────────────────────────── */
.vt-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
}

.vt-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--vt-border);
}

.vt-page-header-text { flex: 1; min-width: 0; }

.vt-page-title {
  font-family: 'Montserrat', -apple-system, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.vt-page-subtitle {
  color: var(--vt-text);
  margin-top: 0.5rem;
  font-size: 0.9375rem;
}

/* ── Auth Gate ─────────────────────────────────────────────────────────── */
.vt-auth-gate {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--vt-surface);
  border-radius: var(--vt-radius);
  border: 1px solid var(--vt-border);
}

.vt-auth-gate h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.vt-auth-gate p {
  color: var(--vt-text);
  margin-bottom: 2rem;
}

.vt-auth-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Section Card ───────────────────────────────────────────────────────── */
.vt-section {
  background: var(--vt-surface);
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.vt-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vt-section-title svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Tier Badge ────────────────────────────────────────────────────────── */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tier-badge-free { background: rgba(255,255,255,0.08); color: var(--vt-text); }
.tier-badge-supporter { background: var(--vt-teal-dim); color: var(--vt-teal); }
.tier-badge-premium { background: var(--vt-gold-dim); color: var(--vt-gold); }
.tier-badge-vip { background: var(--vt-coral-dim); color: var(--vt-coral); }

/* ── Subscription Card ─────────────────────────────────────────────────── */
.sub-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.sub-card-info { flex: 1; min-width: 200px; }

.sub-card-tier {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
}

.sub-card-status {
  color: var(--vt-text);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.sub-card-status .status-active { color: #00F2EA; }
.sub-card-status .status-paused { color: #FFB800; }
.sub-card-status .status-cancelled { color: var(--vt-coral); }

.sub-card-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sub-card-actions button {
  padding: 0.5rem 1.25rem;
  border-radius: var(--vt-radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.15s;
}

.sub-card-actions button:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-upgrade {
  background: var(--vt-teal);
  color: #0A0A0A;
}

.btn-pause {
  background: rgba(255,255,255,0.08);
  color: var(--vt-white);
  border: 1px solid var(--vt-border) !important;
}

.btn-resume {
  background: var(--vt-teal);
  color: #0A0A0A;
}

.btn-cancel {
  background: transparent;
  color: var(--vt-coral);
  border: 1px solid var(--vt-coral) !important;
}

/* ── Watch History Grid ────────────────────────────────────────────────── */
.watch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.watch-item {
  border-radius: var(--vt-radius-sm);
  overflow: hidden;
  background: var(--vt-surface-2);
  border: 1px solid var(--vt-border);
  cursor: pointer;
  transition: border-color 0.15s;
}

.watch-item:hover { border-color: var(--vt-teal); }

.watch-item-thumb {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  background: #111;
}

.watch-item-info {
  padding: 0.5rem 0.75rem;
}

.watch-item-caption {
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.watch-item-meta {
  font-size: 0.75rem;
  color: var(--vt-muted);
  margin-top: 0.25rem;
}

/* ── Followed Creators ─────────────────────────────────────────────────── */
.creator-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.creator-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem;
  background: var(--vt-surface-2);
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-sm);
}

.creator-item-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #111;
  flex-shrink: 0;
}

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

.creator-item-handle {
  font-weight: 600;
  font-size: 0.9375rem;
}

.creator-item-name {
  font-size: 0.8125rem;
  color: var(--vt-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creator-item-followers {
  font-size: 0.75rem;
  color: var(--vt-muted);
}

.creator-item-actions { flex-shrink: 0; }

.follow-toggle {
  padding: 0.375rem 1rem;
  border-radius: 99px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--vt-teal-dim);
  color: var(--vt-teal);
  transition: background 0.15s;
}

.follow-toggle:hover { background: rgba(0, 194, 199, 0.25); }

.follow-toggle.following {
  background: rgba(255,255,255,0.08);
  color: var(--vt-text);
}

/* ── Notification Preferences ──────────────────────────────────────────── */
.pref-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pref-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pref-item-info { flex: 1; }

.pref-item-label {
  font-weight: 600;
  font-size: 0.9375rem;
}

.pref-item-desc {
  font-size: 0.8125rem;
  color: var(--vt-text);
  margin-top: 0.125rem;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--vt-border-2, #2E2E2E);
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider { background: var(--vt-teal); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Theme selector */
.theme-selector {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.theme-btn {
  padding: 0.375rem 1rem;
  border-radius: 99px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--vt-border);
  background: transparent;
  color: var(--vt-text);
  transition: border-color 0.15s, color 0.15s;
}

.theme-btn.active,
.theme-btn:hover {
  border-color: var(--vt-teal);
  color: var(--vt-teal);
}

/* ── Payment Section ────────────────────────────────────────────────────── */
.pay-placeholder {
  text-align: center;
  padding: 2rem;
  background: var(--vt-surface-2);
  border-radius: var(--vt-radius-sm);
  border: 1px dashed var(--vt-border);
}

.pay-placeholder p {
  color: var(--vt-muted);
  font-size: 0.875rem;
}

/* ── Empty States ───────────────────────────────────────────────────────── */
.vt-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--vt-muted);
  font-size: 0.9375rem;
}

.vt-empty svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 0.75rem;
  opacity: 0.4;
}

/* ── Pagination ─────────────────────────────────────────────────────────── */
.vt-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.vt-pagination button {
  padding: 0.5rem 1rem;
  border-radius: var(--vt-radius-sm);
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid var(--vt-border);
  background: var(--vt-surface-2);
  color: var(--vt-white);
  transition: border-color 0.15s;
}

.vt-pagination button:hover { border-color: var(--vt-teal); }
.vt-pagination button:disabled { opacity: 0.4; cursor: default; }

/* ── Error / Success Messages ──────────────────────────────────────────── */
.vt-msg {
  padding: 0.75rem 1rem;
  border-radius: var(--vt-radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.vt-msg-error {
  background: var(--vt-coral-dim);
  color: var(--vt-coral);
  border: 1px solid rgba(255, 77, 109, 0.3);
}

.vt-msg-success {
  background: var(--vt-teal-dim);
  color: var(--vt-teal);
  border: 1px solid rgba(0, 194, 199, 0.3);
}

/* ── Logout Button ─────────────────────────────────────────────────────── */
.btn-logout {
  padding: 0.5rem 1.25rem;
  border-radius: var(--vt-radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--vt-coral);
  border: 1px solid var(--vt-coral);
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-logout:hover { opacity: 0.85; transform: translateY(-1px); }

/* ── Notifications List ────────────────────────────────────────────────── */
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.notif-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
  padding: 0.75rem;
  background: var(--vt-surface-2);
  border: 1px solid var(--vt-border);
  border-radius: var(--vt-radius-sm);
}

.notif-item.notif-read { opacity: 0.6; }

.notif-item-body {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex: 1;
  min-width: 0;
}

.notif-item-type {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 99px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--vt-teal-dim);
  color: var(--vt-teal);
  flex-shrink: 0;
}

.notif-item-msg {
  font-size: 0.875rem;
  color: var(--vt-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-time {
  font-size: 0.75rem;
  color: var(--vt-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Saved Videos Unsave Button ─────────────────────────────────────────── */
.watch-item { position: relative; }

.save-remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.7);
  border: none;
  color: var(--vt-coral);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 2;
  transition: background 0.15s;
}

.save-remove-btn:hover { background: rgba(255,77,109,0.3); }

.creator-item-info .tier-badge {
  margin-top: 0.25rem;
  font-size: 0.6875rem;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .vt-page { padding: 1.25rem 1rem 5rem; }
  .vt-page-title { font-size: 1.5rem; }
  .sub-card { flex-direction: column; align-items: flex-start; }
  .sub-card-actions { width: 100%; }
  .sub-card-actions button { flex: 1; }
  .watch-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}