* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: #0e0e10;
  color: #f3f3f3;
  font-family: "Noto Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

a {
  color: #d4af37;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* Main Header & Global Navigation */
.main-header {
  background: #141418;
  border-bottom: 1px solid #282830;
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-brand h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #d4af37;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.brand-link:hover {
  opacity: 0.85;
  text-decoration: none;
}

.brand-header-logo {
  height: 32px;
  width: auto;
  max-width: 140px;
  display: block;
}

.brand-header-icon {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: #a0a0b0;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: #f3f3f3;
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.nav-link.is-active {
  color: #d4af37;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.nav-auth-btn {
  margin-left: 8px;
  background: #25252e;
  border: 1px solid #383844;
  color: #dedee4;
}

.nav-auth-btn:hover {
  border-color: #d4af37;
  color: #d4af37;
}

.nav-signin {
  background: #d4af37;
  color: #121214 !important;
  font-weight: 700;
}

.nav-signin:hover {
  background: #e2be4a;
  color: #000 !important;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  padding: 4px 8px;
  background: #18181e;
  border: 1px solid #2e2e38;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}

.lang-link {
  color: #8f8f9d;
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.lang-link:hover {
  color: #f0f0f4;
  text-decoration: none;
}

.lang-link.is-active {
  color: #d4af37;
}

.lang-sep {
  color: #40404e;
  user-select: none;
}

/* Global Footer */
.main-footer {
  background: #111114;
  border-top: 1px solid #202026;
  margin-top: 60px;
  padding: 24px 0;
  font-size: 0.85rem;
  color: #7a7a88;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-container p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: #8f8f9d;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #d4af37;
}

.footer-disclaimer {
  width: 100%;
  margin-top: 14px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #717182;
  text-align: center;
}

/* Larger button utility */
.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

/* Auth / Landing */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}

.auth-card {
  background: #18181c;
  border: 1px solid #2d2d35;
  border-radius: 12px;
  padding: 40px;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.auth-card h2 {
  margin-top: 0;
  color: #d4af37;
  font-size: 1.8rem;
}

.auth-desc {
  color: #a0a0a8;
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.error-notice {
  background: #4a151b;
  color: #ff9b9b;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.auth-note {
  font-size: 0.8rem;
  color: #6b6b76;
  margin-top: 24px;
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
  background: #d4af37;
  color: #000;
}

.btn-primary:hover {
  background: #e2be4a;
  text-decoration: none;
}

.btn-secondary {
  background: #2b2b34;
  color: #f3f3f3;
  border: 1px solid #3c3c48;
}

.btn-secondary:hover {
  background: #393946;
  text-decoration: none;
}

/* Dashboard Header */
.user-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  background: #18181c;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #282830;
  margin-bottom: 24px;
}

.user-header .lang-switcher {
  position: absolute;
  top: 20px;
  right: 24px;
  margin-left: 0;
  z-index: 2;
}

.user-avatar {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 2px solid #d4af37;
}

.user-info h2 {
  margin: 0 0 6px 0;
}

.steamid-meta {
  margin: 0 0 12px 0;
  font-size: 0.85rem;
  color: #8f8f9d;
}

.steamid-meta code {
  background: #25252e;
  padding: 2px 6px;
  border-radius: 4px;
  color: #d4af37;
}

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

/* Stats Bar */
.stats-bar {
  position: sticky;
  top: 12px;
  z-index: 100;
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  padding: 12px 16px;
  background: rgba(18, 18, 20, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(48, 48, 58, 0.75);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.stat-item {
  flex: 1;
  background: rgba(24, 24, 28, 0.95);
  border: 1px solid #282830;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #d4af37;
}

.playtime-blur {
  filter: blur(6px);
  cursor: pointer;
  user-select: none;
  transition: filter 0.2s ease;
}

.playtime-blur:hover {
  filter: blur(4px);
}

.stat-label {
  font-size: 0.85rem;
  color: #8f8f9d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Deck Limit Alert Banner */
.deck-limit-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(224, 108, 117, 0.12);
  border: 1px solid #e06c75;
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 24px;
  color: #f0f0f4;
}

.deck-limit-banner.is-full {
  background: rgba(212, 175, 55, 0.12);
  border-color: #d4af37;
}

.deck-limit-banner .banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e06c75;
  color: #121214;
  font-weight: 900;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.deck-limit-banner.is-full .banner-icon {
  background: #d4af37;
  color: #121214;
}

.deck-limit-banner .banner-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.9rem;
}

.deck-limit-banner .banner-content strong {
  font-size: 0.95rem;
}

/* Private Profile Warning Banner */
.private-profile-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: rgba(229, 169, 60, 0.12);
  border: 1px solid rgba(229, 169, 60, 0.5);
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 24px;
  color: #f0f0f4;
}

.private-profile-banner .banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5a93c;
  color: #121214;
  font-weight: 900;
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.private-profile-banner .banner-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.95rem;
}

.private-profile-banner .banner-content h4 {
  margin: 0;
  font-size: 1.1rem;
  color: #e5a93c;
}

.private-profile-banner .banner-content p {
  margin: 0;
  color: #c8c8d0;
  line-height: 1.5;
}

.private-profile-banner .privacy-guide {
  background: rgba(18, 18, 20, 0.6);
  border: 1px solid rgba(229, 169, 60, 0.25);
  border-radius: 6px;
  padding: 12px 16px;
  margin-top: 4px;
}

.private-profile-banner .privacy-guide-title {
  font-weight: 600;
  color: #f0f0f4;
  margin-bottom: 6px;
}

.private-profile-banner .privacy-guide ol {
  margin: 0;
  padding-left: 20px;
  color: #a0a0a8;
  font-size: 0.9rem;
  line-height: 1.6;
}

.private-profile-banner .privacy-guide ol li strong {
  color: #f0f0f4;
}

.private-profile-banner .banner-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* Library Section & Controls */
.library-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.section-header h3 {
  margin: 0 0 4px 0;
  font-size: 1.3rem;
}

.section-subtitle {
  margin: 0;
  color: #8f8f9d;
  font-size: 0.9rem;
}

.header-action-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.selection-counter-badge {
  background: #18181c;
  border: 1px solid #383844;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #d4af37;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.selection-counter-badge.limit-reached {
  border-color: #e06c75;
  color: #e06c75;
}

/* Toolbar Controls */
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  background: #18181c;
  border: 1px solid #282830;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
}

.toolbar-search {
  flex: 1;
  min-width: 220px;
}

.toolbar-search input {
  width: 100%;
  background: #121214;
  border: 1px solid #333340;
  border-radius: 6px;
  padding: 8px 12px;
  color: #f0f0f4;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.toolbar-search input:focus {
  border-color: #d4af37;
}

.toolbar-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #8f8f9d;
}

.toolbar-sort select {
  background: #121214;
  border: 1px solid #333340;
  border-radius: 6px;
  padding: 8px 12px;
  color: #f0f0f4;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.toolbar-sort select:focus {
  border-color: #d4af37;
}

.toolbar-shortcuts {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-outline {
  background: transparent;
  border: 1px solid #383844;
  color: #dedee4;
}

.btn-outline:hover {
  border-color: #d4af37;
  color: #d4af37;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
}

.game-card {
  position: relative;
  background: #18181c;
  border: 2px solid #282830;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: #555566;
}

.game-card.is-selected {
  border-color: #d4af37;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.4);
}

.game-card.is-locked {
  border-color: #d4af37;
  cursor: default;
}

.game-card.is-locked:hover {
  transform: none;
  border-color: #d4af37;
}

/* Gold Deck Card (100% Perfected) */
.game-card.is-deck-gold {
  border-color: #d4af37;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.4);
}

.game-card.is-deck-gold:hover {
  border-color: #d4af37;
}

.game-card.is-deck-gold .game-card-locked-badge,
.game-card-locked-badge.badge-gold {
  border-color: #d4af37;
  color: #d4af37;
}

/* Metallic Silver Deck Card (In-Progress / Non-Perfect) */
.game-card.is-deck-silver {
  border-color: #a8a9ad;
  box-shadow: 0 0 14px rgba(168, 169, 173, 0.4);
}

.game-card.is-deck-silver:hover {
  transform: none;
  border-color: #a8a9ad;
}

.game-card.is-deck-silver .game-card-locked-badge,
.game-card-locked-badge.badge-silver {
  border-color: #a8a9ad;
  color: #a8a9ad;
}

.game-card.is-deck-silver.is-selected .game-card-select-overlay {
  background: #a8a9ad;
  border-color: #a8a9ad;
}

.game-card.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(60%);
}

.game-card-locked-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(18, 18, 20, 0.88);
  border: 1px solid #d4af37;
  color: #d4af37;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.game-card-select-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(18, 18, 20, 0.75);
  border: 2px solid #555566;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.game-card.is-selected .game-card-select-overlay {
  background: #d4af37;
  border-color: #d4af37;
}

