:root {
  --bg: #f6f9fb;
  --panel: #ffffff;
  --accent: #ffdd66;
  --accent-2: #2ec4d6;
  --muted: #2f4254;
  --btn: #ff8a33;
  --btn-dark: #ff6f12;
  --border: #e6eef4;
  --inner-border: #dceaf2;
  --shadow: 0 6px 0 rgba(0, 0, 0, 0.04);
  --clicks-color: #ff5722;
  --record-color: #4caf50;
  --level-color: #2196f3;
  --shop-btn-start: #ff9800;
  --shop-btn-end: #ff6f00;
  --debuff-color: #f44336;
}

/* === MOTYW PRESTIŻU 1 (Chipsy z Colą) - POPRAWIONY CIEMNY MOTYW === */
body.prestige-1 {
  /* Motyw Czerwono-Czarny */
  --bg: #121212; /* Bardzo ciemne tło (prawie czarne) */
  --panel: #242424; /* Ciemniejszy panel bazowy */
  --accent: #f44336; /* Czerwony akcent (jak logo Coli) */
  --accent-2: #ffb300; /* Złoty/Pomarańcz (dla kosztów) */
  --muted: #eeeeee; /* Jasny tekst na ciemnym tle */
  --border: #424242; /* Ciemna ramka */
  --inner-border: #333333; /* Ciemniejsza ramka wewnątrz */
  --clicks-color: #ffb300; /* Pomarańczowy licznik */
  --record-color: #4caf50; /* ZIELONY rekord (na kontrast) */
  --level-color: #2196f3; /* Niebieski poziom */
  --shop-btn-start: #f44336;
  --shop-btn-end: #d32f2f;
  --debuff-color: #4caf50; /* ZIELONY debuff */
}

/* KOREKTY STYLÓW NA CIEMNYM TLE */
body.prestige-1 .panel,
body.prestige-1 .shop,
body.prestige-1 .achievements-wrap,
body.prestige-1 .auth-modal-content,
body.prestige-1 .account-panel,
body.prestige-1 .ranking-wrap {
    background: var(--panel) !important;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.5); /* Ciemniejszy cień */
    border-color: var(--border); /* Użyj zmiennej border */
}

body.prestige-1 .frame,
body.prestige-1 .stat,
body.prestige-1 .shop-item,
body.prestige-1 .shop-item-full,
body.prestige-1 .auth-modal-content {
    background: #2a2a2a; /* Panele wewnętrzne */
    border-color: #424242;
}

body.prestige-1 .auth-form input[type="email"],
body.prestige-1 .auth-form input[type="password"],
body.prestige-1 .auth-form input[type="text"] {
    background: #424242;
    color: var(--muted);
    border-color: #666666;
}
body.prestige-1 .auth-form input::placeholder {
    color: #bdbdbd;
}

body.prestige-1 footer.site-footer {
  background: #212121;
  color: #bdbdbd;
  border-top-color: #666666;
}

body.prestige-1 footer.site-footer a {
    color: #bdbdbd;
}

body.prestige-1 .stat small {
    color: #bdbdbd;
}
/* ======================================= */


html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  font-family: 'Roboto Mono', monospace;
  color: var(--muted);
  -webkit-font-smoothing: antialiased;
  -moz-osx-osx-font-smoothing: grayscale;
  transition: background-color 0.5s ease;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center; 
  gap: 14px;
  padding: 18px;
  box-sizing: border-box;
}

/* Nakładka "Tłuste Palce" */
.smudge-overlay {
  display: none; 
}

/* Styl dla paczki i zmiana kursora podczas debuffu */
@keyframes pulseRedGlow {
  0% {
    filter: contrast(1.02) saturate(1.05) drop-shadow(0 0 4px rgba(244, 67, 54, 0.5));
    transform: scale(0.95);
  }
  50% {
    filter: contrast(1.02) saturate(1.05) drop-shadow(0 0 16px rgba(244, 67, 54, 1)) drop-shadow(0 0 8px rgba(244, 67, 54, 0.7));
    transform: scale(1);
  }
  100% {
    filter: contrast(1.02) saturate(1.05) drop-shadow(0 0 4px rgba(244, 67, 54, 0.5));
    transform: scale(0.95);
  }
}

