/* === Fixed Reset Button === */
.reset-btn {
  margin-top: auto;
  margin-bottom: 10px;
  background: var(--bg2);
  color: var(--gold);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  width: fit-content;
  align-self: center;
  box-shadow: 0 0 8px rgba(212,175,55,0.3);
  flex-shrink: 0;
}
.reset-btn:hover {
  background: var(--gold);
  color: var(--bg);
  box-shadow: 0 0 15px rgba(212,175,55,0.6);
}
.reset-btn svg {
  width: 22px;
  height: 22px;
}

.stats {
  text-align: center;
  margin-bottom: 25px;
  font-size: 18px;
}
.stats span { margin: 0 15px; font-weight: 600; }

.board {
  position: relative;
  width: 90%;
  max-width: 1400px;
  margin: auto;
}

svg.connections {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.reward-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 50px;
  width: 100%;
}

.reward-row {
  position: relative;
  height: 150px;
}

.reward-box {
  position: relative;
  background: var(--bg2);
  border: 2px solid var(--gray);
  border-radius: 10px;
  padding: 12px;
  width: 120px;
  height: 120px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  overflow: hidden;
}

.reward-box img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 8px;
  filter: grayscale(1) brightness(0.6);
  transition: filter 0.2s ease;
}

.reward-name { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.reward-cost { font-size: 12px; color: var(--gold); }

/* Right sidebar */
#info-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 250px;
  height: 100vh;
  background: var(--bg2);
  border-left: 2px solid var(--gold);
  color: var(--text);
  padding: 25px 25px 15px 25px;
  box-shadow: -5px 0 15px rgba(0,0,0,0.6);
  transition: right 0.4s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

#info-sidebar.closed {
  right: -360px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
  font-size: 14px;
}

.stat-item img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.stat-label {
  font-weight: 600;
  color: var(--gold);
  flex: 1;
}

.stat-value {
  font-weight: 600;
  color: var(--text);
}

.shards-section {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(212,175,55,0.3);
}

.shards-title {
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 8px;
  font-size: 13px;
  text-align: center;
}

.shard-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
  margin-bottom: 6px;
}

.shard-item img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.shard-name {
  font-size: 14px;
  flex: 1;
  color: var(--text);
}

.shard-count {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.total-points {
  text-align: center;
  font-size: 12px;
  color: #888;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(212,175,55,0.2);
}

.reward-box.available img, .reward-box.active img {
  filter: grayscale(0) brightness(1);
}

.reward-box.available {
  border-color: var(--gold);
  filter: grayscale(0.2);
}
.reward-box.active {
  border-color: var(--green);
  filter: none;
  box-shadow: 0 0 18px rgba(0,255,100,0.4);
}
.reward-box.locked {
  border-color: var(--gray);
  filter: grayscale(1) brightness(0.5);
  cursor: not-allowed;
}

.activation-flash {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140%;
  height: 140%;
  transform: translate(-50%, -50%) scale(0.2);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(212,175,55,0.8) 0%, rgba(212,175,55,0) 70%);
  animation: pulse 0.7s ease-out forwards;
  z-index: 2;
}
@keyframes pulse {
  0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.2); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); }
}

.reward-box.planned {
  border-color: #007bff;
  filter: none;
  box-shadow: 0 0 10px #00c9ff;
}

.info-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #fcf6ff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  z-index: 10001;
  padding: 6px;
  transition: color 0.25s ease, transform 0.2s ease;
}

.info-btn:hover {
  color: #d4af37;
  transform: scale(1.08);
}

.info-btn svg {
  width: 34px;
  height: 34px;
  stroke-width: 2;
  vertical-align: middle;
}

/* Responsive */
@media (max-width: 1400px) {
  .reward-box {
    width: 60px;
    height: 60px;
  }
  .reward-box img {
    width: 50px;
    height: 50px;
  }
  .reward-name { display: none; }
  .reward-cost { font-size: 9px; margin-top: -10px; }
  #info-sidebar { width: 25%; right: calc(-25% - 2px); padding: 0; }
  #info-sidebar span { padding: 20px; }
  #info-sidebar.closed { right: 0; padding: 0; }
  #info-sidebar.closed span { padding: 20px; }
}

@media (max-width: 1000px) {
  .reward-box {
    width: 40px;
    height: 40px;
  }
  .reward-box img {
    width: 20px;
    height: 20px;
  }
  .reward-cost { font-size: 7px; margin-top: -8px; }
  .page-title { font-size: 8px; }
}

@media (max-width: 700px) {
  .reward-box {
    width: 34px;
    height: 34px;
    padding: 2px;
  }
  .reward-box img {
    width: 20px;
    height: 20px;
    margin: 0;
  }
  .reward-cost { font-size: 6px; margin-top: -4px; }
  #page-title { font-size: 26px; padding-top: 16px; }
  .board { padding-top: 16px; }
  #info-sidebar { width: 100%; right: calc(-100% - 2px); }
}
