/**
 * MOSTLY MOVIES PLATFORM - SHARED COMPONENTS
 * Reusable buttons, cards, modals, form inputs, and badges.
 */

/* 1. BUTTONS */
.mm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--mm-font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  min-height: var(--mm-btn-min-height, 46px);
  border-radius: var(--mm-btn-radius, 10px);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--mm-transition-fast);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
}

.mm-btn:hover {
  transform: translateY(-1px);
}

.mm-btn:active {
  transform: translateY(1px);
}

.mm-btn:focus-visible {
  outline: 2px solid var(--mm-accent-gold);
  outline-offset: 2px;
}

.mm-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.mm-btn-primary {
  background: linear-gradient(135deg, var(--mm-accent-gold) 0%, #c48c26 100%);
  color: #000;
  font-weight: 700;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px var(--mm-accent-gold-glow);
}

.mm-btn-primary:hover {
  background: linear-gradient(135deg, var(--mm-accent-gold-hover, #f5b748) 0%, #d49830 100%);
  box-shadow: 0 6px 28px rgba(229, 169, 59, 0.55);
}

.mm-btn-secondary {
  background: var(--mm-bg-surface);
  color: var(--mm-text-primary);
  border-color: var(--mm-border-subtle);
}

.mm-btn-secondary:hover {
  background: var(--mm-bg-elevated);
  border-color: var(--mm-border-medium);
}

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

.mm-btn-ghost:hover {
  color: var(--mm-text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.mm-btn-pill {
  border-radius: var(--mm-radius-pill) !important;
}

.mm-btn-sm {
  min-height: 38px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

.mm-btn-lg {
  min-height: 52px;
  padding: 0.9rem 1.8rem;
  font-size: 1.05rem;
}

/* 2. INPUTS */
.mm-input {
  width: 100%;
  font-family: var(--mm-font-sans);
  font-size: 1rem;
  color: var(--mm-text-primary);
  background: var(--mm-bg-surface);
  border: 1px solid var(--mm-border-subtle);
  border-radius: var(--mm-radius-md);
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color var(--mm-transition-fast), box-shadow var(--mm-transition-fast);
}

.mm-input:focus {
  border-color: var(--mm-accent-gold);
  box-shadow: 0 0 0 3px var(--mm-accent-gold-glow);
}

.mm-input::placeholder {
  color: var(--mm-text-muted);
}

/* 3. CARDS & PANELS */
.mm-card {
  background: var(--mm-bg-surface);
  border: 1px solid var(--mm-border-subtle);
  border-radius: var(--mm-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--mm-shadow-md);
  position: relative;
  overflow: hidden;
}

.mm-card-glass {
  background: var(--mm-bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--mm-border-hairline);
  box-shadow: var(--mm-shadow-lg);
}

/* 4. BADGES & PILLS */
.mm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mm-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: var(--mm-radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--mm-text-secondary);
}

.mm-badge-gold {
  background: rgba(229, 169, 59, 0.15);
  color: var(--mm-accent-gold);
  border: 1px solid rgba(229, 169, 59, 0.3);
}

.mm-badge-cyan {
  background: rgba(0, 242, 254, 0.12);
  color: var(--mm-accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.mm-badge-success {
  background: rgba(46, 204, 113, 0.15);
  color: var(--mm-accent-green);
  border: 1px solid rgba(46, 204, 113, 0.3);
}

/* 5. MODALS & DIALOGS */
.mm-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  inset: 0;
  width: 100%;
  width: 100vw;
  height: 100%;
  height: 100dvh;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-sizing: border-box;
}

.mm-modal-overlay[hidden] {
  display: none !important;
}

.mm-modal-card {
  background: var(--mm-bg-surface);
  border: 1px solid var(--mm-border-medium);
  border-radius: var(--mm-radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  margin: auto;
  box-sizing: border-box;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95);
  animation: mmModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (max-width: 580px) {
  .mm-modal-overlay {
    padding: 0.75rem 0.5rem;
    align-items: flex-start;
  }
  .mm-modal-card {
    max-height: 94dvh;
    border-radius: var(--mm-radius-md, 10px);
    margin: 0.5rem auto;
  }
}

body.modal-open {
  overflow: hidden !important;
  touch-action: none;
}

@keyframes mmModalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.mm-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--mm-border-subtle);
}

.mm-modal-title {
  font-family: var(--mm-font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--mm-text-primary);
  margin: 0;
}

.mm-modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mm-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--mm-border-subtle);
}

/* ==========================================================================
   4b. UNIVERSAL RULES & HOW-TO-PLAY MODAL COMPONENTS
   ========================================================================== */
.howto-modal-card {
  max-width: 520px;
  background: var(--mm-bg-surface, #121218);
  border: 1px solid var(--mm-border-medium, rgba(255, 255, 255, 0.12));
  border-radius: var(--mm-radius-lg, 14px);
}

.howto-modal-card .mm-modal-header {
  border-bottom: 1px solid var(--mm-border-subtle, rgba(255, 255, 255, 0.08));
}

.howto-modal-card .mm-modal-body {
  padding: 1.25rem 1.5rem;
  gap: 1rem;
}

.rules-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rules-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--mm-border-hairline, rgba(255, 255, 255, 0.05));
  border-radius: var(--mm-radius-md, 10px);
  transition: background var(--mm-transition-fast, 0.2s ease), border-color var(--mm-transition-fast, 0.2s ease);
}

.rules-step:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(229, 169, 59, 0.25);
}

.rules-step .step-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(229, 169, 59, 0.12);
  border: 1px solid rgba(229, 169, 59, 0.35);
  color: var(--mm-accent-gold, #e5a93b);
  font-family: var(--mm-font-mono, monospace);
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.rules-step .step-content {
  flex: 1;
}

.rules-step .step-content h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--mm-text-primary, #ffffff);
  margin: 0 0 0.25rem 0;
}

.rules-step .step-content p {
  font-size: 0.85rem;
  color: var(--mm-text-secondary, #9ca3af);
  line-height: 1.45;
  margin: 0;
}

.rules-step .step-content p strong {
  color: var(--mm-text-primary, #ffffff);
}

.rules-step .step-content p .step-pill,
.rules-step .step-content p code {
  display: inline-block;
  font-family: var(--mm-font-mono, monospace);
  font-size: 0.78rem;
  padding: 0.1rem 0.35rem;
  background: rgba(229, 169, 59, 0.12);
  border: 1px solid rgba(229, 169, 59, 0.25);
  border-radius: 4px;
  color: var(--mm-accent-gold, #e5a93b);
}

.rules-tip-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(229, 169, 59, 0.07);
  border: 1px solid rgba(229, 169, 59, 0.22);
  border-radius: var(--mm-radius-md, 10px);
}

.rules-tip-box .tip-icon {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.rules-tip-box .tip-text {
  font-size: 0.84rem;
  color: #e5e7eb;
  line-height: 1.45;
}

.rules-tip-box .tip-text strong {
  color: var(--mm-accent-gold, #e5a93b);
}

@media (max-width: 480px) {
  .howto-modal-card .mm-modal-header {
    padding: 1rem 1.25rem;
  }
  .howto-modal-card .mm-modal-body {
    padding: 1rem 1.25rem;
    gap: 0.75rem;
  }
  .rules-step {
    padding: 0.75rem 0.85rem;
    gap: 0.75rem;
  }
  .rules-step .step-badge {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }
  .rules-step .step-content h3 {
    font-size: 0.9rem;
  }
  .rules-step .step-content p {
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   5. UNIVERSAL MODAL CLOSE BUTTON (Consistent 10px radius, sleek glass)
   ========================================================================== */
.mm-modal-close,
.result-close-btn,
.modal-close-btn,
.modal-close-icon-btn,
.hint-modal-close,
button.mm-modal-close,
button.result-close-btn,
button.modal-close-btn,
button.modal-close-icon-btn,
button.hint-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: var(--mm-btn-radius, 10px) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  background-image: none !important;
  border: 1px solid var(--mm-border-subtle, rgba(255, 255, 255, 0.12)) !important;
  color: var(--mm-text-secondary, #9ca3af) !important;
  font-family: inherit !important;
  font-size: 1.35rem !important;
  line-height: 1 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
  transition: all var(--mm-transition-fast, 0.2s ease) !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.mm-modal-close:hover,
.result-close-btn:hover,
.modal-close-btn:hover,
.modal-close-icon-btn:hover,
.hint-modal-close:hover,
button.mm-modal-close:hover,
button.result-close-btn:hover,
button.modal-close-btn:hover,
button.modal-close-icon-btn:hover,
button.hint-modal-close:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  background-image: none !important;
  color: #ffffff !important;
  border-color: var(--mm-border-medium, rgba(255, 255, 255, 0.25)) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
  transform: none !important;
}

.mm-modal-close:active,
.result-close-btn:active,
.modal-close-btn:active,
.modal-close-icon-btn:active,
.hint-modal-close:active,
button.mm-modal-close:active,
button.result-close-btn:active,
button.modal-close-btn:active,
button.modal-close-icon-btn:active,
button.hint-modal-close:active {
  transform: scale(0.96) !important;
}

.mm-modal-close svg,
.result-close-btn svg,
.modal-close-btn svg,
.modal-close-icon-btn svg,
.hint-modal-close svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  stroke: currentColor !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  pointer-events: none !important;
}

/* 6. UTILITY ANIMATIONS */
.mm-shake {
  animation: mmShake 0.45s ease-in-out;
}

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

/* ==========================================================================
   7. UNIVERSAL PUZZLE ARCHIVE & HISTORY BANNER
   ========================================================================== */

/* Top Archive Mode Notice Banner */
.mm-archive-banner {
  background: rgba(18, 18, 26, 0.92);
  border: 1px solid rgba(229, 180, 59, 0.35);
  border-radius: var(--mm-radius-md);
  padding: 0.75rem 1.2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(229, 180, 59, 0.08);
  animation: mmModalIn 0.25s ease-out;
}

.mm-archive-banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mm-archive-banner-pill {
  font-family: var(--mm-font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--mm-accent-gold, #e5b43b);
  color: #050508;
  padding: 0.25rem 0.55rem;
  border-radius: var(--mm-radius-sm);
  display: inline-flex;
  align-items: center;
}

.mm-archive-banner-text {
  font-size: 0.88rem;
  color: var(--mm-text-secondary, #9ca3af);
  line-height: 1.4;
}

.mm-archive-banner-text strong {
  color: var(--mm-text-primary, #ffffff);
}

.mm-archive-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--mm-accent-gold, #e5b43b);
  background: rgba(229, 180, 59, 0.1);
  border: 1px solid rgba(229, 180, 59, 0.25);
  padding: 0.4rem 0.8rem;
  border-radius: var(--mm-radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mm-archive-banner-btn:hover {
  background: var(--mm-accent-gold, #e5b43b);
  color: #050508;
  border-color: var(--mm-accent-gold, #e5b43b);
}

/* Universal Archive Section Under Game */
.mm-archive-section {
  width: 100%;
  max-width: 960px;
  margin: 3.5rem auto 1.5rem auto;
  padding-top: 2rem;
  border-top: 1px solid var(--mm-border-subtle, rgba(255, 255, 255, 0.08));
  text-align: left;
  box-sizing: border-box;
}

.mm-archive-header {
  margin-bottom: 1.5rem;
}

.mm-archive-subtitle {
  font-family: var(--mm-font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--mm-accent-gold, #e5b43b);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.mm-archive-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--mm-text-primary, #ffffff);
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem 0;
}

.mm-archive-desc {
  font-size: 0.88rem;
  color: var(--mm-text-muted, #6b7280);
  line-height: 1.5;
  margin: 0 0 1.25rem 0;
}

/* Toolbar & Filters */
.mm-archive-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.mm-archive-filter-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Universal archive button resets to prevent bleed-through from game button rules */
.mm-archive-section button {
  min-height: 0;
  height: auto;
  margin: 0;
  box-shadow: none;
  text-shadow: none;
  transform: none;
  letter-spacing: normal;
}

.mm-archive-section button:hover,
.mm-archive-section button:active,
.mm-archive-section button:focus {
  transform: none;
  box-shadow: none;
}

.mm-archive-pill,
.mm-archive-section button.mm-archive-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mm-font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
  min-height: 0;
  height: auto;
  color: var(--mm-text-secondary, #9ca3af);
  background: var(--mm-bg-surface, #12121a);
  border: 1px solid var(--mm-border-subtle, rgba(255, 255, 255, 0.08));
  padding: 0.35rem 0.75rem;
  margin: 0;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: none;
  text-shadow: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.mm-archive-pill:hover,
.mm-archive-section button.mm-archive-pill:hover {
  color: var(--mm-text-primary, #ffffff);
  border-color: var(--mm-border-medium, rgba(255, 255, 255, 0.2));
  background: var(--mm-bg-surface-elevated, #181824);
  transform: none;
  box-shadow: none;
}

.mm-archive-pill.active,
.mm-archive-section button.mm-archive-pill.active {
  color: #050508;
  background: var(--mm-accent-gold, #e5b43b);
  border-color: var(--mm-accent-gold, #e5b43b);
  font-weight: 700;
  transform: none;
  box-shadow: none;
}

.months-row .mm-archive-pill,
.mm-archive-section .months-row button.mm-archive-pill {
  font-family: inherit;
  font-size: 0.76rem;
}

/* Expand / Collapse Button */
.mm-archive-expand-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}

.mm-archive-expand-btn,
.mm-archive-section button.mm-archive-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mm-font-mono, monospace);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  min-height: 0;
  height: auto;
  margin: 0;
  color: var(--mm-accent-gold, #e5b43b);
  background: rgba(229, 180, 59, 0.08);
  border: 1px solid rgba(229, 180, 59, 0.25);
  padding: 0.55rem 1.25rem;
  border-radius: var(--mm-radius-sm);
  cursor: pointer;
  box-shadow: none;
  text-shadow: none;
  transition: all 0.2s ease;
}

.mm-archive-expand-btn:hover,
.mm-archive-section button.mm-archive-expand-btn:hover {
  background: var(--mm-accent-gold, #e5b43b);
  color: #050508;
  border-color: var(--mm-accent-gold, #e5b43b);
  box-shadow: 0 4px 16px rgba(229, 180, 59, 0.2);
  transform: none;
}

/* Empty State */
.mm-archive-empty {
  padding: 2rem;
  text-align: center;
  background: var(--mm-bg-surface, #12121a);
  border: 1px dashed var(--mm-border-subtle, rgba(255, 255, 255, 0.1));
  border-radius: var(--mm-radius-md);
  color: var(--mm-text-muted, #6b7280);
  font-size: 0.88rem;
}

/* Archive Grid */
.mm-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
}

.mm-archive-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--mm-bg-surface, #12121a);
  border: 1px solid var(--mm-border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--mm-radius-md);
  padding: 0.85rem;
  text-decoration: none;
  min-height: 84px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.mm-archive-card:hover {
  transform: translateY(-2px);
  border-color: var(--mm-border-medium, rgba(255, 255, 255, 0.18));
  background: var(--mm-bg-surface-elevated, #181824);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.mm-archive-card.active {
  border-color: var(--mm-accent-gold, #e5b43b);
  background: rgba(229, 180, 59, 0.06);
  box-shadow: 0 0 0 1px var(--mm-accent-gold, #e5b43b), 0 8px 24px rgba(229, 180, 59, 0.15);
}

.archive-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.archive-issue {
  font-family: var(--mm-font-mono, monospace);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--mm-text-primary, #ffffff);
}

.archive-date {
  font-size: 0.76rem;
  color: var(--mm-text-muted, #6b7280);
  font-weight: 500;
}

/* Status Badges */
.archive-tag {
  font-family: var(--mm-font-mono, monospace);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.18rem 0.42rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.archive-tag.today {
  background: var(--mm-accent-gold, #e5b43b);
  color: #050508;
}

.archive-tag.won {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.archive-tag.lost {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.archive-tag.play {
  background: rgba(255, 255, 255, 0.05);
  color: var(--mm-text-secondary, #9ca3af);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
  .mm-archive-grid {
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
    gap: 0.6rem;
  }
  .mm-archive-card {
    padding: 0.65rem;
    min-height: 74px;
  }
  .mm-archive-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .mm-archive-banner-btn {
    width: 100%;
    justify-content: center;
  }
}

/* 10. CI BRAND GAME NAME TYPOGRAPHY (HEADINGS ONLY) */
h1 .mm-brand-accent,
h2 .mm-brand-accent,
h3 .mm-brand-accent,
.game-main-title .mm-brand-accent,
.card-name .mm-brand-accent {
  color: var(--mm-accent-gold) !important;
  -webkit-text-fill-color: var(--mm-accent-gold) !important;
}

/* 11. EDITORIAL SEO GUIDE SECTION (Crawled by Google, elegant below the fold) */
.game-seo-guide {
  margin: 5rem auto 3rem auto;
  max-width: 820px;
  width: 92%;
  padding: 2.25rem 2rem;
  background: rgba(18, 18, 24, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--mm-radius-lg, 16px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--mm-text-secondary, #a2a2b4);
  font-size: 0.95rem;
  line-height: 1.65;
  box-sizing: border-box;
  text-align: left;
}

.game-seo-guide h2.game-seo-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--mm-text-primary, #f8f8fc);
  margin: 0 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.game-seo-intro {
  font-size: 0.98rem;
  margin: 0 0 1.75rem 0;
  color: #cbd5e1;
}

.game-seo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.game-seo-col {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--mm-radius-md, 10px);
  padding: 1.25rem;
}

.game-seo-col h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mm-text-primary, #f8f8fc);
  margin: 0 0 0.85rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.game-seo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.9rem;
}

.game-seo-list li {
  position: relative;
  padding-left: 1.25rem;
}

.game-seo-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--mm-accent-gold);
  font-weight: bold;
}

.game-seo-list strong {
  color: var(--mm-text-primary, #f8f8fc);
}

.game-seo-faq {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.game-seo-faq h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mm-text-primary, #f8f8fc);
  margin: 0 0 0.75rem 0;
}

.game-seo-faq p {
  margin: 0 0 0.75rem 0;
  font-size: 0.92rem;
}

@media (max-width: 680px) {
  .game-seo-guide {
    margin: 3.5rem auto 2rem auto;
    padding: 1.5rem 1.2rem;
  }
  .game-seo-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ==========================================================================
   BILINGUAL CONTENT SWITCHING (DE / EN)
   ========================================================================== */
html[lang="de"] .lang-block[data-lang="en"],
html[lang="de"] [data-i18n-en] {
  display: none !important;
}

html[lang="en"] .lang-block[data-lang="de"],
html[lang="en"] [data-i18n-de],
html:not([lang="de"]) .lang-block[data-lang="de"],
html:not([lang="de"]) [data-i18n-de] {
  display: none !important;
}

/* SEO Cross-Game Recommendations */
.game-seo-recommendations {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.game-seo-recommendations h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mm-text-primary, #f8f8fc);
  margin: 0 0 0.85rem 0;
}

.game-seo-rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.game-seo-rec-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--mm-radius-md, 10px);
  text-decoration: none;
  color: var(--mm-text-primary, #ffffff);
  transition: all var(--mm-transition-fast, 0.2s ease);
}

.game-seo-rec-card:hover {
  background: rgba(229, 169, 59, 0.08);
  border-color: rgba(229, 169, 59, 0.35);
  transform: translateY(-2px);
}

.game-seo-rec-card .rec-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--mm-accent-gold, #e5a93b);
  transition: all var(--mm-transition-fast, 0.2s ease);
}

.game-seo-rec-card .rec-icon svg,
.game-seo-rec-card .rec-icon .emblem-svg {
  width: 24px;
  height: 24px;
  display: block;
}

.game-seo-rec-card:hover .rec-icon {
  background: rgba(229, 169, 59, 0.12);
  border-color: rgba(229, 169, 59, 0.35);
  transform: scale(1.06);
}

.game-seo-rec-card .rec-icon.theme-cinesnip { color: var(--mm-accent-cinesnip, #e5a93b); }
.game-seo-rec-card .rec-icon.theme-chronos { color: var(--mm-accent-chronos, #00f2fe); }
.game-seo-rec-card .rec-icon.theme-cineclues { color: var(--mm-accent-cineclues, #e5a93b); }
.game-seo-rec-card .rec-icon.theme-plotlines { color: var(--mm-accent-plotlines, #7b61ff); }
.game-seo-rec-card .rec-icon.theme-cinedegrees { color: var(--mm-accent-cinedegrees, #a855f7); }
.game-seo-rec-card .rec-icon.theme-keyframe { color: var(--mm-accent-keyframe, #f59e0b); }

.game-seo-rec-card .rec-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--mm-text-primary, #ffffff);
}

.game-seo-rec-card .rec-desc {
  font-size: 0.78rem;
  color: var(--mm-text-muted, #71717a);
  margin-top: 2px;
}

/* ==========================================================================
   GAME HEADER — Platform Standard (alle 6 Spielseiten)
   Vorlage: CineChronos (Top: Badge links + Spielregeln rechts,
   Mitte: Headline zentriert, Unten: Teaser / Kurzanleitung zentriert).
   ========================================================================== */

.game-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--mm-content-max-width, 760px);
  margin: 1.25rem auto 1.5rem auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* Zeile 1: Meta-Bar (Badge links, Spielregeln-Button rechts) */
.game-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.85rem;
}

.game-header-top .header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

/* Issue / Daily Badge */
.daily-badge {
  display: inline-flex;
  align-items: center;
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mm-accent-gold, #e5a93b);
  background: rgba(229, 169, 59, 0.1);
  border: 1px solid rgba(229, 169, 59, 0.3);
  padding: 5px 14px;
  border-radius: 999px;
  font-family: var(--mm-font-mono, monospace);
  box-shadow: 0 0 15px rgba(229, 169, 59, 0.15);
  animation: mm-badge-fade-in 0.35s ease-out;
  line-height: 1.2;
  white-space: nowrap;
}

@keyframes mm-badge-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* How to Play / Spielregeln button — shared across all games */
.icon-btn.howto-btn {
  background: var(--mm-bg-surface, #121218);
  border: 1px solid var(--mm-border-subtle, rgba(255, 255, 255, 0.12));
  color: var(--mm-text-secondary, #a1a1aa);
  padding: 6px 14px;
  min-height: 38px;
  border-radius: var(--mm-btn-radius, 10px);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--mm-font-sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all var(--mm-transition-fast, 0.2s ease);
  line-height: 1;
  text-decoration: none;
}

.icon-btn.howto-btn:hover {
  background: var(--mm-bg-elevated, #1a1a24);
  border-color: rgba(229, 169, 59, 0.4);
  color: var(--mm-text-primary, #ffffff);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(229, 169, 59, 0.15);
}

.icon-btn.howto-btn:active {
  transform: translateY(1px);
}

.icon-btn.howto-btn svg {
  color: var(--mm-accent-gold, #e5a93b);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.icon-btn.howto-btn:hover svg {
  transform: scale(1.1);
}

/* Zeile 2: Headline zentriert */
.game-header-title {
  text-align: center;
  margin-bottom: 0.65rem;
}

.game-header-title h1 {
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
  color: var(--mm-text-primary, #ffffff);
  text-shadow: 0 0 30px rgba(229, 169, 59, 0.2);
}

/* Zeile 3: Teaser / Kurzanleitung zentriert */
.game-header-teaser {
  color: var(--mm-text-secondary, #a1a1aa);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  max-width: 580px;
  margin: 0 auto;
}

/* Mobile Responsivierung (<= 580px) */
@media (max-width: 580px) {
  .game-header {
    margin: 0.75rem auto 1.25rem auto;
    padding: 0 0.5rem;
  }

  .game-header-top {
    margin-bottom: 0.65rem;
  }

  .daily-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    letter-spacing: 0.08em;
  }

  /* Auf Mobile blendet der Text im Howto-Button aus, bleibt als kompakter 38x38 Touch-Button */
  .icon-btn.howto-btn {
    padding: 0;
    width: 38px;
    min-height: 38px;
    gap: 0;
  }

  .icon-btn.howto-btn span {
    display: none !important;
  }

  .icon-btn.howto-btn svg {
    margin: 0;
  }

  .game-header-title h1 {
    font-size: clamp(1.85rem, 8vw, 2.25rem);
  }

  .game-header-teaser {
    font-size: 0.88rem;
    padding: 0 0.5rem;
  }
}