img.pixel {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  width: 220px;
  height: auto;
  display: block;
  filter: contrast(1.02) saturate(1.05);
  cursor: pointer;
  transition: transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

img.pixel:active {
  transform: scale(0.95);
}

.greasy-fingers-active img.pixel {
  cursor: grab;
  animation: pulseRedGlow 700ms infinite ease-in-out;
}
.greasy-fingers-active img.pixel:active {
  cursor: grabbing;
}


h1 {
  color: var(--accent);
  margin: 6px 0;
  text-align: center;
  font-size: 14px;
  letter-spacing: 1px;
  transition: color 0.5s ease;
}

main {
  width: 100%;
  max-width: 920px;
  display: flex;
  flex-direction: column;
  align-items: center; 
  gap: 12px;
}

/* Panel */
.panel {
  width: 100%;
  max-width: 640px;
  background: linear-gradient(180deg, var(--panel), #f7fbff);
  border: 6px solid var(--border);
  box-shadow: var(--shadow);
  padding: 14px;
  border-radius: 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center; 
  gap: 12px;
  transition: border-color 0.5s ease;
}

.frame {
  padding: 10px;
  background: linear-gradient(180deg, #fbfeff, #f2f8fb);
  border-radius: 6px;
  border: 2px solid var(--inner-border);
  box-shadow: 0 6px 18px rgba(47, 66, 84, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center; 
  gap: 10px;
  width: 100%;
  transition: border-color 0.5s ease;
}

.bag-wrap {
  display: flex;
  flex-direction: column;
  align-items: center; 
  gap: 6px;
  position: relative;
}

.bag-label {
  color: var(--muted);
  font-size: 12px;
  transition: color 0.3s ease;
}

@keyframes pulseRedText {
  0% { color: var(--debuff-color); transform: scale(1); }
  50% { color: var(--muted); transform: scale(0.95); }
  100% { color: var(--debuff-color); transform: scale(1); }
}

.bag-label.debuff-active {
  color: var(--debuff-color);
  font-weight: 700;
  animation: pulseRedText 1s infinite;
}

.score-row {
  display: flex;
  gap: 10px;
  align-items: center; 
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  background: linear-gradient(180deg, #ffffff, #f7fcff);
  border: 3px solid var(--border);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.03);
  padding: 10px 12px;
  min-width: 140px;
  box-sizing: border-box;
  text-align: center;
  border-radius: 6px;
  transition: border-color 0.5s ease;
}

.stat small {
  display: block;
  color: #6a7b86;
  font-size: 10px;
  margin-bottom: 6px;
  font-family: 'Roboto Mono', monospace;
}

.stat .num {
  font-size: 18px;
  display: block;
  line-height: 1;
  font-family: 'Roboto Mono', monospace;
}

#counter .num { color: var(--clicks-color); }
#record .num { color: var(--record-color); }
#level .num { color: var(--level-color); }

/* Styl dla etykiety prestiżu P1, P2... */
#level .prestige-label {
    display: block;
    color: var(--accent);
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    margin-top: 2px;
}

/* W motywie prestiżowym dostosuj kolor */
body.prestige-1 #level .prestige-label {
    color: var(--clicks-color);
}

#resetBtn {
  margin-top: 6px;
  background: linear-gradient(180deg, var(--btn), var(--btn-dark));
  border: 4px solid rgba(0, 0, 0, 0.05);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.06);
  transition: transform 0.08s, background 0.5s ease;
}

#resetBtn:active {
  transform: translateY(4px);
  box-shadow: none;
}