.game-card-select-overlay .check-icon {
  opacity: 0;
  font-size: 13px;
  font-weight: 700;
  color: #121214;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.game-card.is-selected .game-card-select-overlay .check-icon {
  opacity: 1;
}

.game-cover-wrap {
  width: 100%;
  aspect-ratio: 600 / 900;
  background: #121214;
  overflow: hidden;
}

.game-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-details {
  padding: 10px 12px;
}

.game-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.game-hours {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  color: #cfcfe0;
  background: #202026;
  padding: 2px 8px;
  border-radius: 4px;
}

.game-hours strong {
  color: #d4af37;
  margin-right: 3px;
}

.empty-results-message {
  text-align: center;
  padding: 48px 16px;
  color: #8f8f9d;
  font-size: 1rem;
}

/* Library Pagination Controls */
.pagination-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #18181c;
  border: 1px solid #282830;
  border-radius: 8px;
  padding: 12px 18px;
  margin-top: 24px;
}

.pagination-toolbar-top {
  margin-top: 16px;
  margin-bottom: 20px;
}

.pagination-toolbar-bottom {
  margin-top: 24px;
  margin-bottom: 0;
}

.pagination-info {
  font-size: 0.88rem;
  color: #8f8f9d;
  font-weight: 500;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  border-color: #d4af37;
  color: #d4af37;
  background: rgba(212, 175, 55, 0.08);
}

