/* Main Stylesheet - Modern, Clean Design */

/* === CSS VARIABLES === */
:root {
  /* Backgrounds */
  --bg-primary:   #0d0f14;
  --bg-secondary: #141720;
  --bg-tertiary:  #1a1e2a;
  --bg-hover:     #1e2333;

  /* Text */
  --text-primary:   #f0f4ff;
  --text-secondary: #8899bb;
  --text-tertiary:  #4a5578;

  /* Accent — electric blue */
  --accent-primary: #4a8eff;
  --accent-hover:   #3a7aef;
  --accent-light:   rgba(74, 142, 255, 0.12);

  /* Legacy aliases — kept for JS compatibility */
  --accent-blue:         #4a8eff;
  --accent-blue-light:   rgba(74, 142, 255, 0.15);
  --accent-teal:         #2dd4bf;
  --accent-teal-light:   rgba(45, 212, 191, 0.15);
  --accent-red:          #f87171;
  --accent-red-light:    rgba(248, 113, 113, 0.15);
  --accent-yellow:       #fbbf24;
  --accent-yellow-light: rgba(251, 191, 36, 0.15);
  --accent-purple:       #a78bfa;
  --accent-purple-light: rgba(167, 139, 250, 0.15);

  /* Status */
  --success: #34d399;
  --warning: #fbbf24;
  --danger:  #f87171;

  /* Borders */
  --border-color: #1e2436;
  --border-light: #181c28;
  --border-dark:  #2a3050;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.7);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.8);
  --shadow-blue: 0 0 0 1px rgba(74, 142, 255, 0.3), 0 8px 24px rgba(0, 0, 0, 0.5);

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Transitions */
  --transition-fast:   0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

/* === HOME SCREEN === */
#homeScreen {
  min-height: 100vh;
  background: var(--bg-primary);
}

/* App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 15, 20, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.app-header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  cursor: pointer;
}

.app-logo i {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
}

.app-logo-btn {
  background: none;
  border: none;
  padding: 0;
  text-decoration: none;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-nav-link {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.app-nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.app-nav-link--active {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.app-header-actions {
  display: flex;
  gap: 12px;
}

/* Home Container */
.home-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}

