/* ── VIEWS ── */
.view { display: none; }
.view.active { display: block; }

/* ── TABLE VIEW ── */
.game-table { width: 100%; border-collapse: collapse; }
.game-table th {
  text-align: left; padding: 10px 14px; font-size: 10px;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--text3);
  border-bottom: 1px solid var(--border); font-family: 'Syne', sans-serif;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.game-table th:hover { color: var(--text); }
.game-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.game-table tr:hover td { background: #18181f; cursor: pointer; }
.game-table .td-nome { font-family: 'Syne', sans-serif; font-weight: 600; color: var(--text); }
/* Miniatura da capa à esquerda do nome (mesma capa do modo grade, só a imagem) */
.td-nome-wrap { display: flex; align-items: center; gap: 12px; }
.table-cover {
  width: 34px; height: 45px; flex-shrink: 0;
  object-fit: cover; border-radius: 4px;
  background: #18181f; box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.table-cover.is-grayscale,
.table-cover-empty.is-grayscale {
  filter: grayscale(1);
  opacity: 0.8;
}
.game-table tr:hover .table-cover.is-grayscale,
.game-table tr:hover .table-cover-empty.is-grayscale {
  filter: grayscale(0.4);
  opacity: 1;
}
.table-cover-empty { display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--text3); }
.td-nome-text { min-width: 0; }

/* ── STATS VIEW ── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: #111118; border: 1px solid var(--border); border-radius: var(--r2); padding: 20px; text-align: center; }
.stat-card .big { font-family: 'Syne', sans-serif; font-size: 36px; font-weight: 800; color: var(--accent2); }
.stat-card .sub { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 4px; font-family: 'Syne', sans-serif; }
.charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.chart-card { background: #111118; border: 1px solid var(--border); border-radius: var(--r2); padding: 20px; }
.chart-card h3 { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; color: var(--text2); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { font-size: 11px; color: var(--text2); width: 120px; text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; height: 8px; background: #18181f; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 0.6s ease; }
.bar-count { font-size: 11px; color: var(--text3); width: 28px; text-align: right; }

/* ── TIMELINE VIEW ── */
.timeline-container {
  background: #111118;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 30px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  overflow-x: auto;
  min-height: 250px;
  position: relative;
  z-index: 1;
}
.timeline-track {
  position: relative;
  height: 32px;
  background: #18181f;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 20px;
}
.timeline-bar {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 4px;
  min-width: 4px;
  box-shadow: 0 0 10px var(--accent-glow);
  transition: filter 0.2s;
}
.timeline-bar::after {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  transition: all 0.2s;
}
.timeline-bar:hover {
  z-index: 1000 !important;
}
.timeline-bar:hover::after {
  border-color: #fff;
  box-shadow: 0 0 12px #fff;
}
.timeline-bar:hover .timeline-stem {
  opacity: 1 !important;
  background: #fff !important;
  box-shadow: 0 0 8px #fff;
}
.timeline-game-cover {
  position: absolute;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.timeline-game-cover img, .timeline-game-cover .cover-placeholder {
  width: 64px;
  height: 85px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid #111118;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: #18181f;
}
.timeline-cover-wrapper {
  position: relative;
  transition: transform 0.2s;
  z-index: 10;
}
.timeline-cover-wrapper img {
  display: block;
}
.timeline-collection-badge {
  position: absolute !important;
  top: -6px;
  right: -6px;
  width: 20px !important;
  height: 28px !important;
  border-radius: 4px !important;
  border: 1px solid #111118 !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.8) !important;
  object-fit: cover;
  z-index: 15;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.timeline-game-cover.pos-above .timeline-cover-wrapper {
  transform-origin: bottom center;
}
.timeline-game-cover.pos-below .timeline-cover-wrapper {
  transform-origin: top center;
}
.timeline-game-cover.pos-center .timeline-cover-wrapper {
  transform-origin: center center;
}
.timeline-game-cover.pos-above-extreme .timeline-cover-wrapper {
  transform-origin: top center;
}
.timeline-game-cover.pos-below-extreme .timeline-cover-wrapper {
  transform-origin: bottom center;
}
.timeline-bar:hover .timeline-cover-wrapper > img:first-child, 
.timeline-bar:hover .timeline-cover-wrapper > .cover-placeholder {
  box-shadow: 0 0 0 2px #fff, 0 8px 20px rgba(255,255,255,0.4);
  z-index: 20;
}
.timeline-game-cover:hover .timeline-cover-wrapper,
.timeline-game-cover.mobile-active .timeline-cover-wrapper {
  transform: scale(3.5);
  z-index: 100 !important;
}

.timeline-game-cover.pos-above:hover .timeline-cover-wrapper,
.timeline-game-cover.pos-above.mobile-active .timeline-cover-wrapper,
.timeline-game-cover.pos-above-extreme:hover .timeline-cover-wrapper,
.timeline-game-cover.pos-above-extreme.mobile-active .timeline-cover-wrapper {
  transform: scale(3.5) translateY(-18px);
}

.timeline-date-badge {
  position: absolute;
  top: 100%;
  left: 50%;
  margin-top: 4px;
  transform: translateX(-50%) scale(0.2857) translateY(-10px);
  transform-origin: center top;
  background: rgba(17, 17, 24, 0.95);
  border: 1px solid var(--accent);
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 20px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 8px 25px rgba(0,0,0,0.9);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 20;
}

.timeline-game-cover:hover .timeline-date-badge,
.timeline-game-cover.mobile-active .timeline-date-badge {
  opacity: 1;
  transform: translateX(-50%) scale(0.2857) translateY(0);
}
.timeline-game-cover.origin-center:has(.timeline-collection-badge):hover .timeline-cover-wrapper > img:first-child,
.timeline-game-cover.origin-center:has(.timeline-collection-badge):hover .timeline-cover-wrapper > .cover-placeholder,
.timeline-game-cover.origin-center:has(.timeline-collection-badge).mobile-active .timeline-cover-wrapper > img:first-child,
.timeline-game-cover.origin-center:has(.timeline-collection-badge).mobile-active .timeline-cover-wrapper > .cover-placeholder {
  box-shadow: 0 0 0 3px #fff, 0 20px 50px rgba(0,0,0,0.8);
  transform: translateX(-35%);
}
.timeline-game-cover.origin-center:hover .timeline-collection-badge,
.timeline-game-cover.origin-center.mobile-active .timeline-collection-badge {
  width: 42px !important;
  height: 56px !important;
  top: auto !important;
  bottom: 0 !important;
  right: -35% !important;
  box-shadow: 0 0 0 2px #fff, 0 10px 25px rgba(0,0,0,0.8) !important;
}

.timeline-game-cover.origin-left:has(.timeline-collection-badge):hover .timeline-cover-wrapper > img:first-child,
.timeline-game-cover.origin-left:has(.timeline-collection-badge):hover .timeline-cover-wrapper > .cover-placeholder,
.timeline-game-cover.origin-left:has(.timeline-collection-badge).mobile-active .timeline-cover-wrapper > img:first-child,
.timeline-game-cover.origin-left:has(.timeline-collection-badge).mobile-active .timeline-cover-wrapper > .cover-placeholder {
  box-shadow: 0 0 0 3px #fff, 0 20px 50px rgba(0,0,0,0.8);
  transform: translateX(0);
}
.timeline-game-cover.origin-left:hover .timeline-collection-badge,
.timeline-game-cover.origin-left.mobile-active .timeline-collection-badge {
  width: 42px !important;
  height: 56px !important;
  top: auto !important;
  bottom: 0 !important;
  right: -70% !important;
  box-shadow: 0 0 0 2px #fff, 0 10px 25px rgba(0,0,0,0.8) !important;
}

.timeline-game-cover.origin-right:has(.timeline-collection-badge):hover .timeline-cover-wrapper > img:first-child,
.timeline-game-cover.origin-right:has(.timeline-collection-badge):hover .timeline-cover-wrapper > .cover-placeholder,
.timeline-game-cover.origin-right:has(.timeline-collection-badge).mobile-active .timeline-cover-wrapper > img:first-child,
.timeline-game-cover.origin-right:has(.timeline-collection-badge).mobile-active .timeline-cover-wrapper > .cover-placeholder {
  box-shadow: 0 0 0 3px #fff, 0 20px 50px rgba(0,0,0,0.8);
  transform: translateX(-70%);
}
.timeline-game-cover.origin-right:hover .timeline-collection-badge,
.timeline-game-cover.origin-right.mobile-active .timeline-collection-badge {
  width: 42px !important;
  height: 56px !important;
  top: auto !important;
  bottom: 0 !important;
  right: 0 !important;
  box-shadow: 0 0 0 2px #fff, 0 10px 25px rgba(0,0,0,0.8) !important;
}

.timeline-game-cover:not(:has(.timeline-collection-badge)):hover .timeline-cover-wrapper > img:first-child,
.timeline-game-cover:not(:has(.timeline-collection-badge)):hover .timeline-cover-wrapper > .cover-placeholder,
.timeline-game-cover:not(:has(.timeline-collection-badge)).mobile-active .timeline-cover-wrapper > img:first-child,
.timeline-game-cover:not(:has(.timeline-collection-badge)).mobile-active .timeline-cover-wrapper > .cover-placeholder {
  box-shadow: 0 0 0 3px #fff, 0 20px 50px rgba(0,0,0,0.8);
}.timeline-bar:hover .timeline-game-title {
  color: #fff !important;
  text-shadow: 0 0 10px rgba(255,255,255,0.8), 0 2px 5px rgba(0,0,0,1) !important;
}
.timeline-bar:hover .timeline-arrow {
  filter: drop-shadow(0 -2px 4px rgba(255,255,255,0.6)) drop-shadow(0 2px 4px rgba(255,255,255,0.6));
}
.timeline-arrow {
  width: 0; 
  height: 0; 
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #111118;
  margin-top: 2px;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5));
}
.timeline-axis {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  pointer-events: none;
  z-index: 50;
}
.timeline-axis span {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 6px rgba(0,0,0,1);
}
.timeline-axis span::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--text3);
  border-bottom: 1px solid var(--border); font-family: 'Syne', sans-serif;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.game-table th:hover { color: var(--text); }