.pagination-btn.is-active {
  background: #d4af37;
  border-color: #d4af37;
  color: #121214;
  font-weight: 700;
}

.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  color: #8f8f9d;
  font-size: 0.9rem;
  user-select: none;
}

.pagination-size {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #8f8f9d;
}

.pagination-select {
  background: #121214;
  border: 1px solid #333340;
  border-radius: 6px;
  padding: 6px 10px;
  color: #f0f0f4;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.pagination-select:focus {
  border-color: #d4af37;
}


/* Generation Modal */
.modal-backdrop,
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-card {
  background: #18181c;
  border: 1px solid #333340;
  border-radius: 12px;
  padding: 32px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7);
  text-align: center;
}

.modal-header h3 {
  margin: 0 0 6px 0;
  font-size: 1.4rem;
  color: #f0f0f4;
}

.modal-subtitle {
  margin: 0;
  color: #8f8f9d;
  font-size: 0.9rem;
}

.progress-section {
  margin: 24px 0 16px 0;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background: #121214;
  border: 1px solid #282830;
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #b8860b, #d4af37, #f7e089);
  transition: width 0.4s ease;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.85rem;
  color: #8f8f9d;
}

.current-task-box {
  background: #121214;
  border: 1px solid #22222a;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.task-label {
  color: #8f8f9d;
}

.task-value {
  color: #e2e2ec;
  font-weight: 600;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.metric-card {
  background: #121214;
  border: 1px solid #282830;
  border-radius: 8px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
}

.metric-val {
  font-size: 1.4rem;
  font-weight: 700;
}

.metric-lbl {
  font-size: 0.75rem;
  color: #8f8f9d;
  margin-top: 4px;
}

.metric-card.gold .metric-val {
  color: #d4af37;
}

.metric-card.silver .metric-val {
  color: #c0c0c0;
}

.metric-card.failed .metric-val {
  color: #e06c75;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}

/* Deck Topbar & Controls */
.deck-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: #18181c;
  border-bottom: 1px solid #282830;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-center h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.steamid-tag {
  color: #8f8f9d;
  font-size: 0.9rem;
  font-weight: 400;
}

.shared-badge {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid #d4af37;
  color: #d4af37;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
}

/* Deck Filter Toolbar */
.deck-filter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: #121214;
  border-bottom: 1px solid #202026;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-group {
  display: flex;
  gap: 8px;
}