/* Page Header */
.page-header {
  margin-bottom: 40px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.page-description {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* === COLLECTION STATS === */
.collection-stats {
  display: flex;
  gap: 0;
  margin-bottom: 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat-card {
  flex: 1;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-right: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

.stat-card:last-child {
  border-right: none;
}

.stat-card:hover {
  background: var(--bg-hover);
  transform: none;
  box-shadow: none;
}

.stat-card-highlight {
  background: rgba(74, 142, 255, 0.04);
}

.stat-card-highlight:hover {
  background: rgba(74, 142, 255, 0.08);
}

.stat-icon {
  width: 40px;
  height: 40px;
  background: rgba(74, 142, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.stat-icon i {
  width: 20px;
  height: 20px;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 3px;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

/* === GLOBAL SEARCH === */
.global-search-wrapper {
  margin-bottom: 48px;
}

.global-search-container {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.global-search {
  position: relative;
}

.global-search input {
  width: 100%;
  padding: 12px 20px 12px 48px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.global-search input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(74, 142, 255, 0.15);
}

.global-search::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23adb5bd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  pointer-events: none;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: var(--shadow-xl);
}

.global-search-results.active {
  display: block;
}

.global-search-result-item {
  padding: 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 16px;
  align-items: center;
}

.global-search-result-item:last-child {
  border-bottom: none;
}

.global-search-result-item:hover {
  background: var(--bg-secondary);
}

.global-search-result-image {
  width: 60px;
  height: 84px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-tertiary);
}

.global-search-result-info {
  flex: 1;
}

.global-search-result-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 1rem;
}

.global-search-result-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.global-search-no-results {
  padding: 32px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* === BINDERS SECTION === */
.binders-section {
  margin-top: 48px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* === BINDER SHELF === */
.binder-shelf {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 32px;
  background: var(--bg-secondary);
  border: 2px dashed var(--border-dark);
  border-radius: var(--radius-xl);
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: rgba(74, 142, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.empty-state-icon i {
  width: 36px;
  height: 36px;
}

.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* Binder Cards - Horizontal rectangles */
.binder-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 100px;
  overflow: hidden;
}

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

/* Left side - info */
.binder-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 20px 24px;
}

.binder-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.binder-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.delete-binder-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  opacity: 0;
  flex-shrink: 0;
}

.binder-card:hover .delete-binder-btn {
  opacity: 1;
}

.delete-binder-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  transform: scale(1.1);
}

.delete-binder-btn i {
  width: 18px;
  height: 18px;
}

.binder-card-stats-inline {
  display: flex;
  gap: 24px;
  align-items: center;
}

.binder-card-stats-inline .stat-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.binder-card-stats-inline .stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.binder-card-stats-inline .stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.binder-card-meta {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Right side - visual */
.binder-card-visual {
  width: 72px;
  flex-shrink: 0;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(to right,
    rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.15) 3%,
    var(--binder-color, var(--accent-primary)) 3%, var(--binder-color, var(--accent-primary)) 38%,
    #0d0f14 38%, #0d0f14 42%,
    var(--binder-color, var(--accent-primary)) 42%, var(--binder-color, var(--accent-primary)) 50%,
    #0d0f14 50%, #0d0f14 54%,
    var(--binder-color, var(--accent-primary)) 54%, var(--binder-color, var(--accent-primary)) 60%,
    #0d0f14 60%, #0d0f14 64%,
    var(--binder-color, var(--accent-primary)) 64%, var(--binder-color, var(--accent-primary)) 97%,
    rgba(255,255,255,0.1) 97%, rgba(255,255,255,0.05) 100%
  );
  box-shadow: inset 4px 0 8px rgba(0,0,0,0.4);
  transition: all var(--transition-normal);
}

.binder-card:hover .binder-card-visual {
  box-shadow: inset 4px 0 8px rgba(0,0,0,0.4), 0 0 20px rgba(74, 142, 255, 0.08);
}

/* Add binder initial/label on spine */
.binder-card-visual::after {
  content: attr(data-binder-initial);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.75rem;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.binder-card-icon {
  display: none;
}

.binder-card-icon i {
  width: 32px;
  height: 32px;
  stroke-width: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}


/* === BINDER VIEW === */
#binderView {
  display: none;
  min-height: 100vh;
  padding: 20px;
}

#binderView.active {
  display: block;
}

/* === TOOLBAR === */
.binder-toolbar {
  max-width: 1400px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--bg-secondary);
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.toolbar-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-divider {
  width: 1px;
  height: 32px;
  background: var(--border-color);
}

.back-btn,
.toolbar-btn {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.back-btn:hover,
.toolbar-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
}

.binder-search {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.binder-search input {
  width: 100%;
  padding: 8px 16px 8px 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.binder-search input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(74, 142, 255, 0.15);
}

.binder-search::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  pointer-events: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: var(--shadow-xl);
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border-light);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--bg-secondary);
}

.search-result-name {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.search-result-location {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* === BUTTONS === */
.btn {
  padding: 11px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(74, 142, 255, 0.4), var(--shadow-sm);
  font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 0 0 1px rgba(74, 142, 255, 0.6), var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-xs);
}

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

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #ef5555;
}

/* === UTILITIES === */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.error-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* === LANDING PAGE === */
#landingPage {
  min-height: 100vh;
  background: var(--bg-primary);
  overflow-x: hidden;
}

#landingPage.hidden {
  display: none;
}

/* === LANDING HEADER === */
.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 15, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.landing-header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  cursor: pointer;
  text-decoration: none;
}

.landing-logo i {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
}

/* === LANDING HERO === */
.landing-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 32px 80px;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

/* Radial spotlight background effect */
.landing-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(74, 142, 255, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(74, 142, 255, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Dot grid overlay */
.landing-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(74, 142, 255, 0.1) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
}

.landing-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.landing-hero-text {
  margin-bottom: 48px;
  max-width: 100%;
}

.landing-title {
  font-size: 4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 24px;
}

.landing-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 480px;
  margin: 0 auto 36px;
  font-weight: 400;
}

.landing-cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* === LANDING BINDER WRAP === */
.landing-binder-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

