/* ============================================================
   AgentFolio — Reusable UI Components
   ============================================================ */

/* ============================================================
   Navbar
   ============================================================ */

.navbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-default);
  transition: background var(--transition-base);
}

[data-theme="light"] .navbar {
  background: rgba(248, 249, 252, 0.9);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--space-4);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.navbar-nav a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
  font-size: 16px;
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.navbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
  cursor: pointer;
  border: 2px solid var(--border-default);
  transition: border-color var(--transition-fast);
}

.navbar-avatar:hover { border-color: var(--accent-primary); }

.navbar-menu-toggle {
  display: none;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  cursor: pointer;
  padding: 6px 10px;
  font-size: 18px;
  border-radius: var(--radius-md);
  line-height: 1;
  flex-shrink: 0;
  transition: background var(--transition-fast);
}

.navbar-menu-toggle:hover { background: var(--bg-card-hover); }

@media (max-width: 768px) {
  .navbar-inner { gap: var(--space-2); }
  .navbar-nav { display: none; }
  .navbar-menu-toggle { display: flex; align-items: center; }
  .navbar-actions { gap: var(--space-2); }
  /* Hide secondary nav buttons on mobile — keep only primary CTA + avatar */
  .navbar-actions .btn-secondary.navbar-login-btn { display: none; }

  .navbar-nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    z-index: calc(var(--z-sticky) - 1);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-default);
    padding: var(--space-3) var(--space-4);
    gap: var(--space-1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }

  .navbar-nav.mobile-open a {
    padding: 10px var(--space-3);
    font-size: var(--text-base);
    border-radius: var(--radius-md);
  }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  line-height: 1;
}

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

.btn-primary {
  background: var(--accent-primary);
  color: #000;
  border-color: var(--accent-primary);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  border-color: var(--accent-primary-hover);
  color: #000;
  box-shadow: var(--shadow-button);
  transform: translateY(-1px);
}

.btn-cta {
  background: var(--accent-secondary);
  color: #fff;
  border-color: var(--accent-secondary);
  padding: 12px 28px;
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

.btn-cta:hover {
  background: var(--accent-secondary-hover);
  border-color: var(--accent-secondary-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-danger {
  background: transparent;
  color: var(--accent-danger);
  border-color: var(--accent-danger);
}

.btn-danger:hover {
  background: var(--accent-danger);
  color: #fff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 32px;
  font-size: var(--text-lg);
  border-radius: var(--radius-xl);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-loading {
  position: relative;
  color: transparent;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: inherit;
}

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-hover);
}

.card-clickable {
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

/* Agent Card */
.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.agent-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.03), rgba(255, 107, 53, 0.03));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.agent-card:hover::before { opacity: 1; }

.agent-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-hover);
}

.agent-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.agent-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

