
/* === 1) Farb- und Layout-Variablen (Corporate: Schwarz/Gold) ================= */
:root{
  /* Goldtöne (hell -> dunkel) */
  --gold-100:#f6e7b0;   /* sehr helles Gold für Highlights */
  --gold-200:#efd276;
  --gold-300:#e4be4c;   /* UI-Button-Oberseite */
  --gold-400:#d9ac37;   /* Primär-Gold (Überschrift) */
  --gold-500:#c79a2e;   /* UI-Button-Unterseite */
  --gold-600:#a37d23;   /* dunkles Gold für niedrige Tiles */

  /* Graphit/Schwarz (Hintergründe) */
--pc-bg: url('../img/christmasBGs.png') no-repeat center center fixed;

  /* Textfarben passend zu den Hintergründen */
  --text-on-dark:#f7f6f3; /* Text auf dunklem Grund */
  --text-on-gold:#0f1012; /* Text auf goldenen Flächen */

  /* Schatten-Preset für Card-Feeling */
  --shadow: 0 10px 25px rgba(0,0,0,.35);
}

a{ color: var(--gold-300); }
hr{ border-bottom: 1px solid rgba(255,255,255,.08); }

/* === 3) Header + Brand-Logo über der Überschrift ============================= */
.heading{ position: relative; padding-top: 70px; }

h1.title{
  color: var(--gold-400);
  letter-spacing: .5px;
  text-shadow: 0 1px 0 rgba(0,0,0,.6);
  position: relative;
  
}

/* Pseudo-Element als Logo-Container (zentriert über der H1) */
h1.title::before{
  content:"";
  position:absolute;
  left:50%; top:-58px;            /* Höhe des Logos über der Überschrift */
  transform: translateX(-50%);    /* zentrieren */
  width:150px; height:60px;       /* Logo-Größe */
  background: url("../img/Logo/plonerLogo.webp") no-repeat center / contain;
  
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.45));
  opacity:.98;
}

/* === 4) Score-Badges & Button-Abstand ======================================= */
.scores-container{
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.35));
  margin-bottom: 10px;            /* Luft unter den Scores */
}
.score-container, .best-container{
  background: linear-gradient(180deg, var(--graphite-700), var(--graphite-900));
  color: var(--text-on-dark);
  border:1px solid rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.score-container:after, .best-container:after{
  color: rgba(255,255,255,.65);
  letter-spacing:.08em;
}

/* New Game-Button (mehr Abstand, Goldverlauf) */
.above-game .restart-button{
  margin-top: 16px;               /* Abstand zum Score (leicht erhöht) */
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500)) !important;
  color: var(--text-on-gold) !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 22px rgba(211,169,65,.35);
  border:1px solid rgba(0,0,0,.15);
  text-decoration:none !important;
}
.above-game .restart-button:hover{ filter: brightness(1.06); }

/* === 5) Spielfeld-Container & leere Zellen ================================== */
.game-container{
  background: linear-gradient(180deg, var(--graphite-700), var(--graphite-800));
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.06);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.03);
}
.grid-cell{
  background: rgba(255, 214, 109, .12); /* dezentes Gold für leere Slots */
  border-radius: 10px;
}

/* Overlay (Win/Lose) */
.game-container .game-message{
  background: rgba(0,0,0,.45);
  color: var(--text-on-dark);
}
.game-container .game-message a{
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
  color: var(--text-on-gold);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(211,169,65,.35);
}
.game-container .game-message.game-won{
  background: rgba(217,172,55,.22);
  color: var(--text-on-gold);
}

/* === 6) Tiles (Form, Farben je Wert) ======================================== */
.tile, .tile .tile-inner{ border-radius: 10px !important; }