/* === FEATURE PILLS === */
.feature-pills {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.feature-pill i {
  width: 14px;
  height: 14px;
  color: var(--accent-primary);
}

.feature-pill:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

/* === AUTO-FLIPPING BINDER HERO === */

/* Hero: positioned container so scene fills it absolutely */
.landing-hero.lbh-hero {
  padding: 0;
  position: relative;
  min-height: calc(100vh - 170px);  /* fallback before JS sets exact height via fitHeroHeight() */
  overflow: clip;  /* clips flip overflow; unlike overflow:hidden, does NOT break preserve-3d
                      and does NOT create a scroll container, so no scrollbar appears */
}

/* Binder scene: fills the entire hero behind the overlay */
.lbh-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Blur overlay — above cards (z:auto) and flip element (z:11); below text (z:20).
   Sibling backdrop-filter does NOT break preserve-3d on the flip element. */
.lbh-blur-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  background: rgba(13, 17, 23, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

/* Text — above everything */
.lbh-text {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  pointer-events: none;
}

.lbh-text .landing-cta-buttons {
  pointer-events: all;
}

/* The two-page spread — fills the entire scene */
.lbh-spread {
  display: flex;
  position: absolute;
  inset: 0;
}

/* Each binder page */
.lbh-page {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  row-gap: 2px;
  column-gap: 0;
  overflow: hidden;
  min-width: 0;
}

.lbh-page--left  { border-radius: 12px 0 0 12px; border-right: none; }
.lbh-page--right { border-radius: 0 12px 12px 0; border-left:  none; }

/* Spine shadow */
.lbh-spine {
  width: 28px;
  flex-shrink: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.4)  0%,
    rgba(0,0,0,0.12) 40%,
    rgba(255,255,255,0.02) 60%,
    rgba(0,0,0,0.18) 100%
  );
  border-left:  1px solid rgba(0,0,0,0.3);
  border-right: 1px solid rgba(0,0,0,0.15);
}

/* Cell wrapper: provides the visible card slot boundary.
   Card inside sizes to fill the cell height (portrait = height-constrained at most viewports). */
.lbh-cell {
  overflow: hidden;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  display: flex;
  align-items: stretch;
  justify-content: center;
}

/* Card slots inside the binder. Full card always visible — no cropping.
   height:100% fills the cell row, aspect-ratio derives width (portrait card).
   max-width:100% prevents overflowing the column at very tall viewports. */
.lbh-card {
  aspect-ratio: 63 / 88;
  height: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 4.5% / 3.2%;  /* match MTG card corner curve; clips white image corners */
}

.lbh-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.lbh-card img.loaded { opacity: 1; }

/* Shimmer skeleton while loading */
@keyframes lbhShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.lbh-card.loading {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 25%,
    rgba(255,255,255,0.06) 50%,
    var(--bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: lbhShimmer 1.5s infinite;
}

@media (max-width: 768px) {
  .lbh-spine { width: 18px; }
  .lbh-page  { padding: 5px; row-gap: 4px; column-gap: 0; }
}

/* === HERO STAT BAR === */
.hero-stat-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-stat {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

.hero-stat-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-tertiary);
  opacity: 0.4;
  flex-shrink: 0;
}

/* === BINDER PAGE CARD ART === */
.landing-page-cards {
  padding: 10px 8px;
  align-items: stretch;
  justify-content: flex-start;
}

.binder-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  width: 100%;
}

.binder-card-slot-img {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  aspect-ratio: 5/7;
  background: var(--bg-tertiary);
}

.binder-card-slot-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.binder-page-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 500;
}

/* === HOW IT WORKS === */
.landing-how {
  position: relative;
  z-index: 50;  /* above hero overflow:visible flip animation (z:11) */
  padding: 72px 32px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
}

.landing-how-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.how-step {
  flex: 1;
  padding: 0 24px;
}

.how-step:first-child {
  padding-left: 0;
}

.how-step:last-child {
  padding-right: 0;
}

.how-num {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: 14px;
  opacity: 0.8;
}

.how-step h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.how-step p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.how-arrow {
  flex-shrink: 0;
  padding-top: 2px;
  color: var(--text-tertiary);
  opacity: 0.4;
}

.how-arrow i {
  width: 18px;
  height: 18px;
}

