/* Qubers WebApp - Dark Theme */
:root {
  --bg: #0a0a0a;
  --bg-card: #161616;
  --bg-card-hover: #1e1e1e;
  --bg-input: #1a1a1a;
  --accent: #7c5cfc;
  --accent-hover: #6a4ae0;
  --accent-glow: rgba(124, 92, 252, 0.25);
  --text: #f0f0f0;
  --text-secondary: #888;
  --text-muted: #555;
  --border: #2a2a2a;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 8px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 64px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px);
}

/* Desktop max-width constraint */
.page, .header {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.header-logo span { color: var(--accent); }

.header-balance {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.header-balance b { color: var(--text); }

/* Page container */
.page {
  display: none;
  padding: 16px 16px 24px;
  animation: fadeIn 0.2s ease;
}

.page.active { display: block; }

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

/* Bottom nav */
.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: var(--nav-height);
  padding-bottom: var(--safe-bottom);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 0;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.nav-item.active { color: var(--accent); }
.nav-item:active { transform: scale(0.95); }

.nav-item svg { width: 22px; height: 22px; }

.nav-item span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Generate center button */
.nav-item.generate-btn {
  position: relative;
  top: -14px;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.nav-item.generate-btn svg { width: 26px; height: 26px; }
.nav-item.generate-btn span { display: none; }
.nav-item.generate-btn.active { color: #fff; }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Example photos on home page */
.example-section {
  margin-bottom: 8px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
  text-transform: uppercase;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.example-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3 / 4;
  -webkit-tap-highlight-color: transparent;
}

.example-card:active { transform: scale(0.97); }

.example-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.example-card:hover img { transform: scale(1.03); }

.example-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 10px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

/* Reference generation preview */
.ref-preview-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.ref-preview-img {
  width: 80px;
  height: 100px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.ref-preview-info { flex: 1; min-width: 0; }

/* Style grid */
.style-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.style-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.style-card:active { transform: scale(0.97); }
.style-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 16px var(--accent-glow);
}

.style-emoji { font-size: 28px; margin-bottom: 6px; }
.style-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }

.style-cost {
  font-size: 11px;
  color: var(--text-secondary);
}

.style-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Category tabs */
.category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.cat-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  width: 100%;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.btn-danger:active {
  background: rgba(248, 113, 113, 0.3);
}

/* Tier selector */
.tier-row {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.tier-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.15s;
}

.tier-btn.active {
  border-color: var(--accent);
  background: rgba(124, 92, 252, 0.1);
}

.tier-btn .tier-label { font-size: 13px; font-weight: 600; }
.tier-btn .tier-cost { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* History list */
.history-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  align-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.history-item:active { background: var(--bg-card-hover); }

.history-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.history-thumb .type-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0,0,0,0.55);
  border-radius: 4px;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  pointer-events: none;
}

.history-thumb .type-badge svg {
  width: 10px;
  height: 10px;
}

.history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-info { flex: 1; min-width: 0; }
.history-style { font-size: 13px; font-weight: 600; }
.history-date { font-size: 11px; color: var(--text-muted); }

.history-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  flex-shrink: 0;
}

.history-status.done { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.history-status.pending, .history-status.processing { background: rgba(251, 191, 36, 0.15); color: var(--warning); }
.history-status.failed { background: rgba(248, 113, 113, 0.15); color: var(--danger); }

/* Image viewer overlay */
.viewer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.viewer-overlay.active {
  display: flex;
}

.viewer-full {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.viewer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 201;
}

.viewer-close:active { background: rgba(255, 255, 255, 0.2); }

.viewer-media {
  flex: 1;
  width: 100%;
  object-fit: contain;
  min-height: 0;
}

.viewer-panel {
  padding: 16px;
  background: rgba(0, 0, 0, 0.85);
  padding-bottom: calc(16px + var(--safe-bottom));
}

.viewer-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.viewer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.viewer-author-name {
  font-size: 14px;
  font-weight: 600;
}

.viewer-caption {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.viewer-actions {
  display: flex;
  gap: 8px;
}

.viewer-action-btn {
  flex: 1;
}

.viewer-repeat-btn {
  flex: 1.5;
  background: var(--success) !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.viewer-repeat-btn:hover { opacity: 0.9; }
.viewer-repeat-btn:active { transform: scale(0.97); }

/* Profile */
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0 auto 12px;
}

.profile-name {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-id {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.stat-row {
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin-bottom: 20px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Referral */
.referral-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
}

.referral-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.referral-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.referral-link-row {
  display: flex;
  gap: 8px;
}

.referral-link-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text);
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.copy-btn:active { transform: scale(0.95); }

/* Upload area */
.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s;
}

.upload-area:hover { border-color: var(--accent); }

.upload-area svg { width: 40px; height: 40px; color: var(--text-muted); margin-bottom: 8px; }

.upload-area p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Loading spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 24px auto;
}

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

/* Generating state */
.generating-overlay {
  text-align: center;
  padding: 48px 16px;
}

.generating-overlay .spinner {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

.generating-overlay p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 16px;
}

/* Face thumbnail in generating overlay */
.generating-face-thumb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  margin-bottom: 8px;
}

/* Suggestions during generation */
.generating-suggestions {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Result display */
.result-image {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  z-index: 999;
  transition: transform 0.3s ease;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}

.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.3; }
.empty-state p { font-size: 13px; }

/* Yandex login button */
.btn-yandex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: #fc3f1d;
  color: #fff;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.btn-yandex:hover { background: #e03415; }
.btn-yandex:active { transform: scale(0.97); }

/* Telegram login button */
.btn-telegram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: #2AABEE;
  color: #fff;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.btn-telegram:hover { background: #229ED9; }
.btn-telegram:active { transform: scale(0.97); }

/* Provider linking in Profile */
.provider-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.provider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.provider-row:last-child { border-bottom: none; }

.provider-name {
  font-size: 14px;
  font-weight: 600;
}

.provider-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  border: none;
}

