/* ======= Block Clicker Game Styles ======= */

.bc-page {
  padding-top: 1.5rem !important;
}

/* --- Header --- */
.bc-header {
  text-align: center;
  margin-bottom: 2rem;
}
.bc-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #BAE6FD;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  transition: color 0.2s;
}
.bc-back-btn:hover { color: #fff; }
.bc-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #f9fafb;
  font-weight: 800;
  margin: 0;
}
.bc-title span {
  background: linear-gradient(120deg, #4ade80, #22c55e, #e5e7eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bc-subtitle {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Stats Bar --- */
.bc-stats-bar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: rgba(15,23,42,0.95);
  border-radius: 14px;
  border: 1px solid rgba(14,165,233,0.35);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.bc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}
.bc-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.bc-stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: #38bdf8;
  font-variant-numeric: tabular-nums;
}

/* Game shell: über Particles/Hintergrund klickbar halten */
.bc-game-container {
  position: relative;
  z-index: 2;
}

/* --- Full reset (progress + leaderboard) --- */
.bc-danger-zone {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  padding: 1.15rem 1.35rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: linear-gradient(165deg, rgba(69, 10, 10, 0.55) 0%, rgba(15, 23, 42, 0.92) 100%);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}
.bc-danger-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}
.bc-danger-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.35);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fecaca;
  font-size: 0.95rem;
}
.bc-danger-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fecaca;
}
.bc-danger-hint {
  margin: 0 0 1rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #fca5a5;
  opacity: 0.95;
}
.bc-danger-hint strong {
  color: #fde68a;
  font-weight: 700;
}
.bc-full-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.35rem;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.65);
  background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 100%);
  color: #fff7ed;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(127, 29, 29, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  width: 100%;
  max-width: 20rem;
}
.bc-full-reset-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}
.bc-full-reset:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(127, 29, 29, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.bc-full-reset:active {
  transform: translateY(1px);
  filter: brightness(0.96);
}
.bc-full-reset:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 3px;
}

/* --- Main Game Area --- */
.bc-main-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 800px) {
  .bc-main-area {
    grid-template-columns: 1fr;
  }
}

/* --- Click Area --- */
.bc-click-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.bc-block-wrapper {
  position: relative;
}
.bc-block-name {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #BAE6FD;
  margin-bottom: 0.8rem;
}

/* --- Isometric Block --- */
.bc-block {
  width: 200px;
  height: 230px;
  position: relative;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  padding: 0;
  transition: transform 0.1s ease, filter 0.1s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  animation: bc-block-idle 3s ease-in-out infinite;
}
@keyframes bc-block-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.bc-block:hover {
  filter: brightness(1.15) drop-shadow(0 0 12px rgba(56,189,248,0.4));
}
.bc-block:active {
  transform: scale(0.9) !important;
  filter: brightness(1.3);
}
.bc-block-canvas {
  width: 200px;
  height: 230px;
  image-rendering: pixelated;
  pointer-events: none;
}

/* Click particles */
.bc-click-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}
.bc-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  animation: bc-particle-fly 0.6s ease-out forwards;
}
@keyframes bc-particle-fly {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.3); }
}

/* Click number popup */
.bc-click-number {
  position: absolute;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fbbf24;
  pointer-events: none;
  text-shadow: 1px 1px 2px #000;
  animation: bc-number-float 0.8s ease-out forwards;
  z-index: 20;
}
@keyframes bc-number-float {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-60px) scale(0.6); }
}

/* --- Progress Bar --- */
.bc-progress-bar {
  width: 100%;
  max-width: 300px;
  height: 28px;
  background: rgba(15,23,42,0.95);
  border-radius: 14px;
  border: 1px solid rgba(14,165,233,0.3);
  overflow: hidden;
  position: relative;
}
.bc-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0284C7, #38bdf8);
  border-radius: 14px;
  transition: width 0.15s ease;
}
.bc-progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #e0f2fe;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* --- Upgrades Panel --- */
.bc-upgrades-panel {
  background: rgba(15,23,42,0.95);
  border-radius: 14px;
  border: 1px solid rgba(14,165,233,0.35);
  padding: 1.2rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  max-height: 500px;
  overflow-y: auto;
}
.bc-panel-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #BAE6FD;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.bc-upgrades-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Upgrade card */
.bc-upgrade {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.9rem;
  background: rgba(7,89,133,0.25);
  border-radius: 10px;
  border: 1px solid rgba(14,165,233,0.2);
  transition: border-color 0.2s, background 0.2s;
}
.bc-upgrade:hover {
  border-color: rgba(14,165,233,0.55);
  background: rgba(7,89,133,0.4);
}
.bc-upgrade-icon {
  font-size: 1.4rem;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}