.shop-wrap {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center; 
  gap: 10px;
}

.shop {
  width: 100%;
  background: linear-gradient(180deg, var(--panel), #fbfeff);
  border: 6px solid var(--border);
  padding: 12px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.shop h2 {
  color: var(--accent);
  margin: 0 0 10px 0;
  font-size: 12px;
  text-align: center;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.shop-item, .shop-item-full {
  background: linear-gradient(180deg, #ffffff, #f6fbff);
  border: 3px solid var(--inner-border);
  padding: 8px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center; 
  gap: 8px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.02);
}

.shop-item-full {
  margin-top: 8px;
}

/* Styl dla przycisku Prestiż */
.prestige {
  border-color: var(--accent) !important;
  box-shadow: 0 0 10px rgba(255, 221, 102, 0.7);
}

.shop-info .title {
  color: var(--muted);
  font-size: 10px;
  font-family: 'Roboto Mono', monospace;
}

.shop-info .desc {
  color: #7b8b95;
  font-size: 9px;
  line-height: 1;
  font-family: 'Roboto Mono', monospace;
}

.shop-cost {
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 700;
  font-family: 'Roboto Mono', monospace;
}

.buy-btn {
  background: linear-gradient(180deg, var(--shop-btn-start), var(--shop-btn-end));
  border: 4px solid rgba(0, 0, 0, 0.05);
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 10px;
  cursor: pointer;
  font-family: 'Roboto Mono', monospace;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.06);
  transition: transform 0.1s ease, background 0.2s ease, opacity 0.2s ease;
}

.buy-btn:hover {
  transform: translateY(-2px);
}

.buy-btn:active {
  transform: translateY(4px);
  box-shadow: none;
}

.buy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: translateY(0);
  background: #9e9e9e;
}

/* CSS-pikselowy chips */
.chip-pixel {
  position: fixed;
  pointer-events: none;
  width: 8px;
  height: 6px;
  transform-origin: center;
  image-rendering: pixelated;
  will-change: transform, opacity;
  opacity: 1;
  border-radius: 2px;
  background: #ffd76a;
  box-shadow:
    8px 0 0 #ffd76a, 16px 0 0 #ffd76a, 24px 0 0 #ffd76a,
    0 6px 0 #ffd76a, 8px 6px 0 #ffd76a, 16px 6px 0 #ffd76a, 24px 6px 0 #ffd76a,
    -8px 12px 0 #ffd76a, 0 12px 0 #ffd76a, 8px 12px 0 #ffd76a, 16px 12px 0 #ffd76a, 24px 12px 0 #ffd76a, 32px 12px 0 #ffd76a,
    -8px 18px 0 #ffd76a, 0 18px 0 #ffd76a, 8px 18px 0 #ffd76a, 16px 18px 0 #ffd76a, 24px 18px 0 #ffd76a,
    0 24px 0 #ffd76a, 8px 24px 0 #ffd76a, 16px 24px 0 #ffd76a, 24px 24px 0 #ffd76a;
  transition: transform 350ms cubic-bezier(.2, .75, .3, 1), opacity 900ms linear;
  z-index: 9999;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.06));
}

.chip-pixel::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  width: 24px;
  height: 18px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0) 40%);
  pointer-events: none;
  border-radius: 2px;
}

.chip-pixel.crit {
  background: #ffecb3;
  box-shadow:
    8px 0 0 #fff8e1, 16px 0 0 #ffecb3, 24px 0 0 #fff8e1,
    0 6px 0 #ffecb3, 8px 6px 0 #fff8e1, 16px 6px 0 #ffecb3, 24px 6px 0 #fff8e1,
    -8px 12px 0 #ffecb3, 0 12px 0 #fff8e1, 8px 12px 0 #ffecb3, 16px 12px 0 #fff8e1, 24px 12px 0 #ffecb3, 32px 12px 0 #fff8e1,
    -8px 18px 0 #ffecb3, 0 18px 0 #fff8e1, 8px 18px 0 #ffecb3, 16px 18px 0 #ffecb3, 24px 18px 0 #ffecb3,
    0 24px 0 #ffecb3, 8px 24px 0 #fff8e1, 16px 24px 0 #ffecb3, 24px 24px 0 #fff8e1;
  filter: drop-shadow(0 2px 0 rgba(255, 236, 179, 0.5));
}