/* === MARQUEE SECTION === */
.marquee-section {
  position: relative;
  z-index: 50;  /* above hero overflow:visible flip animation (flip is z:11 in root context) */
  overflow: hidden;
  padding: 14px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.marquee-fade-left,
.marquee-fade-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 180px;
  z-index: 2;
  pointer-events: none;
}

.marquee-fade-left {
  left: 0;
  background: linear-gradient(to right, var(--bg-secondary) 0%, transparent 100%);
}

.marquee-fade-right {
  right: 0;
  background: linear-gradient(to left, var(--bg-secondary) 0%, transparent 100%);
}

.marquee-row {
  overflow: hidden;
  margin-bottom: 12px;
}

.marquee-row:last-child {
  margin-bottom: 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.marquee-track--left {
  animation: marquee-left 180s linear infinite;
}

.marquee-track--right {
  animation: marquee-right 200s linear infinite;
}

@keyframes marquee-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes marquee-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-items {
  display: flex;
  gap: 10px;
  padding: 0 5px;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  white-space: nowrap;
  font-size: 0.875rem;
  user-select: none;
}

.card-name {
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.card-set {
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 8px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.card-price {
  color: var(--accent-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* === FEATURES SECTION === */
.landing-features {
  position: relative;
  z-index: 50;
  padding: 80px 32px;
  background: var(--bg-primary);
}

.landing-features-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  transition: border-color var(--transition-normal), transform var(--transition-normal);
}

.feature-card:hover {
  border-color: var(--border-dark);
  transform: translateY(-3px);
}

.feature-card-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-card-icon i {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* === CTA STRIP === */
.landing-cta-strip {
  position: relative;
  z-index: 50;
  padding: 80px 32px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.landing-cta-strip-inner {
  max-width: 600px;
  margin: 0 auto;
}

.landing-cta-strip h2 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 32px;
  color: var(--text-primary);
}

/* Professional 3D binder */
.landing-binder {
  perspective: 3000px;
  perspective-origin: 50% 50%;
  margin: 0 auto;
  width: 560px;
  height: 360px;
  position: relative;
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.9));
}

/* Binder scene - entire 3D object */
.landing-binder-scene {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-8deg) rotateY(15deg);
  transition: transform 2.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.landing-binder.opening .landing-binder-scene {
  transform: rotateX(-8deg) rotateY(0deg);
}

/* Binder BACK COVER */
.landing-binder-back-cover {
  width: 330px;
  height: 100%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.08) 0%, transparent 70%),
    linear-gradient(135deg, #0f1629 0%, #1a2540 60%, #0f1629 100%);
  position: absolute;
  left: 50%;
  transform-origin: left center;
  transform: translateZ(-5px);
  transform-style: preserve-3d;
  border-radius: 0 10px 10px 0;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 6px 0 12px rgba(0, 0, 0, 0.4),
    inset -6px 6px 18px rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* Binder SPINE with realistic texture */
.landing-binder-spine {
  width: 70px;
  height: 100%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transform-style: preserve-3d;
  z-index: 2;
}

.landing-binder-spine::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 20%, transparent 40%),
    linear-gradient(to right, #1a2540 0%, #243050 50%, #1a2540 100%);
  border-radius: 6px;
  box-shadow:
    inset 0 4px 12px rgba(255, 255, 255, 0.25),
    inset 0 -4px 12px rgba(0, 0, 0, 0.4),
    0 12px 32px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 0, 0, 0.3);
}

/* Binder COVER with realistic lighting and depth */
.landing-binder-cover {
  width: 330px;
  height: 100%;
  background:
    radial-gradient(circle at 25% 25%, rgba(74, 142, 255, 0.15) 0%, transparent 60%),
    linear-gradient(135deg, #1a2540 0%, #243050 60%, #162038 100%);
  position: absolute;
  left: 50%;
  transform-origin: left center;
  transform: translateZ(20px);
  transform-style: preserve-3d;
  border-radius: 0 10px 10px 0;
  transition: transform 2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    inset 6px 0 12px rgba(0, 0, 0, 0.3),
    inset -6px 6px 18px rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-binder-cover::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 20px;
  background: linear-gradient(to left, transparent, rgba(0, 0, 0, 0.25));
}

.landing-binder.opening .landing-binder-cover {
  transform: translateZ(20px) rotateY(-165deg);
  box-shadow:
    0 35px 90px rgba(0, 0, 0, 0.8),
    inset 6px 0 12px rgba(0, 0, 0, 0.3),
    inset -6px 6px 18px rgba(255, 255, 255, 0.15);
}

.landing-binder-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: rgba(240, 244, 255, 0.9);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  transform: translateZ(5px);
  filter: drop-shadow(0 0 20px rgba(74, 142, 255, 0.3));
}

/* Page stack with realistic paper texture */
.landing-binder-pages {
  width: 330px;
  height: 100%;
  position: absolute;
  left: 50%;
  transform-style: preserve-3d;
  z-index: 2;
}

/* Individual pages with curl effect */
.landing-page {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
  transform-origin: left center;
  opacity: 0;
}

/* Page front face with paper texture */
.landing-page::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1e2a 0%, #141720 100%);
  border: 1px solid #2a3050;
  border-left: none;
  border-radius: 0 10px 10px 0;
  box-shadow:
    -6px 0 18px rgba(0, 0, 0, 0.15),
    inset 8px 8px 12px rgba(255, 255, 255, 0.6),
    inset -4px 0 8px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.1);
  transform: translateZ(var(--page-z, 10px));
}