.filter-btn {
  background: #18181c;
  color: #8f8f9d;
  border: 1px solid #282830;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: #f0f0f4;
  border-color: #383844;
}

.filter-btn.active {
  background: #d4af37;
  color: #121214;
  border-color: #d4af37;
}

.deck-help-hint {
  font-size: 0.85rem;
  color: #6a6a78;
}

/* Deck Section & Card Presentation */
#deck-section {
  padding: 20px 0 60px 0;
  overflow: hidden;
}

.swiper-container-wrapper {
  max-width: 1000px;
  margin: 0 auto;
}

.swiper.slider {
  margin-top: 40px;
  width: 900px;
  max-width: 95vw;
  padding: 10px 0 50px 0;
}

.swiper-slide.card-slide {
  width: 450px;
  max-width: 85vw;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.deck-card-container {
  width: 100%;
  aspect-ratio: 600 / 900;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  background: #18181c;
}

.deck-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 10px;
}

/* Share Toast */
.share-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #18181c;
  color: #d4af37;
  border: 1px solid #d4af37;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 9999;
}

.share-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.swiper-pagination-bullet {
  background: #d4af37;
  opacity: 0.5;
  width: 10px;
  height: 10px;
  margin: 0 4px;
}

.swiper-pagination-bullet-active {
  background: #d4af37;
  opacity: 1;
}

.swiper-button-next,
.swiper-button-prev {
  color: #d4af37;
  z-index: 20;
}

/* ==========================================================================
   Home Redesign, FAQ & Contact Styles
   ========================================================================== */

/* Homepage Layout */
.home-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px 24px;
}

.hero-section {
  text-align: center;
  max-width: 820px;
  margin: 20px auto 60px auto;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 18px 0;
  color: #f5f5f7;
}

.gold-gradient-text {
  background: linear-gradient(135deg, #d4af37 0%, #f7e089 50%, #b8860b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #9a9aa8;
  margin: 0 0 32px 0;
}

.hero-action-box {
  display: flex;
  justify-content: center;
  align-items: center;
}

.authenticated-welcome-panel {
  background: #18181c;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  padding: 24px 36px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.welcome-text {
  font-size: 1.1rem;
  margin: 0 0 16px 0;
  color: #eaeaea;
}

.welcome-text strong {
  color: #d4af37;
}

.welcome-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.unauthenticated-login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Showcase Cards Section */
.showcase-section {
  margin-bottom: 70px;
}

.section-heading {
  text-align: center;
  margin-bottom: 40px;
}

.section-heading h2 {
  font-size: 1.9rem;
  color: #f0f0f4;
  margin: 0 0 8px 0;
}

.section-heading p {
  color: #8f8f9d;
  font-size: 1rem;
  margin: 0;
}

.showcase-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
  max-width: 900px;
  margin: 0 auto;
}

.showcase-card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #141418;
  border: 1px solid #26262e;
  border-radius: 14px;
  padding: 24px;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.showcase-card-wrapper:hover {
  transform: translateY(-6px);
}

.gold-wrapper:hover {
  border-color: #d4af37;
  box-shadow: 0 12px 36px rgba(212, 175, 55, 0.25);
}

.silver-wrapper:hover {
  border-color: #a8a9ad;
  box-shadow: 0 12px 36px rgba(168, 169, 173, 0.25);
}

.showcase-badge {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.gold-badge {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid #d4af37;
  color: #d4af37;
}

.silver-badge {
  background: rgba(168, 169, 173, 0.15);
  border: 1px solid #a8a9ad;
  color: #c8c9ce;
}

/* Sample Card Showcase (Real Engine-Generated PNGs) */
.showcase-card {
  width: 280px;
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.75);
  background: #101012;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.gold-wrapper:hover .showcase-card {
  box-shadow: 0 18px 45px rgba(212, 175, 55, 0.35);
  transform: scale(1.02);
}