@media (max-width:480px) {
  .chip-pixel {
    width: 6px;
    height: 5px;
    box-shadow:
      6px 0 0 #ffd76a, 12px 0 0 #ffd76a, 18px 0 0 #ffd76a,
      0 5px 0 #ffd76a, 6px 5px 0 #ffd76a, 12px 5px 0 #ffd76a, 18px 5px 0 #ffd76a,
      -6px 10px 0 #ffd76a, 0 10px 0 #ffd76a, 6px 10px 0 #ffd76a, 12px 10px 0 #ffd76a, 18px 10px 0 #ffd76a, 24px 10px 0 #ffd76a,
      -6px 15px 0 #ffd76a, 0 15px 0 #ffd76a, 6px 15px 0 #ffd76a, 12px 15px 0 #ffd76a, 18px 15px 0 #ffd76a,
      0 20px 0 #ffd76a, 6px 20px 0 #ffd76a, 12px 20px 0 #ffd76a, 18px 20px 0 #ffd76a;
  }
  
  .chip-pixel.crit {
    box-shadow:
      6px 0 0 #fff8e1, 12px 0 0 #ffecb3, 18px 0 0 #fff8e1,
      0 5px 0 #ffecb3, 6px 5px 0 #fff8e1, 12px 5px 0 #ffecb3, 18px 5px 0 #fff8e1,
      -6px 10px 0 #ffecb3, 0 10px 0 #fff8e1, 6px 10px 0 #ffecb3, 12px 10px 0 #fff8e1, 18px 10px 0 #ffecb3, 24px 10px 0 #fff8e1,
      -6px 15px 0 #ffecb3, 0 15px 0 #fff8e1, 6px 15px 0 #ffecb3, 12px 15px 0 #fff8e1, 18px 15px 0 #ffecb3,
      0 20px 0 #ffecb3, 6px 20px 0 #fff8e1, 12px 20px 0 #ffecb3, 18px 20px 0 #fff8e1;
  }
}

/* Delikatny link resetu rekordu w stopce */
.reset-record {
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  color: rgba(93, 110, 122, 0.12);
  text-decoration: underline;
  cursor: pointer;
  margin-left: 8px;
}

.reset-record:hover {
  color: rgba(93, 110, 122, 0.28);
}

/* Footer */
footer.site-footer {
  width: 100%;
  max-width: 920px;
  margin-top: auto;
  padding: 8px 12px;
  background: linear-gradient(180deg, var(--panel), #f0f6fb);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  border-radius: 6px;
  display: flex;
  align-items: center; 
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

@keyframes pixelPulse {
  0% { transform: scale(1) }
  50% { transform: scale(1.12) }
  100% { transform: scale(1) }
}

.pulse {
  animation: pixelPulse 220ms steps(1) both;
}

/* Ikony audio (przeniesione do panelu konta) */
.audio-btn .icon {
  display: none;
}
#playPauseBtn.playing .icon-pause {
  display: block;
}
#playPauseBtn:not(.playing) .icon-play {
  display: block;
}
#muteBtn.muted .icon-muted {
  display: block;
}
#muteBtn:not(.muted) .icon-unmuted {
  display: block;
}

/* Style dla linku Facebook w stopce */
.fb-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  color: #3b5998;
  text-decoration: underline;
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
}
.fb-link:hover {
  color: #2d4373;
}
.fb-link .fb-icon {
  position: relative;
  top: -1px;
}