/* Page thickness showing stacked paper */
.landing-page::after {
  content: '';
  position: absolute;
  left: 0;
  width: var(--page-z, 10px);
  height: 100%;
  background: linear-gradient(to bottom,
    #f5f5f5 0%, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%, #f5f5f5 100%);
  transform-origin: left center;
  transform: rotateY(90deg);
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
}

/* Progressive page depths */
.landing-page:nth-child(1) {
  --page-z: 15px;
}

.landing-page:nth-child(2) {
  --page-z: 11px;
}

.landing-page:nth-child(3) {
  --page-z: 7px;
}

.landing-page-content {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* +2px pushes content in front of the ::before page surface */
  transform: translateZ(calc(var(--page-z, 10px) + 2px));
  overflow: hidden;
}

.landing-page-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-shadow: none;
}

.landing-page-subtext {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Realistic page flip with curl effect */
@keyframes pageFlipRealistic {
  0% {
    transform: translateZ(var(--page-z, 10px)) rotateY(0deg) translateX(0);
    opacity: 1;
    filter: brightness(1);
  }
  15% {
    transform: translateZ(calc(var(--page-z, 10px) + 8px)) rotateY(-15deg) translateX(2px);
    opacity: 1;
    filter: brightness(1.05);
  }
  45% {
    transform: translateZ(calc(var(--page-z, 10px) + 15px)) rotateY(-85deg) translateX(20px);
    opacity: 1;
    filter: brightness(0.95);
  }
  55% {
    transform: translateZ(calc(var(--page-z, 10px) + 15px)) rotateY(-95deg) translateX(25px);
    opacity: 1;
    filter: brightness(0.9);
  }
  85% {
    transform: translateZ(calc(var(--page-z, 10px) + 8px)) rotateY(-165deg) translateX(10px);
    opacity: 0.8;
    filter: brightness(0.95);
  }
  100% {
    transform: translateZ(var(--page-z, 10px)) rotateY(-180deg) translateX(0);
    opacity: 0;
    filter: brightness(1);
  }
}

/* Show all pages when binder is open, before animation runs */
.landing-binder.opening .landing-page {
  opacity: 1;
}

.landing-binder.animating .landing-page:nth-child(1) {
  animation: pageFlipRealistic 1.4s cubic-bezier(0.45, 0.05, 0.55, 0.95) 2s forwards;
  opacity: 1;
}

.landing-binder.animating .landing-page:nth-child(2) {
  animation: pageFlipRealistic 1.4s cubic-bezier(0.45, 0.05, 0.55, 0.95) 3.6s forwards;
  opacity: 1;
}

.landing-binder.animating .landing-page:nth-child(3) {
  animation: pageFlipRealistic 1.4s cubic-bezier(0.45, 0.05, 0.55, 0.95) 5.2s forwards;
  opacity: 1;
}

/* === FOOTER === */
.landing-footer {
  position: relative;
  z-index: 50;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 32px;
}

.landing-footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* === RESPONSIVE === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 968px) {
  /* Home screen */
  .home-container {
    padding: 32px 20px 60px;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .collection-stats {
    flex-direction: column;
    gap: 0;
  }

  .stat-card {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .stat-card:last-child {
    border-bottom: none;
  }

  .binder-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-divider {
    display: none;
  }

  /* How it works */
  .landing-how {
    padding: 56px 20px;
  }

  .landing-how-inner {
    flex-direction: column;
    gap: 32px;
  }

  .how-step {
    padding: 0;
  }

  .how-arrow {
    transform: rotate(90deg);
    align-self: center;
  }

  /* Landing new sections */
  .landing-features {
    padding: 60px 20px;
  }

  .landing-features-inner {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .landing-cta-strip {
    padding: 60px 20px;
  }

  .landing-cta-strip h2 {
    font-size: 1.75rem;
  }

  .marquee-fade-left,
  .marquee-fade-right {
    width: 80px;
  }

  /* Landing page */
  .landing-header-content {
    padding: 12px 20px;
  }

  .landing-hero {
    padding: 90px 20px 60px;
  }

  .landing-title {
    font-size: 2.75rem;
  }

  .landing-binder {
    width: 380px;
    height: 244px;
  }

  .feature-pills {
    gap: 8px;
  }
}

@media (max-width: 600px) {
  .app-header-content {
    padding: 12px 16px;
  }

  .home-container {
    padding: 24px 16px 48px;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  .binder-card-stats-inline {
    flex-wrap: wrap;
    gap: 12px;
  }

  /* Landing */
  .landing-title {
    font-size: 2.25rem;
  }

  .landing-binder {
    width: 280px;
    height: 180px;
  }

  .landing-binder-title {
    font-size: 1.4rem;
  }

  .landing-cta-buttons {
    flex-direction: column;
    width: 100%;
  }

  .landing-cta-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .landing-footer-content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ── Dev Gate ─────────────────────────────────────────────────────────── */
#devGate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dev-gate-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 320px;
}

.dev-gate-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.dev-gate-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-align: center;
}

#devGateInput {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  text-align: center;
}

#devGateBtn {
  width: 100%;
  padding: 10px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

#devGateBtn:hover { opacity: 0.9; }

.dev-gate-error {
  color: #ef4444;
  font-size: 0.8rem;
}

@keyframes dev-gate-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-6px); }
  80%       { transform: translateX(6px); }
}