.provider-badge.linked {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.provider-badge.link-btn {
  background: rgba(124, 92, 252, 0.15);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.15s;
}

.provider-badge.link-btn:hover {
  background: rgba(124, 92, 252, 0.3);
}

.provider-badge.link-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Face photo in profile */
.face-photo-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.face-photo-thumb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.face-photo-btn {
  flex: 1;
  cursor: pointer;
}

.face-photo-placeholder {
  text-align: center;
  padding: 16px 0;
  color: var(--text-muted);
}

.face-photo-placeholder svg {
  margin-bottom: 6px;
  opacity: 0.4;
}

.face-photo-placeholder p {
  font-size: 12px;
}

/* Delete button in history for failed items */
.history-delete-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(248, 113, 113, 0.15);
  border: none;
  color: var(--danger);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.history-delete-btn:active {
  background: rgba(248, 113, 113, 0.3);
}

/* Referred users in profile */
.referred-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.referred-user-row:last-child { border-bottom: none; }

.referred-name {
  font-size: 13px;
  font-weight: 600;
}

.referred-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 8px;
}

.referred-bonus {
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  background: rgba(52, 211, 153, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Custom Style card on home page */
.custom-style-card {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.custom-style-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.custom-style-card:active {
  transform: scale(0.98);
}

.custom-style-card svg {
  color: var(--accent);
  margin-bottom: 10px;
}

.custom-style-card-text {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.custom-style-card-sub {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Custom Style upload area */
.custom-style-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s;
  margin-bottom: 12px;
}

.custom-style-upload-area:hover {
  border-color: var(--accent);
}

.custom-style-upload-area svg {
  color: var(--text-muted);
  margin-bottom: 10px;
}

.custom-style-upload-area p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Legal footer */
.legal-footer {
  text-align: center;
  padding: 24px 16px;
  margin-bottom: calc(var(--nav-height) + 16px);
  border-top: 1px solid var(--border);
}

.legal-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  margin: 0 8px;
}

.legal-footer a:hover {
  color: var(--accent);
}

.legal-footer-copy {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 8px;
  opacity: 0.6;
}

/* Referral promo block on home */
.referral-promo {
  border-color: var(--accent);
  background: rgba(124, 92, 252, 0.06);
  cursor: pointer;
}

.btn-inline {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

/* Studio styles scroll */
.studio-styles-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.studio-styles-scroll::-webkit-scrollbar { display: none; }

.studio-style-chip {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.studio-style-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Feed grid */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.feed-card {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.feed-card:active { transform: scale(0.98); }

.feed-card-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.feed-card-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.feed-card-likes {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}

.feed-card-author {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 8px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

/* Onboarding overlay */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.onboarding-step {
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.onboarding-step h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.onboarding-step > p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.onboarding-styles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.onboarding-style-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.onboarding-style-card:active { transform: scale(0.96); }

.onboarding-style-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 16px var(--accent-glow);
}