.silver-wrapper:hover .showcase-card {
  box-shadow: 0 18px 45px rgba(168, 169, 173, 0.35);
  transform: scale(1.02);
}

.showcase-description {
  margin-top: 20px;
  text-align: center;
}

.showcase-description h3 {
  margin: 0 0 6px 0;
  font-size: 1.15rem;
  color: #f0f0f4;
}

.showcase-description p {
  margin: 0;
  font-size: 0.88rem;
  color: #8f8f9d;
  line-height: 1.5;
}

/* Features Grid */
.features-section {
  background: #141418;
  border: 1px solid #24242c;
  border-radius: 16px;
  padding: 40px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.feature-item {
  display: flex;
  flex-direction: column;
}

.feature-item h3 {
  margin: 0 0 8px 0;
  font-size: 1.05rem;
  color: #f3f3f3;
}

.feature-item p {
  margin: 0;
  font-size: 0.88rem;
  color: #8f8f9d;
  line-height: 1.5;
}

/* Informational Pages (FAQ, Contact) */
.info-page-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px 80px 24px;
}

.page-header {
  text-align: center;
  margin-bottom: 48px;
}

.page-header h1 {
  font-size: 2.2rem;
  margin: 0 0 10px 0;
  color: #f3f3f3;
}

.page-subtitle {
  font-size: 1.05rem;
  color: #8f8f9d;
  margin: 0;
}

/* FAQ Styles */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.faq-item {
  background: #18181c;
  border: 1px solid #282830;
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.2s ease;
}

.faq-item:hover {
  border-color: #3e3e4c;
}

.faq-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.faq-number {
  font-size: 1rem;
  font-weight: 800;
  color: #d4af37;
  background: rgba(212, 175, 55, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.faq-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #f0f0f4;
  font-weight: 700;
}

.faq-content {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #b0b0be;
}

.faq-content p {
  margin: 0 0 14px 0;
}

.faq-content p:last-child {
  margin-bottom: 0;
}

.faq-content ul {
  margin: 10px 0 16px 20px;
  padding: 0;
}

.faq-content li {
  margin-bottom: 8px;
}

.faq-content code {
  background: #23232c;
  padding: 2px 6px;
  border-radius: 4px;
  color: #d4af37;
  font-size: 0.85rem;
}

/* Contact Styles */
.contact-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 40px;
}

.contact-info-panel,
.contact-guidelines-panel {
  background: #18181c;
  border: 1px solid #282830;
  border-radius: 12px;
  padding: 28px;
}

.contact-info-panel h2,
.contact-guidelines-panel h2 {
  margin: 0 0 14px 0;
  font-size: 1.3rem;
  color: #f0f0f4;
}

.contact-info-panel p {
  color: #8f8f9d;
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 20px 0;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8f8f9d;
}

.detail-value {
  font-size: 0.95rem;
  color: #e2e2ec;
}

.detail-value code {
  background: #23232c;
  padding: 3px 8px;
  border-radius: 4px;
  color: #d4af37;
}

.guidelines-list {
  margin: 0;
  padding-left: 18px;
  color: #8f8f9d;
  font-size: 0.92rem;
  line-height: 1.6;
}

.guidelines-list li {
  margin-bottom: 12px;
}

.guidelines-list strong {
  color: #e2e2ec;
}

.page-footer-action {
  text-align: center;
  margin-top: 40px;
}

/* ==========================================================================
   Responsive & Mobile Optimizations
   ========================================================================== */

/* Tablet & Medium Displays (<= 992px) */
@media (max-width: 992px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-bar {
    top: 8px;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 24px;
  }

  .stat-value {
    font-size: 1.35rem;
  }

  .stat-label {
    font-size: 0.78rem;
  }

  .user-header {
    padding: 18px 20px;
    gap: 16px;
  }

  .swiper.slider {
    width: 100%;
    max-width: 96vw;
  }
}