/* --- Style Osiągnięć --- */
.achievements-wrap {
  width: 100%;
  max-width: 640px;
  background: linear-gradient(180deg, var(--panel), #fbfeff);
  border: 6px solid var(--border);
  padding: 12px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-top: 12px;
  box-sizing: border-box;
}

.achievements-wrap h2 {
  color: var(--accent);
  margin: 0 0 10px 0;
  font-size: 12px;
  text-align: center;
}

#achievements-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.ach-box {
  width: 36px;
  height: 36px;
  background: linear-gradient(180deg, #ffffff, #f6fbff);
  border: 2px solid var(--inner-border);
  border-radius: 4px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: help;
  transition: all 0.3s ease;
}

.ach-box.locked {
  filter: grayscale(100%);
  opacity: 0.5;
  background: #e0e8ef;
}

.ach-box.unlocked {
  filter: none;
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 7px rgba(255, 221, 102, 0.7);
}

/* --- Style Rankingu --- */
.ranking-wrap {
    width: 100%;
    max-width: 640px;
    background: linear-gradient(180deg, var(--panel), #fbfeff);
    border: 6px solid var(--border);
    padding: 12px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: 12px;
    box-sizing: border-box;
}

.ranking-wrap h2 {
    color: var(--record-color);
    margin: 0 0 10px 0;
    font-size: 12px;
    text-align: center;
    border-bottom: 1px solid var(--inner-border);
    padding-bottom: 8px;
}

.ranking-list {
    list-style-type: none; /* USUŃ DOMYŚLNE KROPKI/NUMERY */
    padding: 0;
    margin: 0;
    font-size: 13px;
    font-family: 'Roboto Mono', monospace;
}

.rank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px dashed var(--inner-border);
}

.rank-item:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.rank-number {
    font-weight: 700;
    width: 25px; /* Stała szerokość dla numeru */
    text-align: left;
    color: var(--muted);
}

.rank-medal {
    font-size: 16px;
    width: 25px;
    text-align: left;
    display: none; /* Domyślnie ukryty, pokazywany przez JS dla TOP 3 */
}

/* Styl dla TOP 3 */
.rank-1 .rank-number, .rank-2 .rank-number, .rank-3 .rank-number {
    display: none;
}
.rank-1 .rank-medal, .rank-2 .rank-medal, .rank-3 .rank-medal {
    display: block;
}

.rank-login {
    flex-grow: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
    font-weight: 700;
}

.rank-record {
    font-weight: 700;
    color: var(--clicks-color);
    flex-shrink: 0;
}

.ranking-toggle-btn {
    text-align: center;
    padding: 8px 0 0 0;
}
.ranking-toggle-btn button {
    background: var(--border);
    border: 1px solid var(--inner-border);
    color: var(--muted);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
}
.ranking-toggle-btn button:hover {
    background: var(--inner-border);
}
/* --- Koniec Stylu Rankingu --- */


/* --- Style Powiadomień (Toast) --- */
#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.toast {
  pointer-events: auto;
  background: linear-gradient(180deg, var(--muted), #253646);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0,0,0,0.1);
  border: 2px solid var(--accent);
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  animation: slideInAndOut 3s ease-in-out forwards;
}

@keyframes slideInAndOut {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  15% {
    opacity: 1;
    transform: translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* --- Style Modala Logowania/Rejestracji --- */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  backdrop-filter: blur(4px);
}

.auth-modal-content {
  background: var(--panel);
  border: 6px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px 24px 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  font-family: 'Roboto Mono', monospace;
}

.auth-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 28px;
  color: #aaa;
  cursor: pointer;
}
.auth-modal-close:hover {
  color: #333;
}

.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.auth-tab {
  flex-grow: 1;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 0;
  font-size: 14px;
  font-family: 'Roboto Mono', monospace;
  color: #888;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  color: var(--muted);
  font-weight: 700;
  border-bottom-color: var(--btn);
}

.auth-form h2 {
  font-size: 16px;
  text-align: center;
  color: var(--muted);
  margin: 0 0 5px 0;
}

.auth-form p {
  font-size: 11px;
  color: #6b7981;
  text-align: center;
  margin: 0 0 15px 0;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  font-family: 'Roboto Mono', monospace;
  border: 2px solid var(--inner-border);
  border-radius: 6px;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--accent-2);
}