.game-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.game-table tr:hover td { background: #18181f; cursor: pointer; }
.game-table .td-nome { font-family: 'Syne', sans-serif; font-weight: 600; color: var(--text); }
/* Miniatura da capa à esquerda do nome (mesma capa do modo grade, só a imagem) */
.td-nome-wrap { display: flex; align-items: center; gap: 12px; }
.table-cover {
  width: 34px; height: 45px; flex-shrink: 0;
  object-fit: cover; border-radius: 4px;
  background: #18181f; box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.table-cover.is-grayscale,
.table-cover-empty.is-grayscale {
  filter: grayscale(1);
  opacity: 0.8;
}
.game-table tr:hover .table-cover.is-grayscale,
.game-table tr:hover .table-cover-empty.is-grayscale {
  filter: grayscale(0.4);
  opacity: 1;
}
.table-cover-empty { display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--text3); }
.td-nome-text { min-width: 0; }

/* ── STATS VIEW ── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card { background: #111118; border: 1px solid var(--border); border-radius: var(--r2); padding: 20px; text-align: center; }
.stat-card .big { font-family: 'Syne', sans-serif; font-size: 36px; font-weight: 800; color: var(--accent2); }
.stat-card .sub { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 4px; font-family: 'Syne', sans-serif; }
.charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.chart-card { background: #111118; border: 1px solid var(--border); border-radius: var(--r2); padding: 20px; }
.chart-card h3 { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; color: var(--text2); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.bar-chart { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { font-size: 11px; color: var(--text2); width: 120px; text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; height: 8px; background: #18181f; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 0.6s ease; }
.bar-count { font-size: 11px; color: var(--text3); width: 28px; text-align: right; }

/* ── TIMELINE VIEW ── */
.timeline-container {
  background: #111118;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 30px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  overflow-x: auto;
  min-height: 250px;
}
.timeline-track {
  position: relative;
  height: 32px;
  background: #18181f;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 20px;
}
.timeline-bar {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 4px;
  min-width: 4px;
  box-shadow: 0 0 10px var(--accent-glow);
  transition: filter 0.2s;
}
.timeline-bar::after {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  transition: all 0.2s;
}
.timeline-bar:hover {
  z-index: 1000 !important;
}
.timeline-bar:hover::after {
  border-color: #fff;
  box-shadow: 0 0 12px #fff;
}
.timeline-bar:hover .timeline-stem {
  opacity: 1 !important;
  background: #fff !important;
  box-shadow: 0 0 8px #fff;
}
.timeline-game-cover {
  position: absolute;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 10;
}
.timeline-game-cover img, .timeline-game-cover .cover-placeholder {
  width: 64px;
  height: 85px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid #111118;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: #18181f;
}
.timeline-cover-wrapper {
  position: relative;
  transition: transform 0.2s;
  z-index: 10;
}
.timeline-cover-wrapper img {
  display: block;
}
.timeline-collection-badge {
  position: absolute !important;
  top: -6px;
  right: -6px;
  width: 20px !important;
  height: 28px !important;
  border-radius: 4px !important;
  border: 1px solid #111118 !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.8) !important;
  object-fit: cover;
  z-index: 15;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.timeline-game-cover.pos-above .timeline-cover-wrapper {
  transform-origin: bottom center;
}
.timeline-game-cover.pos-below .timeline-cover-wrapper {
  transform-origin: top center;
}
.timeline-game-cover.pos-center .timeline-cover-wrapper {
  transform-origin: center center;
}
.timeline-game-cover.pos-above-extreme .timeline-cover-wrapper {
  transform-origin: top center;
}
.timeline-game-cover.pos-below-extreme .timeline-cover-wrapper {
  transform-origin: bottom center;
}
.timeline-bar:hover .timeline-cover-wrapper > img:first-child, 
.timeline-bar:hover .timeline-cover-wrapper > .cover-placeholder {
  box-shadow: 0 0 0 2px #fff, 0 8px 20px rgba(255,255,255,0.4);
  z-index: 20;
}
.timeline-game-cover:hover .timeline-cover-wrapper,
.timeline-game-cover.mobile-active .timeline-cover-wrapper {
  transform: scale(3.5);
  z-index: 100 !important;
}
.timeline-game-cover.origin-center:has(.timeline-collection-badge):hover .timeline-cover-wrapper > img:first-child,
.timeline-game-cover.origin-center:has(.timeline-collection-badge):hover .timeline-cover-wrapper > .cover-placeholder,
.timeline-game-cover.origin-center:has(.timeline-collection-badge).mobile-active .timeline-cover-wrapper > img:first-child,
.timeline-game-cover.origin-center:has(.timeline-collection-badge).mobile-active .timeline-cover-wrapper > .cover-placeholder {
  box-shadow: 0 0 0 3px #fff, 0 20px 50px rgba(0,0,0,0.8);
  transform: translateX(-35%);
}
.timeline-game-cover.origin-center:hover .timeline-collection-badge,
.timeline-game-cover.origin-center.mobile-active .timeline-collection-badge {
  width: 42px !important;
  height: 56px !important;
  top: auto !important;
  bottom: 0 !important;
  right: -35% !important;
  box-shadow: 0 0 0 2px #fff, 0 10px 25px rgba(0,0,0,0.8) !important;
}

.timeline-game-cover.origin-left:has(.timeline-collection-badge):hover .timeline-cover-wrapper > img:first-child,
.timeline-game-cover.origin-left:has(.timeline-collection-badge):hover .timeline-cover-wrapper > .cover-placeholder,
.timeline-game-cover.origin-left:has(.timeline-collection-badge).mobile-active .timeline-cover-wrapper > img:first-child,
.timeline-game-cover.origin-left:has(.timeline-collection-badge).mobile-active .timeline-cover-wrapper > .cover-placeholder {
  box-shadow: 0 0 0 3px #fff, 0 20px 50px rgba(0,0,0,0.8);
  transform: translateX(0);
}
.timeline-game-cover.origin-left:hover .timeline-collection-badge,
.timeline-game-cover.origin-left.mobile-active .timeline-collection-badge {
  width: 42px !important;
  height: 56px !important;
  top: auto !important;
  bottom: 0 !important;
  right: -70% !important;
  box-shadow: 0 0 0 2px #fff, 0 10px 25px rgba(0,0,0,0.8) !important;
}

.timeline-game-cover.origin-right:has(.timeline-collection-badge):hover .timeline-cover-wrapper > img:first-child,
.timeline-game-cover.origin-right:has(.timeline-collection-badge):hover .timeline-cover-wrapper > .cover-placeholder,
.timeline-game-cover.origin-right:has(.timeline-collection-badge).mobile-active .timeline-cover-wrapper > img:first-child,
.timeline-game-cover.origin-right:has(.timeline-collection-badge).mobile-active .timeline-cover-wrapper > .cover-placeholder {
  box-shadow: 0 0 0 3px #fff, 0 20px 50px rgba(0,0,0,0.8);
  transform: translateX(-70%);
}
.timeline-game-cover.origin-right:hover .timeline-collection-badge,
.timeline-game-cover.origin-right.mobile-active .timeline-collection-badge {
  width: 42px !important;
  height: 56px !important;
  top: auto !important;
  bottom: 0 !important;
  right: 0 !important;
  box-shadow: 0 0 0 2px #fff, 0 10px 25px rgba(0,0,0,0.8) !important;
}

.timeline-game-cover:not(:has(.timeline-collection-badge)):hover .timeline-cover-wrapper > img:first-child,
.timeline-game-cover:not(:has(.timeline-collection-badge)):hover .timeline-cover-wrapper > .cover-placeholder,
.timeline-game-cover:not(:has(.timeline-collection-badge)).mobile-active .timeline-cover-wrapper > img:first-child,
.timeline-game-cover:not(:has(.timeline-collection-badge)).mobile-active .timeline-cover-wrapper > .cover-placeholder {
  box-shadow: 0 0 0 3px #fff, 0 20px 50px rgba(0,0,0,0.8);
}.timeline-bar:hover .timeline-game-title {
  color: #fff !important;
  text-shadow: 0 0 10px rgba(255,255,255,0.8), 0 2px 5px rgba(0,0,0,1) !important;
}
.timeline-bar:hover .timeline-arrow {
  filter: drop-shadow(0 -2px 4px rgba(255,255,255,0.6)) drop-shadow(0 2px 4px rgba(255,255,255,0.6));
}
.timeline-arrow {
  width: 0; 
  height: 0; 
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #111118;
  margin-top: 2px;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5));
}
.timeline-axis {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  pointer-events: none;
  z-index: 50;
}
.timeline-axis span {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 6px rgba(0,0,0,1);
}
.timeline-axis span::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.15);
  z-index: -1;
}