.bc-upgrade-info {
  flex: 1;
  min-width: 0;
}
.bc-upgrade-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #e0f2fe;
}
.bc-upgrade-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.bc-upgrade-level {
  font-size: 0.65rem;
  color: #38bdf8;
  margin-top: 0.1rem;
}
.bc-upgrade-buy {
  flex-shrink: 0;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  border: 2px solid #0EA5E9;
  background: #0C4A6E;
  color: #E0F2FE;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.bc-upgrade-buy:hover:not(:disabled) {
  background: #0284C7;
  transform: translateY(-1px);
}
.bc-upgrade-buy.bc-can-buy {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}
.bc-upgrade-buy:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.bc-upgrade-buy:active:not(:disabled) {
  transform: translateY(1px);
}

/* --- Content Layout (sidebar + game) --- */
.bc-content-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}
.bc-game-content {
  flex: 1;
  min-width: 0;
}
.bc-game-content .bc-prestige {
  margin-top: 0;
}

/* Prestige: full width row below sidebar + game */
.bc-prestige-fullrow {
  flex-basis: 100%;
}

/* --- Achievements Sidebar Banner --- */
.bc-achievements-banner {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  border-radius: 16px;
  border: 1px solid rgba(251,191,36,0.2);
  background: rgba(15,23,42,0.88);
  padding: 1.2rem 1rem;
  max-height: 500px;
  overflow-y: auto;
}
.bc-achievements-banner::-webkit-scrollbar { width: 4px; }
.bc-achievements-banner::-webkit-scrollbar-track { background: transparent; }
.bc-achievements-banner::-webkit-scrollbar-thumb { background: rgba(251,191,36,0.2); border-radius: 2px; }
.bc-achievements-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.bc-achievement {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,0.15);
  background: rgba(15,23,42,0.6);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  transition: border-color 0.3s, background 0.3s;
}
.bc-achievement .bc-ach-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  opacity: 0.3;
  transition: opacity 0.3s;
}
.bc-achievement .bc-ach-name {
  color: rgba(148,163,184,0.5);
  transition: color 0.3s;
  line-height: 1.3;
}
.bc-achievement.unlocked {
  border-color: rgba(251,191,36,0.35);
  background: rgba(251,191,36,0.06);
}
.bc-achievement.unlocked .bc-ach-icon {
  opacity: 1;
}
.bc-achievement.unlocked .bc-ach-name {
  color: #fbbf24;
}