.dev-gate-shake { animation: dev-gate-shake 0.5s ease; }

/* ── Landing nav link ─────────────────────────────────────────────────── */
.landing-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.landing-nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

/* ── How It Works page ────────────────────────────────────────────────── */
#howItWorksView {
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.hiw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border-color);
}

.hiw-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.hiw-back-btn:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.hiw-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 40px;
}

.hiw-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.hiw-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 60px;
}

.hiw-steps {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-bottom: 64px;
}

.hiw-step {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.hiw-step-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-primary);
  opacity: 0.4;
  line-height: 1;
  min-width: 60px;
}

.hiw-step-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.hiw-step-body p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.hiw-cta {
  display: flex;
  justify-content: center;
}

/* ── Stub pages (Trade / Deck) ────────────────────────────────────────── */
.stub-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
  text-align: center;
  padding: 40px;
  color: var(--text-primary);
}

.stub-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.stub-icon i { width: 28px; height: 28px; }

.stub-page h2 {
  font-size: 1.75rem;
  font-weight: 700;
}

.stub-page p {
  color: var(--text-secondary);
  max-width: 400px;
  line-height: 1.6;
}

.stub-coming-soon {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary) !important;
  opacity: 0.7;
}

/* ── Share modal ──────────────────────────────────────────────────────── */
.modal-content--share {
  max-width: 480px;
}

.share-modal-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.share-link-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.share-link-row input {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.share-copied-msg {
  color: #22c55e;
  font-size: 0.85rem;
}

/* Read-only binder mode — hide edit controls */
.binder-readonly .toolbar-btn--edit,
.binder-readonly #scanPageBtn,
.binder-readonly #shareBinderBtn,
.binder-readonly #addPagesBtn,
.binder-readonly .card-slot-empty { pointer-events: none; opacity: 0.3; }
.binder-readonly .card-search-panel { display: none !important; }