/* Small Tablets & Large Phones (<= 768px) */
@media (max-width: 768px) {
  .pagination-toolbar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 12px;
    padding: 10px 14px;
  }

  .pagination-nav {
    justify-content: center;
  }

  .pagination-size {
    justify-content: center;
  }

  .deck-topbar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 14px 18px;
    gap: 12px;
  }

  .topbar-left,
  .topbar-right,
  .topbar-center {
    justify-content: center;
  }

  .deck-filter-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 18px;
    gap: 10px;
    text-align: center;
  }

  .filter-group {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Header Navigation & Brand */
  .header-container {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 12px 18px;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Homepage & Contact Responsive */
  .hero-title {
    font-size: 2.1rem;
  }

  .showcase-cards-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .contact-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Standard Mobile Viewports (<= 640px) */
@media (max-width: 640px) {
  .dashboard-container,
  .container {
    padding: 0 12px;
  }

  /* User Profile Header */
  .user-header {
    flex-direction: column;
    text-align: center;
    padding: 16px;
    gap: 12px;
  }

  .user-header .lang-switcher {
    top: 14px;
    right: 14px;
  }

  .user-avatar {
    width: 64px;
    height: 64px;
  }

  .user-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .user-actions .btn {
    width: 100%;
    text-align: center;
  }

  /* Sticky Stats Bar - Compact 2x2 Grid */
  .stats-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px 10px;
    top: 6px;
    margin-bottom: 20px;
    border-radius: 10px;
  }

  .stat-item {
    padding: 8px 12px;
    border-radius: 8px;
  }

  .stat-value {
    font-size: 1.15rem;
  }

  .stat-label {
    font-size: 0.7rem;
    letter-spacing: 0.3px;
  }

  /* Library Section Header & Actions */
  .library-section .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .header-action-group {
    width: 100%;
    justify-content: space-between;
  }

  .header-action-group .btn {
    flex: 1;
    text-align: center;
  }

  /* Filter & Search Toolbar */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 12px;
  }

  .toolbar-search {
    min-width: 100%;
  }

  .toolbar-sort {
    justify-content: space-between;
    width: 100%;
  }

  .toolbar-shortcuts {
    justify-content: space-between;
    width: 100%;
  }

  .toolbar-shortcuts .btn-sm {
    flex: 1;
    text-align: center;
  }

  /* Deck Limit Banner */
  .deck-limit-banner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding: 12px;
  }
}

/* Narrow Mobile Viewports (<= 480px) */
@media (max-width: 480px) {
  /* Games Grid - Balanced 2 columns */
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 10px;
  }

  .game-details {
    padding: 8px 10px;
  }

  .game-title {
    font-size: 0.78rem;
  }

  .game-hours {
    font-size: 0.72rem;
    padding: 2px 6px;
  }

  /* Batch Progress Modal */
  .modal-card {
    padding: 20px 14px;
    width: 94%;
    max-width: 100%;
  }

  .modal-header h3 {
    font-size: 1.2rem;
  }

  .modal-metrics {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 16px;
  }

  .metric-card {
    padding: 8px 4px;
  }

  .metric-val {
    font-size: 1.15rem;
  }

  .metric-lbl {
    font-size: 0.68rem;
  }

  .current-task-box {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .task-value {
    max-width: 170px;
  }

  .modal-actions {
    flex-direction: column;
    gap: 8px;
  }

  .modal-actions .btn {
    width: 100%;
  }

  /* Deck Carousel */
  .swiper.slider {
    margin-top: 20px;
    padding: 10px 0 35px 0;
  }

  .swiper-slide.card-slide {
    width: 270px;
    max-width: 82vw;
  }

  .swiper-button-next,
  .swiper-button-prev {
    --swiper-navigation-size: 22px;
  }

  /* Homepage & Features Narrow Mobile */
  .hero-title {
    font-size: 1.7rem;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .showcase-card {
    width: 250px;
    height: 375px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .features-section {
    padding: 24px 16px;
  }

  .authenticated-welcome-panel {
    padding: 18px 16px;
  }
}