@media (max-width: 1000px) {
  .bc-content-layout {
    flex-direction: column;
  }
  .bc-achievements-banner {
    width: 100%;
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  .bc-achievements-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .bc-achievement {
    flex: 0 0 auto;
  }
}

/* --- Prestige --- */
.bc-prestige {
  margin-top: 2rem;
  background: linear-gradient(180deg, rgba(88,28,135,0.12), rgba(15,23,42,0.95));
  border-radius: 16px;
  border: 1px solid rgba(168,85,247,0.3);
  padding: 1.4rem 1.5rem;
  box-shadow: 0 8px 30px rgba(88,28,135,0.12);
}
.bc-prestige-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: end;
}
.bc-prestige-stat {
  background: rgba(88, 28, 135, 0.22);
  border: 1px solid rgba(168,85,247,0.35);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
}
.bc-prestige-label {
  display: block;
  font-size: 0.64rem;
  color: #c4b5fd;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.bc-prestige-value {
  display: block;
  margin-top: 0.2rem;
  color: #f5d0fe;
  font-weight: 800;
  font-size: 1rem;
}
.bc-prestige-reset {
  padding: 0.52rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(217,70,239,0.55);
  background: rgba(147,51,234,0.22);
  color: #f5d0fe;
  font-weight: 700;
  cursor: pointer;
}
.bc-prestige-reset:disabled { opacity: 0.45; cursor: not-allowed; }
.bc-prestige-list {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}
.bc-prestige-item {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
}
.bc-prestige-item-head { display: flex; justify-content: space-between; gap: 0.5rem; }
.bc-prestige-item-name { font-size: 0.78rem; color: #e9d5ff; font-weight: 700; }
.bc-prestige-item-lvl { font-size: 0.68rem; color: #c4b5fd; }
.bc-prestige-item-desc { font-size: 0.68rem; color: #94a3b8; margin-top: 0.25rem; }
.bc-prestige-buy {
  margin-top: 0.45rem;
  width: 100%;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(217,70,239,0.5);
  background: rgba(147,51,234,0.2);
  color: #f5d0fe;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}
.bc-prestige-buy:disabled { opacity: 0.4; cursor: not-allowed; }

/* Toast notification */
.bc-toast {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 2500;
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  background: rgba(15,23,42,0.95);
  border: 1px solid #fbbf24;
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  animation: bc-toast-in 0.3s ease, bc-toast-out 0.3s ease 2.5s forwards;
}
@keyframes bc-toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes bc-toast-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* --- Scrollbar --- */
.bc-upgrades-panel::-webkit-scrollbar {
  width: 6px;
}
.bc-upgrades-panel::-webkit-scrollbar-track {
  background: transparent;
}
.bc-upgrades-panel::-webkit-scrollbar-thumb {
  background: rgba(14,165,233,0.3);
  border-radius: 3px;
}

@media (max-width: 500px) {
  .bc-page { padding: 0.8rem 0.4rem 2rem !important; }
  .bc-header { margin-bottom: 1rem; }
  .bc-subtitle { font-size: 0.82rem; }
  .bc-stats-bar {
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    margin-bottom: 1.2rem;
  }
  .bc-stat { min-width: 60px; }
  .bc-stat-label { font-size: 0.62rem; }
  .bc-stat-value { font-size: 1rem; }
  .bc-block {
    width: 140px;
    height: 161px;
  }
  .bc-block-canvas {
    width: 140px;
    height: 161px;
  }
  .bc-block-name { font-size: 0.85rem; margin-bottom: 0.5rem; }
  .bc-progress-bar { max-width: 250px; height: 22px; }
  .bc-progress-text { font-size: 0.65rem; }
  .bc-click-area { gap: 1rem; }
  .bc-upgrades-panel {
    padding: 0.8rem;
    border-radius: 10px;
    max-height: 350px;
  }
  .bc-panel-title { font-size: 0.8rem; margin-bottom: 0.7rem; }
  .bc-upgrade { padding: 0.5rem 0.6rem; gap: 0.5rem; }
  .bc-upgrade-icon { font-size: 1.1rem; width: 28px; }
  .bc-upgrade-name { font-size: 0.75rem; }
  .bc-upgrade-desc { font-size: 0.62rem; }
  .bc-upgrade-buy { font-size: 0.65rem; padding: 0.3rem 0.5rem; }
  .bc-achievements-banner { padding: 0.8rem 0.6rem; border-radius: 10px; }
  .bc-achievement .bc-ach-icon { font-size: 0.9rem; }
  .bc-achievement .bc-ach-name { font-size: 0.65rem; }
  .bc-prestige { padding: 0.8rem; border-radius: 10px; margin-top: 1.2rem; }
  .bc-prestige-top { grid-template-columns: 1fr; }
  .bc-prestige-list { grid-template-columns: 1fr; }
  .bc-toast { top: 70px; right: 10px; font-size: 0.72rem; padding: 0.5rem 0.8rem; }
}

@media (max-width: 900px) {
  .bc-prestige-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bc-prestige-reset { grid-column: span 2; }
}

.bc-back-btn:focus-visible,
.bc-block:focus-visible,
.bc-upgrade-buy:focus-visible,
.bc-prestige-buy:focus-visible,
.bc-prestige-reset:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}