.tile .tile-inner{
  font-weight: 800;
  color: var(--text-on-gold);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

/* Grau/Graphit für 2/4, dann Goldverlauf aufwärts */
.tile.tile-2   .tile-inner{  background: linear-gradient(180deg, #2b2d33, #1f2024); color: var(--text-on-dark); }
.tile.tile-4   .tile-inner{  background: linear-gradient(180deg, #3a3c43, #2a2c31); color: var(--text-on-dark); }
.tile.tile-8   .tile-inner{  background: linear-gradient(180deg, var(--gold-600), var(--gold-500)); }
.tile.tile-16  .tile-inner{  background: linear-gradient(180deg, var(--gold-500), var(--gold-400)); }
.tile.tile-32  .tile-inner{  background: linear-gradient(180deg, var(--gold-400), var(--gold-300)); }
.tile.tile-64  .tile-inner{  background: linear-gradient(180deg, var(--gold-300), var(--gold-200)); }

/* Große Werte: heller + kleinere Font, damit es passt */
.tile.tile-128  .tile-inner{ background: linear-gradient(180deg, #e9c85c, #f0d77f); font-size:45px; }
.tile.tile-256  .tile-inner{ background: linear-gradient(180deg, #f0d77f, #f6e7b0); font-size:45px; }
.tile.tile-512  .tile-inner{ background: linear-gradient(180deg, #f6e7b0, #fff4ce); font-size:45px; }
.tile.tile-1024 .tile-inner{ background: linear-gradient(180deg, #fff0b8, #fff8da); font-size:35px; color:#111; }
.tile.tile-2048 .tile-inner{ background: linear-gradient(180deg, #fff4ce, #ffffff); font-size:35px; color:#111; }
.tile.tile-super .tile-inner{ background: linear-gradient(180deg, #111, #000); color:#ffd95e; }

/* Leichter Goldschein für hohe Tiles */
.tile.tile-128 .tile-inner,
.tile.tile-256 .tile-inner,
.tile.tile-512 .tile-inner,
.tile.tile-1024 .tile-inner,
.tile.tile-2048 .tile-inner{
  box-shadow: 0 0 26px 10px rgba(217,172,55,.25), inset 0 0 0 1px rgba(255,255,255,.30);
}

/* === 7) Merge-Funkeleffekt ============================= */

@keyframes plonerSparkle {
  /* Kürzere Dauer + geringere Opacity für subtilen Effekt */
  0%   { opacity:0;   transform: scale(.85) rotate(0deg); }
  35%  { opacity:.45; transform: scale(1.03) rotate(18deg); }
  65%  { opacity:.25; transform: scale(1.00) rotate(35deg); }
  100% { opacity:0;   transform: scale(1.05) rotate(45deg); }
}
.tile.tile-merged .tile-inner{
  position: relative;
  z-index: 1;
  animation: pulse 90ms ease-out; /* schneller als default */
  /* dezenter Glanz: weniger Radius + Transparenz */
  box-shadow:
    0 0 18px 6px rgba(217,172,55,.22),
    inset 0 0 0 1px rgba(255,255,255,.28);
}
.tile.tile-merged .tile-inner::after{
  content:"";
  position:absolute; inset:-4px;
  pointer-events:none;
  /* zwei weiche Lichtkleckse + dünner konischer „Spark“-Schein */
  background:
    radial-gradient(circle at 28% 32%, rgba(255,240,180,.55), rgba(255,240,180,0) 38%),
    radial-gradient(circle at 72% 68%, rgba(255,220,120,.45), rgba(255,220,120,0) 32%),
    conic-gradient(from 0deg,
      rgba(255,230,150,.45), rgba(255,230,150,0) 22%, transparent 50%,
      rgba(255,230,150,.35) 72%, transparent 100%);
  mix-blend-mode: screen;
  border-radius: inherit;
  animation: plonerSparkle 260ms ease-out forwards; /* schneller & kürzer */
}

/* === 8) Lizenz-/Footertext ======================================== */
.game-explanation,
.game-explanation p,
footer, .footer, .credits, .note{
  font-size: 20px;
  line-height: 1.5;
  opacity:.9;
}

/* === 9) Mobile-Anpassungen =================================================== */
a:hover{ text-decoration: none; }

@media screen and (max-width:520px){
  .heading{ padding-top: 64px; }  /* etwas weniger Platz am Handy */
  h1.title::before{ width:130px; height:52px; top:-52px; }
  .game-container{ border-radius: 12px; }
  .above-game .restart-button{ margin-top: 12px; }
  .game-explanation,
  .game-explanation p{ font-size: 12px; }
}
/* === KILL SWITCH: alle Default-Kachel-Hintergründe neutralisieren ============ */
.tile .tile-inner,
.tile.tile-merged .tile-inner,
.tile.tile-new .tile-inner,
.tile[class*="tile-"] .tile-inner {
  background: none !important;
  box-shadow: none !important;
}

/* === ALWAYS-ON: Farbfläche + PNG-Overlay als EIN Background ================= */
:root { --tile-img: url("../img/Background-2048/TileDesignChristmas.png"); }  /* Pfad anpassen falls nötig */

.tile .tile-inner,
.tile.tile-merged .tile-inner,
.tile.tile-new .tile-inner,
.tile.tile-super .tile-inner,
.tile[class*="tile-"] .tile-inner {
  /* 2 Ebenen: 1) Farbe  2) Dein PNG-Overlay */
  background-image:
    linear-gradient(0deg, var(--tile-color, #2b2d33), var(--tile-color, #2b2d33)),
    var(--tile-img) !important;
  background-size: cover, 105% 105%;
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-blend-mode: normal, overlay;      /* Overlay bringt deine Highlights */
  border-radius: 10px !important;
  display: grid;
  place-items: center;
  isolation: isolate;                           /* sauberes Blending */
}

/* === Farben je Wert (setzt nur --tile-color + Textfarbe) ==================== */
.tile.tile-2    .tile-inner { --tile-color:#2b2d33; color:#f7f6f3; }
.tile.tile-4    .tile-inner { --tile-color:#3a3c43; color:#f7f6f3; }
.tile.tile-8    .tile-inner { --tile-color:#a37d23; color:#0f1012; }
.tile.tile-16   .tile-inner { --tile-color:#c79a2e; color:#0f1012; }
.tile.tile-32   .tile-inner { --tile-color:#d9ac37; color:#0f1012; }
.tile.tile-64   .tile-inner { --tile-color:#e4be4c; color:#0f1012; }

.tile.tile-128  .tile-inner { --tile-color:#e9c85c; color:#111; font-size:45px; }
.tile.tile-256  .tile-inner { --tile-color:#f0d77f; color:#111; font-size:45px; }
.tile.tile-512  .tile-inner { --tile-color:#f6e7b0; color:#111; font-size:45px; }
.tile.tile-1024 .tile-inner { --tile-color:#fff0b8; color:#111; font-size:35px; }
.tile.tile-2048 .tile-inner { --tile-color:#fff8da; color:#111; font-size:35px; }
.tile.tile-super .tile-inner{ --tile-color:#000;    color:#ffd95e; }

/* === Merge-Glanz (bleibt unter der Zahl; Background bleibt erhalten) ======== */
.tile.tile-merged .tile-inner {
  animation: tilePulse 90ms ease-out;
}
@keyframes tilePulse {
  0% { transform: scale(.98); }
  100% { transform: scale(1); }
}

:root{ --tile-img: url("../img/Background-2048/TileDesignChristmas.png"); }

/* 1) Kill alle Default-Hintergründe – egal welcher Zustand/Wert */
.game-container .tile .tile-inner,
.game-container .tile[class*="tile-"] .tile-inner,
.game-container .tile.tile-new .tile-inner,
.game-container .tile.tile-merged .tile-inner,
.game-container .tile.tile-super .tile-inner{
  background: none !important;
  box-shadow: none !important;
}

/* 2) Unser Always-On Design: Farbfläche + PNG-Overlay als ZWEI Backgrounds      */

.game-container .tile .tile-inner{

  background-image:
    linear-gradient(0deg, var(--tile-color, #2b2d33), var(--tile-color, #2b2d33)),
    var(--tile-img) !important;
  background-size: cover, 105% 105% !important;
  background-position: center, center !important;
  background-repeat: no-repeat, no-repeat !important;
  background-blend-mode: normal, overlay !important;

  border-radius: 10px !important;
  display: grid; place-items: center;
  /* Zahlen-Sichtbarkeit erzwingen */
  color: #f7f6f3 !important;             /* Grund-Textfarbe hell */
  text-shadow: 0 1px 0 rgba(0,0,0,.35);   /* Lesbarkeit */
  opacity: 1 !important;
  -webkit-text-fill-color: currentColor;  /* Safari-Fix */
}

/* 3) Werte → Farben (nur --tile-color + ggf. Textfarbe anpassen) */
.game-container .tile.tile-2    .tile-inner { --tile-color:#2b2d33; color:#f7f6f3 !important; }
.game-container .tile.tile-4    .tile-inner { --tile-color:#3a3c43; color:#f7f6f3 !important; }
.game-container .tile.tile-8    .tile-inner { --tile-color:#a37d23; color:#0f1012 !important; }
.game-container .tile.tile-16   .tile-inner { --tile-color:#c79a2e; color:#0f1012 !important; }
.game-container .tile.tile-32   .tile-inner { --tile-color:#d9ac37; color:#0f1012 !important; }
.game-container .tile.tile-64   .tile-inner { --tile-color:#e4be4c; color:#0f1012 !important; }

.game-container .tile.tile-128  .tile-inner { --tile-color:#e9c85c; color:#111 !important; font-size:45px; }
.game-container .tile.tile-256  .tile-inner { --tile-color:#f0d77f; color:#111 !important; font-size:45px; }
.game-container .tile.tile-512  .tile-inner { --tile-color:#f6e7b0; color:#111 !important; font-size:45px; }
.game-container .tile.tile-1024 .tile-inner { --tile-color:#fff0b8; color:#111 !important; font-size:35px; }
.game-container .tile.tile-2048 .tile-inner { --tile-color:#fff8da; color:#111 !important; font-size:35px; }
.game-container .tile.tile-super .tile-inner{ --tile-color:#000;    color:#ffd95e !important; }

/* 4) Merge/Spawn dürfen NIE das Design verlieren */
.game-container .tile.tile-new .tile-inner,
.game-container .tile.tile-merged .tile-inner{
  background-image:
    linear-gradient(0deg, var(--tile-color, #2b2d33), var(--tile-color, #2b2d33)),
    var(--tile-img) !important;
  background-size: cover, 105% 105% !important;
  background-position: center, center !important;
  background-blend-mode: normal, overlay !important;
}

/* 5) Kleine, sichere Animation (ohne Z-Index/Layer-Probleme) */
.game-container .tile.tile-merged .tile-inner{
  animation: tilePulse 90ms ease-out;
}
@keyframes tilePulse{
  0%{ transform: scale(.98); }
  100%{ transform: scale(1); }
}


/* 0) Sicherheitsnetz: nie unsichtbar rendern */
.game-container .tile .tile-inner,
.game-container .tile.tile-new .tile-inner,
.game-container .tile.tile-merged .tile-inner {
  opacity: 1 !important;                 /* verhindert „wegblenden“ */
  -webkit-text-fill-color: currentColor !important; /* Safari-Text-Fix */
}

/* 1) Kill alle Default-Hintergründe in allen Zuständen (auch bei Werten) */
.game-container .tile .tile-inner,
.game-container .tile.tile-new .tile-inner,
.game-container .tile.tile-merged .tile-inner,
.game-container .tile.tile-super .tile-inner,
.game-container .tile[class*="tile-"] .tile-inner {
  background: none !important;
  box-shadow: none !important;
}

/* 2) Basis-Layout für die Kachel: Farbe unten, PNG-Overlay darüber, Zahl oben */
.game-container .tile .tile-inner {
  position: relative;                     /* für ::before */
  display: grid;
  place-items: center;
  border-radius: 12px;
  isolation: isolate;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(0,0,0,.45);
  /* standardmäßig helle Schrift; für dunkle Werte unten überschrieben */
  color: #111;
}

/* 2a) Untergrund-Farbe je Wert (Goldpalette) */
.game-container .tile.tile-2    .tile-inner { background-color: #2b2d33 !important; color:#f7f6f3 !important; }
.game-container .tile.tile-4    .tile-inner { background-color: #3a3c43 !important; color:#f7f6f3 !important; }
.game-container .tile.tile-8    .tile-inner { background-color: #a37d23 !important; color:#f7f6f3 !important; }
.game-container .tile.tile-16   .tile-inner { background-color: #c79a2e !important; color:#f7f6f3 !important; }
.game-container .tile.tile-32   .tile-inner { background-color: #d9ac37 !important; color:#f7f6f3 !important; }
.game-container .tile.tile-64   .tile-inner { background-color: #e4be4c !important; color:#f7f6f3 !important; }

.game-container .tile.tile-128  .tile-inner { background-color: #e9c85c !important; color:#f7f6f3 !important; font-size:45px; }
.game-container .tile.tile-256  .tile-inner { background-color: #f0d77f !important; color:#f7f6f3 !important; font-size:45px; }
.game-container .tile.tile-512  .tile-inner { background-color: #f6e7b0 !important; color:#f7f6f3!important; font-size:45px; }
.game-container .tile.tile-1024 .tile-inner { background-color: #fff0b8 !important; color:#f7f6f3 !important; font-size:35px; }
.game-container .tile.tile-2048 .tile-inner { background-color: #fff8da !important; color:#f7f6f3 !important; font-size:35px; }
.game-container .tile.tile-super .tile-inner{ background-color: #000000 !important; color:#ffd95e !important; }

/* 2b) Dein PNG als dezentes Overlay – immer sichtbar, auch ohne Merge */
.game-container .tile .tile-inner::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: url("../img/Background-2048/TileDesignChristmas.png") center/cover no-repeat;
  opacity: .45;                           /* Stärke des Designs -> ggf. .35/.55 */
  pointer-events: none;
  /* keine blend-modes – reines Overlay mit Transparenz */
  z-index: 0;                             
}

/* 2c) Zahl (Text) liegt natürlicherweise über ::before */
.game-container .tile .tile-inner { z-index: 1; }

/* 3) Auch während Spawn/Merge exakt gleiches Aussehen beibehalten */
.game-container .tile.tile-new .tile-inner::before,
.game-container .tile.tile-merged .tile-inner::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: url("../img/Background-2048/TileDesignChristmas.png") center/cover no-repeat !important;
  opacity: .15;
  pointer-events: none;
}

/* 4) Kleiner, unkritischer Pulse (ändert weder Farbe noch Overlay) */
@keyframes tilePulse { from { transform: scale(.98) } to { transform: scale(1) } }
.game-container .tile.tile-merged .tile-inner { animation: tilePulse 90ms ease-out; }

/* 1) Optional: kräftigere Goldtöne als Fallback-Variablen (falls vorhanden) */
:root{
  --gold-100:#fff3b8;
  --gold-200:#ffe27a;
  --gold-300:#ffcf3d;
  --gold-400:#f0b718;
  --gold-500:#d49b0c;
  --gold-600:#a67708;

  /* Stärke des Merge-Glows konfigurierbar */
  --merge-glow-outer: rgba(240,183,24,.48);
  --merge-glow-ring:  rgba(255,230,150,.95);
}

/* 2) Vibrantere Tile-Farben (ohne Layoutänderung) */
.game-container .tile.tile-2   .tile-inner { background-color:#2b2d33 !important; color:#f7f6f3 !important; }
.game-container .tile.tile-4   .tile-inner { background-color:#3a3c43 !important; color:#f7f6f3 !important; }
.game-container .tile.tile-8   .tile-inner { background-color:#a67708 !important; color:#fffbe7 !important; }
.game-container .tile.tile-16  .tile-inner { background-color:#d49b0c !important; color:#0f1012 !important; }
.game-container .tile.tile-32  .tile-inner { background-color:#f0b718 !important; color:#0f1012 !important; }
.game-container .tile.tile-64  .tile-inner { background-color:#ffcf3d !important; color:#0f1012 !important; }

.game-container .tile.tile-128  .tile-inner { background-color:#ffe27a !important; color:#111 !important; font-size:45px; }
.game-container .tile.tile-256  .tile-inner { background-color:#fff3b8 !important; color:#111 !important; font-size:45px; }
.game-container .tile.tile-512  .tile-inner { background-color:#fff8da !important; color:#111 !important; font-size:45px; }
.game-container .tile.tile-1024 .tile-inner { background-color:#fffcea !important; color:#111 !important; font-size:35px; }
.game-container .tile.tile-2048 .tile-inner { background-color:#ffffff !important; color:#111 !important; font-size:35px; }
.game-container .tile.tile-super .tile-inner{ background-color:#000000 !important; color:#ffd95e !important; }

/* 3) Persistenter Außen-Schein für gemergte Tiles (bleibt bis zum nächsten Move) */
.game-container .tile.tile-merged .tile-inner{
  /* Falls du schon eine Pulse-Animation hast, bleibt sie bestehen */
  position: relative; /* für ::after */
  z-index: 0;         /* unter dem Text, über dem Overlay */
}

.game-container .tile.tile-merged .tile-inner::after{
  content:"";
  position:absolute; inset:-6px; border-radius:inherit;
  pointer-events:none;
  /* Außen-Glow + feiner Goldring */
  box-shadow:
    0 0 22px 12px var(--merge-glow-outer),
    0 0 2px 1px var(--merge-glow-ring) inset;
  filter: blur(.2px);
  opacity:1;               /* KEINE Animation -> bleibt sichtbar */
  z-index: 2;              /* über Tile-Overlay, unter Text */
}

/* 4) Safety: Zahlen immer klar sichtbar (kollidiert mit nichts, nur verstärkend) */
.game-container .tile .tile-inner{
  opacity:1 !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: 0 1px 0 rgba(0,0,0,.45);
}


/* 0) Sättigere CI-Farben + Glow-Intensität (anpassbar) */
:root{
  --ploner-gold-100:#fff3b8;
  --ploner-gold-200:#ffe27a;
  --ploner-gold-300:#ffcf3d;
  --ploner-gold-400:#f0b718;
  --ploner-gold-500:#d49b0c;
  --ploner-gold-600:#a67708;

  --merge-glow-outer: rgba(240, 182, 24, 0.874);
  --merge-glow-ring:  rgba(255, 221, 110, 0.95);
}

/* 1) HARTE Vorrang-Übersteuerung für ALLE Tile-Zustände
      (verhindert, dass spätere/parallel definierte Hintergründe sie abdunkeln) */
.game-container .tile .tile-inner,
.game-container .tile.tile-new .tile-inner,
.game-container .tile.tile-merged .tile-inner,
.game-container .tile.tile-super .tile-inner,
.game-container .tile[class*="tile-"] .tile-inner{
  /* Farbebene + Overlay immer aktiv und obenauf */
  background-image:
    linear-gradient(0deg, var(--ploner-color, #2b2d33), var(--ploner-color, #2b2d33)),
    var(--tile-img) !important;
  background-size: cover, 108% 108% !important;
  background-position: center, center !important;
  background-repeat: no-repeat, no-repeat !important;
  background-blend-mode: normal, overlay !important;

  /* Anti-Fade: keine ungewollten Übergänge/Dimmer */
  transition: none !important;
  opacity: 1 !important;
  filter: saturate(1.10) contrast(1.06) !important;

  /* Zahlen immer crisp */
  -webkit-text-fill-color: currentColor !important;
  text-shadow: 0 1px 0 rgba(0,0,0,.45);
}

/* 2) Vibrante Farbzuteilung (setzt NUR die Variable, alles andere bleibt)
      -> bleibt auch während tile-new / tile-merged identisch */
.game-container .tile.tile-2    .tile-inner { --ploner-color:#2b2d33 !important; color:#f7f6f3 !important; }
.game-container .tile.tile-4    .tile-inner { --ploner-color:#3a3c43 !important; color:#f7f6f3 !important; }
.game-container .tile.tile-8    .tile-inner { --ploner-color:var(--ploner-gold-600) !important; color:#f7f6f3 !important; }
.game-container .tile.tile-16   .tile-inner { --ploner-color:var(--ploner-gold-500) !important; color:#f7f6f3 !important; }
.game-container .tile.tile-32   .tile-inner { --ploner-color:var(--ploner-gold-400) !important; color:#f7f6f3 !important; }
.game-container .tile.tile-64   .tile-inner { --ploner-color:var(--ploner-gold-300) !important; color:#f7f6f3 !important; }

.game-container .tile.tile-128  .tile-inner { --ploner-color:var(--ploner-gold-200) !important; color:#f7f6f3 !important; font-size:45px; }
.game-container .tile.tile-256  .tile-inner { --ploner-color:var(--ploner-gold-100) !important; color:#f7f6f3 !important; font-size:45px; }
.game-container .tile.tile-512  .tile-inner { --ploner-color:#fff8da !important; color:#f7f6f3 !important; font-size:45px; }
.game-container .tile.tile-1024 .tile-inner { --ploner-color:#fffcea !important; color:#f7f6f3 !important; font-size:35px; }
.game-container .tile.tile-2048 .tile-inner { --ploner-color:#ffffff !important; color:#f7f6f3!important; font-size:35px; }
.game-container .tile.tile-super .tile-inner{ --ploner-color:#000000 !important;   color:#ffd95e !important; }

/* 3) Overlay-Stärke festnageln (falls woanders verändert wird) */
.game-container .tile .tile-inner::before{
  content:"";
  position:absolute; inset:0; border-radius:inherit;
  background: var(--tile-img) center/cover no-repeat !important;
  opacity:.42 !important;          /* konstant, nicht wegfaden */
  pointer-events:none; z-index:0;
}

/* 4) Persistenter Merge-Glow (bleibt bis zum nächsten Move/Redraw) */
.game-container .tile.tile-merged .tile-inner{
  position: relative; z-index: 0;
}
.game-container .tile.tile-merged .tile-inner::after{
  content:"";
  position:absolute; inset:-6px; border-radius:inherit;
  pointer-events:none; z-index: 3; /* über dem ::before-Overlay */
  box-shadow:
    0 0 24px 12px var(--merge-glow-outer),
    0 0 2px 1px  var(--merge-glow-ring) inset;
  filter: blur(.2px);
  opacity:1;                       /* kein Ablauf -> bleibt sichtbar */
}

/* 5) Optional: Mini-Boost für High-Value-Tiles (subtiler Bloom, dauerhaft) */
.game-container .tile.tile-128  .tile-inner,
.game-container .tile.tile-256  .tile-inner,
.game-container .tile.tile-512  .tile-inner,
.game-container .tile.tile-1024 .tile-inner,
.game-container .tile.tile-2048 .tile-inner {
  box-shadow:
    0 0 26px 10px rgba(240, 183, 24, .22) !important
    
}
/* Text direkt unter "How to play" (Note + Credits) kleiner & linksbündig */
.container > hr + p,
.container > hr + p + hr + p {
  font-size: 11px;
  line-height: 1.5;
  text-align: left;
  opacity: .85;
}

/* Links darin übernehmen die kleinere Schrift */
.container > hr + p a,
.container > hr + p + hr + p a {
  font-size: inherit;
}
/* === PLONER LOGO: ersetzt 2048-Titel links vom Score ======================= */

/* 1) Doppelte oder pseudo-Logos entfernen */
h1.title::before { content: none !important; }

/* 2) Titel selbst zu Logo-Container machen */
h1.title {
  font-size: 0 !important;        /* blendet "2048" aus */
  line-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: left !important;         /* links vom Score */
  width: 240px !important;        /* Breite an Score angepasst */
  height: 85px !important;        /* gleichmäßig hoch wie Scorebox */
  background-image:
    image-set(url("../img/Logo/plonerLogo.webp") type("image/webp") 1x,
              url("../img/Logo/plonerLogo.png")  type("image/png")  1x);
  background-repeat: no-repeat !important;
  background-size: contain !important;
  background-position: left center !important;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.5));
}

/* 3) Inneres <img>-Logo (falls noch da) ausblenden, um Doppelung zu verhindern */
h1.title .ploner-logo {
  display: none !important;
}

/* 4) Header leicht zentrieren, damit Score optisch ausbalanciert ist */
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
}
/* Schneeflocken Animation - Einfach am Ende deiner style.css einfügen */

.snowflake {
  position: fixed;
  top: -50px;
  z-index: 9999;
  user-select: none;
  pointer-events: none;
  color: #fff;
  font-family: Arial, sans-serif;
  animation: fall linear infinite;
}

@keyframes fall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) translateX(var(--drift)) rotate(360deg);
    opacity: 0.5;
  }
}
/* 20% kleiner*/
.container {
  transform: scale(0.8);
  transform-origin: top center; /* skaliert von oben mittig, damit nix verrutscht */
}