.auth-submit-btn {
  width: 100%;
  background: linear-gradient(180deg, var(--btn), var(--btn-dark));
  border: 4px solid rgba(0, 0, 0, 0.05);
  color: #fff;
  padding: 10px 0;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Roboto Mono', monospace;
  font-size: 14px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.06);
  transition: transform 0.08s;
  margin-top: 10px;
}
.auth-submit-btn:active {
  transform: translateY(4px);
  box-shadow: none;
}

.auth-error {
  color: var(--debuff-color);
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.2);
  font-size: 11px;
  padding: 8px;
  border-radius: 4px;
  margin-bottom: 10px;
  text-align: center;
  display: none;
}

/* --- Style Panelu Konta (Logika Mobile-First) --- */

/* 1. Style BAZOWE (Mobilne) - Panel jest zwinięty */
.account-panel {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 8000;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: width 0.3s ease, height 0.3s ease, background 0.3s ease;
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
  color: var(--muted);
  font-size: 11px;
}

/* Hamburger jest domyślnie WIDOCZNY */
.account-toggle {
  display: block;
}

/* Treść jest domyślnie UKRYTA */
#account-content-wrapper {
  display: none;
}

/* Stan "OTWARTY" na mobilce (po kliknięciu) */
.account-panel.open {
  width: auto;
  height: auto;
  padding: 8px 12px;
  align-items: stretch;
  justify-content: flex-start;
  flex-direction: column;
  gap: 8px;
}

.account-panel.open .account-toggle {
  display: none;
}

.account-panel.open #account-content-wrapper {
  display: block;
}

/* 2. Style dla DESKTOPA (ekrany WIĘKSZE niż 640px) */
@media (min-width: 641px) {
  
  .account-panel,
  .account-panel.open { 
    width: auto;
    height: auto;
    padding: 8px 12px;
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
    gap: 8px;
    display: flex !important; 
  }

  .account-toggle,
  .account-panel.open .account-toggle {
    display: none !important;
  }
  
  #account-content-wrapper,
  .account-panel.open #account-content-wrapper {
    display: block !important;
  }
}

/* --- Reszta stylów panelu --- */
.account-view-flex {
    display: flex;
    flex-direction: column;
    gap: 8px; 
    align-items: center;
}

.account-view-flex span {
    font-weight: 700;
    text-align: center;
    word-break: break-all;
}

#user-view strong {
  color: var(--level-color);
}

.auth-icon-btn {
  background: #e0e8ef;
  border: 2px solid var(--inner-border);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}
.auth-icon-btn:hover {
  background: #d1dde8;
  color: #000;
}
.auth-icon-btn svg {
    display: block; 
}

.guest-tooltip {
  cursor: help;
  border-bottom: 1px dotted var(--muted);
}

/* Style kontrolek audio (wewnątrz panelu) */
.audio-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  border-top: 1px solid var(--inner-border);
  padding-top: 8px;
  margin-top: 4px;
}

.audio-btn {
  background: #e0e8ef;
  border: 2px solid var(--inner-border);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}
.audio-btn:hover {
  background: #d1dde8;
  color: #000;
}

/* --- Style Banera Cookies --- */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(47, 66, 84, 0.95);
    color: #fff;
    padding: 12px 18px;
    box-sizing: border-box;
    z-index: 7000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}

#cookie-banner button {
    background: var(--accent);
    color: var(--muted);
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.1s;
    flex-shrink: 0;
}

#cookie-banner button:hover {
    background: var(--btn);
    color: #fff;
}