/* ── BLUEPRINT CONSOLE VIEW ── */
.console-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 10px 0 30px;
}

.console-card {
  background: #000000 !important;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.console-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 12px 24px rgba(0,0,0,0.5), 0 0 15px var(--accent-glow);
  background: #000000 !important;
}

.console-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #000000 !important;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

.console-blueprint-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: all 0.3s ease;
}

.console-card:hover .console-blueprint-img {
  transform: scale(1.05);
}

.console-fallback-icon {
  font-size: 48px;
  filter: grayscale(0.5);
  transition: transform 0.3s;
}

.console-card:hover .console-fallback-icon {
  transform: scale(1.1) rotate(5deg);
}

.console-card-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.console-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px 0;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.console-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text2);
}

.console-dot {
  opacity: 0.5;
}

.console-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text2);
}

.console-launch-year, .console-game-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.console-footer-icon {
  width: 15px;
  height: 15px;
  color: var(--accent);
  opacity: 0.95;
}

.console-card-footer strong {
  color: var(--text);
  font-weight: 800;
  font-size: 15px;
}

/* Edições de Colecionador */
.console-card.collector-edition {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 0 8px rgba(212, 175, 55, 0.05);
}

.console-card.collector-edition:hover {
  border-color: rgba(212, 175, 55, 0.9);
  box-shadow: 0 12px 24px rgba(0,0,0,0.5), 0 0 15px rgba(212, 175, 55, 0.4);
}