.agent-logo-placeholder {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.agent-card-info { flex: 1; min-width: 0; }

.agent-card-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-card-tagline {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.agent-card-badges {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

.agent-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-default);
}

.builder-mini {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.builder-mini-avatar {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.builder-mini-name {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* ============================================================
   Badges / Pills
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}

/* Pricing Badges */
.badge-free {
  background: rgba(0, 230, 118, 0.12);
  color: var(--accent-success);
  border: 1px solid rgba(0, 230, 118, 0.2);
}

.badge-freemium {
  background: rgba(68, 138, 255, 0.12);
  color: var(--accent-info);
  border: 1px solid rgba(68, 138, 255, 0.2);
}

.badge-paid {
  background: rgba(255, 171, 0, 0.12);
  color: var(--accent-warning);
  border: 1px solid rgba(255, 171, 0, 0.2);
}

.badge-contact {
  background: rgba(96, 96, 128, 0.12);
  color: var(--text-tertiary);
  border: 1px solid rgba(96, 96, 128, 0.2);
}

/* Category Badges */
.badge-category {
  background: rgba(79, 195, 247, 0.12);
  color: var(--cat-customer-support);
  border: 1px solid rgba(79, 195, 247, 0.2);
}

/* Tech Tag Badges */
.badge-tech {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ============================================================
   Forms
   ============================================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.form-label .required {
  color: var(--accent-danger);
  margin-left: 3px;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.form-input,
.form-textarea,
.form-select {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  padding: 10px 14px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--border-focus);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-tertiary);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23606080' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

.form-input.error, .form-textarea.error, .form-select.error {
  border-color: var(--accent-danger);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--accent-danger);
}

.char-counter {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-align: right;
}

.char-counter.warning { color: var(--accent-warning); }
.char-counter.error { color: var(--accent-danger); }

/* Radio group */
.radio-group {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.radio-option:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.radio-option.selected {
  border-color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.08);
  color: var(--accent-primary);
}

.radio-option input[type="radio"] { display: none; }

/* Chip/tag multi-select */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-default);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  background: var(--bg-tertiary);
}

.chip:hover { border-color: var(--accent-primary); color: var(--text-primary); }
.chip.selected {
  background: rgba(0, 212, 255, 0.12);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* File Upload */
.file-upload-zone {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--bg-input);
}

.file-upload-zone:hover,
.file-upload-zone.drag-over {
  border-color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.04);
}

.file-upload-zone input[type="file"] {
  display: none;
}

.file-upload-icon {
  font-size: 32px;
  margin-bottom: var(--space-3);
  color: var(--text-tertiary);
}

.file-upload-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.file-upload-hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

/* ============================================================
   Progress Steps
   ============================================================ */

.steps-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: var(--space-8);
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  position: relative;
}

.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border-default);
  z-index: 0;
}

.step-item.completed:not(:last-child)::after {
  background: var(--accent-primary);
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-default);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-tertiary);
  z-index: 1;
  position: relative;
  transition: all var(--transition-base);
}

.step-item.active .step-circle {
  border-color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.12);
  color: var(--accent-primary);
}

.step-item.completed .step-circle {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  color: #000;
}

.step-label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  white-space: nowrap;
}

.step-item.active .step-label,
.step-item.completed .step-label {
  color: var(--text-secondary);
}

/* ============================================================
   Modal
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 520px;
  width: 100%;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-base);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 20px;
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.modal-close:hover { color: var(--text-primary); }

/* ============================================================
   Toast Notifications
   ============================================================ */

.toast-container {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-card-hover);
  pointer-events: all;
  min-width: 280px;
  max-width: 400px;
  transform: translateX(calc(100% + var(--space-6)));
  transition: transform var(--transition-slow);
}

.toast.show { transform: translateX(0); }
.toast.hide { transform: translateX(calc(100% + var(--space-6))); }

.toast-icon { font-size: 20px; flex-shrink: 0; }
.toast-message { font-size: var(--text-sm); color: var(--text-primary); flex: 1; }

.toast-success { border-left: 3px solid var(--accent-success); }
.toast-error { border-left: 3px solid var(--accent-danger); }
.toast-warning { border-left: 3px solid var(--accent-warning); }
.toast-info { border-left: 3px solid var(--accent-info); }

/* ============================================================
   Section Headers
   ============================================================ */

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   Skeleton Loaders
   ============================================================ */

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

.skeleton {
  background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-highlight) 50%, var(--skeleton-base) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.skeleton-line {
  height: 14px;
  margin-bottom: var(--space-3);
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.full { width: 100%; }

.skeleton-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
}

.skeleton-circle {
  border-radius: var(--radius-full);
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-default);
  padding: var(--space-12) 0 var(--space-8);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-brand .navbar-logo {
  margin-bottom: var(--space-4);
}

.footer-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.footer-social a:hover {
  background: var(--accent-primary);
  color: #000;
  border-color: var(--accent-primary);
}

.footer-col h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  letter-spacing: 0.05em;
}

.footer-col ul { display: flex; flex-direction: column; gap: var(--space-3); }

.footer-col ul li a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-col ul li a:hover { color: var(--text-primary); }

