/* ============================================================================
   2048.css — Game-specific styling for the VHC GameZone embed
   Used by: games/2048.php
   ============================================================================ */

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700;
  src: url('nunito-v32-latin/nunito-v32-latin-700.woff2') format('woff2');
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 40px;
}

/* 500x500 Spielbereich */
.game {
  position: relative;
  width: 500px;
  height: 500px;
  background: url('../game-images/2048/bg-2048.jpg') center/cover no-repeat;
  border-radius: 10px 10px 0 0;
  border: 1px solid rgba(80,60,200,0.55);
  box-shadow: 0 0 28px rgba(60,40,180,0.35), 0 0 6px rgba(0,180,255,0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 10px;
}

/* Score + Timer oben */
.score-bar { display: flex; gap: 8px; z-index: 1; }
.score-box {
  background: rgba(10,4,24,0.55);
  border: 1px solid rgba(140,80,255,0.25);
  border-radius: 7px;
  padding: 3px 12px;
  text-align: center;
  min-width: 80px;
}
.score-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  font-weight: 700;
}
.score-value {
  font-family: 'Nunito', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

/* Board */
.board {
  width: 420px;
  height: 420px;
  background: rgba(8,4,20,0.45);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 9px;
  padding: 9px;
}
.board.select-mode { cursor: pointer; }

/* Kacheln */
.cell {
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 28px;
  transition: transform 0.1s;
}
.cell.selected { transform: scale(0.9); outline: 2px solid rgba(255,255,255,0.8); }
.c0    { background: rgba(255,255,255,0.08); }
.c2    { background: #2a1645; color: #d8a4ff; border: 1px solid rgba(180,100,255,0.4); }
.c4    { background: #32195a; color: #bf86ff; border: 1px solid rgba(160,80,255,0.45); }
.c8    { background: #0e2550; color: #7ec8ff; border: 1px solid rgba(50,130,255,0.4); }
.c16   { background: #0d2e55; color: #4dd8ff; border: 1px solid rgba(10,160,220,0.45); }
.c32   { background: #0b3535; color: #3df0d8; border: 1px solid rgba(20,180,160,0.45); }
.c64   { background: #0b3520; color: #5dff90; border: 1px solid rgba(30,180,80,0.45); }
.c128  { background: #382200; color: #ffd060; border: 1px solid rgba(230,140,0,0.45); font-size: 22px; }
.c256  { background: #381500; color: #ffaa50; border: 1px solid rgba(240,100,10,0.45); font-size: 22px; }
.c512  { background: #380d0d; color: #ff8080; border: 1px solid rgba(240,40,40,0.45); font-size: 22px; }
.c1024 { background: #280035; color: #f090ff; border: 1px solid rgba(210,60,255,0.45); font-size: 18px; }
.c2048 { background: #38002e; color: #ffb8f8; border: 1px solid rgba(220,60,220,0.55); font-size: 18px; box-shadow: 0 0 20px rgba(240,160,255,0.3); }

/* Modus-Banner */
.mode-banner {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(80,20,160,0.88);
  border: 1px solid rgba(180,120,255,0.5);
  border-radius: 6px;
  padding: 5px 18px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  display: none;
  z-index: 5;
}
.mode-banner.show { display: block; }

/* Start-Overlay Inhalt */
.ov-icon { margin-bottom: 14px; }
.ov-icon img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(0,200,255,0.5));
}
.ov-gametitle {
  font-family: 'Nunito', sans-serif;
  font-size: 46px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  margin-bottom: 4px;
  text-shadow: 0 0 30px rgba(140,80,255,0.6);
}
.ov-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.btn-start {
  padding: 12px 48px;
  background: rgba(80,40,200,0.35);
  border: 1px solid rgba(140,100,255,0.6);
  border-radius: 8px;
  color: #d0b0ff;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.btn-start:hover {
  background: rgba(100,50,220,0.55);
  box-shadow: 0 0 16px rgba(140,80,255,0.4);
}
.ov-hint {
  margin-top: 18px;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 1px;
}

/* Win / Game Over Overlay */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(6,2,14,0.88);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 10;
}
.overlay.show { display: flex; }
.overlay-title { font-family: 'Nunito', sans-serif; font-size: 42px; font-weight: 700; color: #fff; }
.overlay-sub   { font-size: 15px; color: rgba(255,255,255,0.5); font-weight: 600; }
.btn-retry {
  margin-top: 8px;
  padding: 11px 40px;
  background: rgba(124,58,237,0.3);
  border: 1px solid rgba(160,90,255,0.55);
  border-radius: 8px;
  color: #d0a0ff;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-retry:hover { background: rgba(124,58,237,0.5); }
.btn-retry-cancel {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.55);
}
.btn-retry-cancel:hover { background: rgba(255,255,255,0.12); }

/* Action-Bar */
.action-bar {
  width: 500px;
  background: #0d051e;
  border-left: 1px solid rgba(140,80,255,0.15);
  border-right: 1px solid rgba(140,80,255,0.15);
  border-bottom: 1px solid rgba(140,80,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px;
}
.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(100,200,255,0.25);
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: background 0.15s;
  width: 118px;
  height: 48px;
  padding: 0;
}
.action-btn.btn-v { flex-direction: column; gap: 2px; }
.action-btn.btn-h { flex-direction: row; gap: 8px; padding: 0 10px; justify-content: center; }
.btn-icon { display: flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1; color: #7dd3fc; }
.btn-h-left { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.btn-h-right { font-size: 15px; font-weight: 700; color: #7dd3fc; text-align: center; line-height: 1.1; }
.btn-h-right small { display: block; font-size: 8px; font-weight: 700; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 1px; }
.action-btn[disabled] { opacity: 0.38; cursor: default; }
.btn-label { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.75); letter-spacing: 1.5px; text-transform: uppercase; }
.action-sep { width: 1px; height: 36px; background: rgba(100,200,255,0.15); margin: 0 6px; }
.btn-cyan  { border-color: rgba(56,189,248,0.35); }
.btn-cyan:hover:not([disabled])  { background: rgba(56,189,248,0.12); }
.btn-green { border-color: rgba(74,222,128,0.35); }
.btn-green:hover:not([disabled]) { background: rgba(74,222,128,0.12); }
.btn-red   { border-color: rgba(248,113,113,0.35); }
.btn-red:hover:not([disabled])   { background: rgba(248,113,113,0.12); }

/* Hints-Bar */
.hints-bar {
  width: 500px;
  background: #0d051e;
  border: 1px solid rgba(140,80,255,0.15);
  border-top: none;
  border-radius: 0 0 10px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 7px 16px;
}
.key {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(140,80,255,0.2);
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
}
.hint-sep { font-size: 11px; color: rgba(255,255,255,0.45); font-weight: 600; }

/* Confirm-Overlay Abbrechen-Variante */
.btn-confirm-no {
  background: rgba(60,60,60,0.3);
  border-color: rgba(200,200,200,0.3);
  color: rgba(255,255,255,0.55);
}
.btn-confirm-no:hover { background: rgba(80,80,80,0.4); }