.console-collector-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #d4af37, #f3e5ab);
  color: #000;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  z-index: 5;
  animation: collectorGlow 2s infinite alternate;
}

@keyframes collectorGlow {
  from { box-shadow: 0 2px 4px rgba(212, 175, 55, 0.4), 0 0 4px rgba(212, 175, 55, 0.2); }
  to { box-shadow: 0 2px 10px rgba(212, 175, 55, 0.7), 0 0 10px rgba(212, 175, 55, 0.5); }
}

/* Detalhes do Console */
.console-detail-blueprint-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  background: #000000 !important;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.console-detail-blueprint-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  animation: blueprintPulse 4s infinite alternate;
}

@keyframes blueprintPulse {
  from { opacity: 0.8; }
  to { opacity: 1; }
}
}

/* Preview no Formulário */
.blueprint-preview-container {
  width: 100%;
  height: 120px;
  background: #000000 !important;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: hidden;
  position: relative;
}

.console-fallback-svg {
  width: 48px;
  height: 48px;
  color: var(--text3);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.console-card:hover .console-fallback-svg {
  color: var(--accent);
  opacity: 1;
  transform: scale(1.1) rotate(5deg);
}

.autocomplete-fallback-svg {
  width: 24px;
  height: 24px;
  color: var(--text3);
  opacity: 0.7;
}

.game-fallback-icon {
  width: 20px;
  height: 20px;
  color: var(--text3);
  opacity: 0.7;
}

.blueprint-preview-card {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.blueprint-preview-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.console-game-item:hover {
  transform: scale(1.1);
  z-index: 2;
}

.console-detail-game-cover-wrap {
  transition: border-color 0.2s;
}

.console-game-item:hover .console-detail-game-cover-wrap {
  border-color: var(--accent) !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.8), 0 0 8px var(--accent-glow) !important;
}

.console-meta-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.2px;
  vertical-align: middle;
}

.console-spec-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
  opacity: 0.9;
  vertical-align: middle;
}

.gold-star {
  color: #f0c060 !important;
}

/* CONSOLE TIMELINE CUSTOM STYLES */
.console-timeline-cover img, .console-timeline-cover .cover-placeholder {
  width: 78px !important;
  height: 58px !important;
  object-fit: contain !important;
  background: #18181f;
}
.console-timeline-card-cover {
  width: 66px !important;
  height: 48px !important;
  flex-shrink: 0;
}
.console-timeline-card-cover img, .console-timeline-card-cover .cover-placeholder {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #18181f;
  border-radius: 6px;
}

/* Timeline controls must fit independently of the timeline visualization. */
.timeline-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.timeline-filters { display: grid; grid-template-columns: 140px 100px 140px; gap: 10px; min-width: 0; }
@media (max-width: 900px) {
  .timeline-toolbar { align-items: stretch; flex-direction: column; }
  .timeline-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .timeline-filters select { min-width: 0; min-height: 44px; }
  #timeline-type { grid-column: 1 / -1; }
}