.footer-bottom {
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom-text {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-3); text-align: center; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Share Bar
   ============================================================ */

.share-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.share-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.share-btn.twitter:hover { border-color: #1da1f2; color: #1da1f2; }
.share-btn.linkedin:hover { border-color: #0077b5; color: #0077b5; }
.share-btn.whatsapp:hover { border-color: #25d366; color: #25d366; }
.share-btn.copy:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.share-btn.image-share:hover { border-color: #a78bfa; color: #a78bfa; }

/* ============================================================
   Share Image Modal
   ============================================================ */

.af-share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.af-share-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.af-share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.af-share-title {
  font-size: var(--text-lg);
  font-weight: 700;
}

.af-share-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.af-share-close:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.af-share-preview {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  margin-bottom: var(--space-3);
  display: block;
}

.af-share-url {
  font-size: var(--text-xs);
  color: var(--accent-primary);
  font-family: var(--font-mono);
  margin-bottom: var(--space-4);
  word-break: break-all;
}

.af-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ============================================================
   Upvote Button
   ============================================================ */

.upvote-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.upvote-btn:hover {
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
}

.upvote-btn.voted {
  background: rgba(255, 107, 53, 0.1);
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
}

/* ============================================================
   Stats Bar
   ============================================================ */

.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  padding: var(--space-8) 0;
}

.stat-item { text-align: center; }

.stat-number {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-default);
}

@media (max-width: 640px) {
  .stats-bar { gap: var(--space-6); flex-wrap: wrap; }
  .stat-divider { display: none; }
  .stat-number { font-size: var(--text-2xl); }
}

/* ============================================================
   Dropdown Menu
   ============================================================ */

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  min-width: 180px;
  box-shadow: var(--shadow-card-hover);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all var(--transition-base);
}

.dropdown-menu.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.dropdown-item:hover { background: var(--bg-card); color: var(--text-primary); }
.dropdown-item.danger { color: var(--accent-danger); }
.dropdown-item.danger:hover { background: rgba(255, 82, 82, 0.08); }

.dropdown-divider {
  height: 1px;
  background: var(--border-default);
  margin: var(--space-2) 0;
}

/* ============================================================
   Image Gallery / Lightbox
   ============================================================ */

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3);
}

.screenshot-thumb {
  aspect-ratio: 16/10;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-default);
  transition: all var(--transition-fast);
}

.screenshot-thumb:hover {
  border-color: var(--accent-primary);
  transform: scale(1.02);
}

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

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: calc(var(--z-modal) + 10);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  object-fit: contain;
}

/* ============================================================
   Keyboard Shortcut Hints
   ============================================================ */

.kbd {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-hover);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
}

/* ============================================================
   Empty State
   ============================================================ */

.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.4;
}

.empty-state-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.empty-state-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 360px;
  margin: 0 auto var(--space-6);
}

/* ============================================================
   Gradient Text
   ============================================================ */

.gradient-text {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   Section Divider
   ============================================================ */

.section {
  padding: var(--space-24) 0;
}

.section-sm { padding: var(--space-12) 0; }

/* ============================================================
   Tabs
   ============================================================ */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: var(--space-6);
}

.tab {
  padding: 10px 20px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab:hover { color: var(--text-primary); }

.tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

/* ============================================================
   Alert / Info Box
   ============================================================ */

.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.alert-info {
  background: rgba(68, 138, 255, 0.08);
  border: 1px solid rgba(68, 138, 255, 0.2);
  color: var(--accent-info);
}

.alert-success {
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.2);
  color: var(--accent-success);
}

.alert-warning {
  background: rgba(255, 171, 0, 0.08);
  border: 1px solid rgba(255, 171, 0, 0.2);
  color: var(--accent-warning);
}

.alert-danger {
  background: rgba(255, 82, 82, 0.08);
  border: 1px solid rgba(255, 82, 82, 0.2);
  color: var(--accent-danger);
}
