/*смена полоски прокрутки для хрома*/

:root {
  --reflash: #26a826;
  --coin: #ffd900;
  --crystal: aqua;
  --supercrystal: rgb(0, 180, 212);
  --fortune: hotpink;
  --balance: white;
  --neutral: rgb(190, 190, 190);
  --grey-text: #656565;
  --shard: rgb(138, 255, 249);
  --supercoin: rgb(235, 161, 2);
  --spirit: rgb(202, 255, 237);
  --critical: rgb(255, 0, 0);
  --rune: rgb(45, 202, 210);

  --coin-upgrade: #d1d411;
  --prestige-upgrade: rgb(0, 212, 212);
  --break-prestige-upgrade: rgb(18, 179, 179);

  --umultiplier: cadetblue;
  --upower: palevioletred;
  --uadder: rgb(145, 248, 93);
  --ureducer: rgb(255, 255, 94);

  --settings: rgb(80, 82, 255);

  --treasure: rgb(255, 215, 130);
}

button span {
    pointer-events: none;
}

.text-hidden-mode * {
    color: transparent !important;
    text-shadow: none;
    user-select: none !important; /* Полностью запрещает выделение */
    -webkit-user-select: none !important; /* Для поддержки Safari и iOS */
}

html::-webkit-scrollbar, #versionDiv::-webkit-scrollbar, #helpDiv::-webkit-scrollbar {
  width:8px;
}
html::-webkit-scrollbar-track {
  background-color: #060606;
}
#versionDiv::-webkit-scrollbar-track, #helpDiv::-webkit-scrollbar-track {
  background-color: black;
}

html::-webkit-scrollbar-thumb, #versionDiv::-webkit-scrollbar-thumb, #helpDiv::-webkit-scrollbar-thumb{
  background-color: #3a3a3a;
  border-radius: 5px;
}
html, #versionDiv, #helpDiv {
  overflow-x:hidden;
}
/*смена полоски прокрутки для огнелиса*/
html {
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a  #060606;
  overflow-y: hidden;
}

#versionDiv {
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a  #000000;
}

#helpDiv {
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a  #000000;
}

.mainSettings {
  position: absolute;
  left: 0;
  display: flex;
}

hr {
  color:white;
}

#maxOrNoUpgrades, #modernizeButton, #maxOrNoShardUpgrades, #maxOrNoBreakPrestigeUpgrades, #maxOrNoBalanceUpgrades {
  background-color: #060606;
  border:#ffffff solid 1.6px;
  color: white;
  max-width: 50px;
  max-height: 50px;
  width: 5vw;
  height: 5vw;
  background-size: cover;
  font-size: calc(12px * var(--font-scale));
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
  cursor: pointer;
}

#maxOrNoUpgrades:hover, #maxOrNoShardUpgrades:hover, #maxOrNoBreakPrestigeUpgrades:hover, #maxOrNoBalanceUpgrades:hover {
  background-color: #494949;
}

#modernizeButton {
  background-image: url('./images/items/modernize.webp');
  background-repeat: no-repeat;
  background-position: center;
}

#coinsCount, #fortuneTokensCount, #fortuneTokensCount2, .currencyCount, #fortuneTokensCount3 {
    color: white;
    margin: 5px;
    margin-top: 15px;
    white-space: nowrap;
    margin-bottom: 15px;
    font-size: calc(18px * var(--font-scale));
}

gt {
  color: var(--coin);
  text-shadow: 0 0 5px var(--coin);
  font-size: calc(30px * var(--font-scale));
}

#ft_tokens_val, #bal_ft_tokens, pt {
  color: var(--fortune);
  text-shadow: 0 0 5px var(--fortune);;
  font-size: calc(30px * var(--font-scale));
}

bt {
  color: var(--balance);
  text-shadow: 0 0 5px var(--balance);
  font-size: calc(30px * var(--font-scale));
}

nt {
  color: var(--neutral);
  text-shadow: 0 0 5px var(--neutral);
  font-size: calc(30px * var(--font-scale));
}


#coinsGain, #supercoinsGain {
    color: var(--grey-text);
    font-size: calc(15px * var(--font-scale));
    text-align: center;
    margin: 5px;
    white-space: nowrap;
    display: flex;
    justify-content: center;
    
}
#coinGain {
    background-color: #ff000000;
    border: none;
    color: rgba(255, 0, 0, 0);
    display: block;
    width: 250px;
    height: 250px;
    background-image: url("./images/misc/CoinOff.png");
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
    border-radius: 200px;
    transition: transform 0.25s ease-in-out, filter 0.4s ease-in-out, background-image 0.2s ease-in-out;
}

#coinGain:active, #shardsClick:active {
    transform: scale(0.95); 
}

#coinGain:hover {
    background-image: url("./images/misc/CoinOn.png");
}

.notification {
    background-color: rgb(55, 244, 55);
    color: black;
    margin-top: 30px;
    width: 300px;
    height: 50px;
    position: fixed;
    top: 0;
    right: -500px;
    transform: translate(0, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: calc(15px * var(--font-scale));
    font-weight: bold;
    color: rgb(2, 0, 0);
    opacity: 0;
    z-index: 9999;
    transition: right 2s, opacity 2s;
  }
  
  .notification.hide {
    right: 5px; /* смещаем уведомление вправо за экран для скрытия */
    transition: right 0.25s;
  }

  .notification.show {
    right: 0;
    opacity: 1;
    transition: right 1s, opacity 0.75s;
  }
  
  #topValues {
    max-height: 150px;
    height: 25vw;
    justify-content: space-between;
    margin-bottom: 10px;
    display: flex;
  }

.topVars {
  width: 33%;
}

#coinGet {
  text-align: center;
  display:flex;
  flex-direction: column;
}

#getCoinLine {
  height: 270px;
  justify-content: space-around;
  margin-bottom: 10px;
  display: flex;
  margin: 0 auto;
  align-items: center;
}

.myMessage, .shardCountPerClick, .superCoinText, .spiritText, .criticalClick {
  position: absolute; 
  display: flex; 
  padding: 5px;
  text-shadow: 1px 1px var(--coin), -1px -1px var(--coin), 1px -1px var(--coin), -1px 1px var(--coin);
  font-weight:900;
  color: rgb(0, 0, 0);
  cursor:default;
  transition: top 1s ease-in-out, opacity 1s ease-in-out, transform 1s ease-in-out;
  pointer-events: none; /* текст сообщения не мешает кликать по кнопке */
  user-select: none;
}

.shardCountPerClick {
  text-shadow: 1px 1px var(--shard), -1px -1px var(--shard), 1px -1px var(--shard), -1px 1px var(--shard);
}
.superCoinText {
  text-shadow: 1px 1px var(--supercoin), -1px -1px var(--supercoin), 1px -1px var(--supercoin), -1px 1px var(--supercoin);
  z-index: 100000;
}
.spiritText {
  text-shadow: 1px 1px var(--spirit), -1px -1px var(--spirit), 1px -1px var(--spirit), -1px 1px var(--spirit);
}
.criticalClick {
  text-shadow: 1px 1px var(--critical), -1px -1px var(--critical), 1px -1px var(--critical), -1px 1px var(--critical);
  z-index: 99999;
}

.myMessage.hide, .shardCountPerClick.hide, .superCoinText.hide, .spiritText.hide, .criticalClick.hide {
  opacity: 0;
  transform: translateY(-50px);
}

.myMessage.show, .shardCountPerClick.show, .superCoinText.show, .spiritText.show, .criticalClick.show {
  right: 0;
  opacity: 1;
  transition: top 1s ease-in-out, opacity 1s ease-in-out;
  display: block;
}

.confirmationWindow {
  display: none;
  width: 400px;
}
#windowTitleDiv {
  width: 100%;
  margin-top: 50px;
}

#resetTitle {
  font-size: calc(22px * var(--font-scale));
}

#confirmationButtons {
  align-items: center;
  display: flex;
  justify-content: center;
  height: 50%;
}

#multipliersTab{
    justify-content: center;
    flex-wrap: wrap;
}

#multiplierChoose {
    width: 100px;
    height: 500px;
    border-color: white;
    border-width: 1px;
    border-style: solid;
    border-radius: 5px 0px 0px 5px;
    overflow: hidden;
}

.multiplierChooser {
  width: 100%;
  font-size: calc(11px * var(--font-scale));
  height: 36px;
}

#multiplierStats {
    width: 500px;
    height: 500px;
    border: white 1px solid;
    border-radius: 0px 0px 0px 0px;
    position: relative;
}

#multBreakdownTitle {
  text-align: center;
  font-size: calc(20px * var(--font-scale));
  font-weight: bold;
  margin: 10px;
  color: white;
}

#infoTab .whiteText {
  font-size: calc(14px * var(--font-scale));
}

.multiplierString {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.gainGraphic{
  border: white 1px solid;
  width: 50px;
  border-width: 1px 1px 1px 0px;
  border-radius: 0px 5px 5px 0px;
  overflow: hidden;
}

.graphicPiece {
  border: white 1px solid;
  border-width: 0px 0px 1px 0px;
  width: 100%;
  display:flex;
  justify-content: center;
  align-items: center;
}

.pieceText {
  font-size: calc(16px * var(--font-scale));
}

.footer {
  font-weight: bold;
  position: absolute;
  bottom: 2%;
  display: flex;
  justify-content: space-between;
  width: 97%;
}

.statsDiv {
  height: 83%;
  overflow: auto;
}

.progress-bar-base{
  width:100%;
  height:20px;
  background-color: gray;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50%;
  font-size: calc(12px * var(--font-scale));
  background-image: radial-gradient(#15fa01, #040000 170%);
}
#progress-bar-text {
  font-size: calc(16px * var(--font-scale));
  position: absolute;
  width: 100%;
  top: 0;
  display: flex;
  justify-content: center;
}

#wholeShopDiv {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#shopCharacterDiv, #mrSuperChar {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  max-width: 824px;
  aspect-ratio: 2 / 1; 
  
  background-image: url('./images/misc/MrSuper.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center bottom; 
  
  image-rendering: pixelated;
}

#mrSuperChar {
  background: url('./images/misc/MrSuperChar.png') no-repeat;
  background-size: contain;
  position: relative;
  z-index: 10001;
}

#shopDiv {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  max-width:800px;
  width: 90vw;
  border: solid white;
  border-width: 0 6px 6px 6px;
  background-color: black;
}

#supershopTitle {
  width: 100%;
  height: 40px;
  text-align: center;
  border: solid white;
  border-width: 0px 0px 2px 0px;
  border-radius: 0px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

#supershopButtons {
  width: 100%;
  height: 40px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: solid white;
  border-width: 0px 0px 2px 0px;
  border-radius: 0px;
  border-bottom: 0px;
}

#supershopButtons button {
  height: 30px;
  margin: 0;
}

#bulkBuyDiv {
  position: absolute;
  right: 2.5px;
  top: 2.5px;
}

#bulkBuyDiv button {
  height: 35px;
  width: 35px;
}

#respecShop {
  position: absolute;
  height: 35px;
  left: 2.5px;
  top: 2.5px;
}

#supershopItems {
  width: 100%;
  border: solid white;
  border-width: 0px 0px 2px 0px;
  position: relative;
}

.shopShelf, .shopShelfRow {
  height: 150px;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-evenly
}

.shopContainer {
  display: flex;
  flex-direction: column;
  font-size: calc(14px * var(--font-scale));
  color: white;
  text-align: center;
  justify-content: flex-start;
  max-width: 100px;
  max-height: 175px;
  width: 15%;
  height: 100%;
}

.shopButton {
  color: var(--supercoin);
  border: var(--supercoin) 1px solid;
  border-radius: 3px;
  background-repeat: no-repeat;
  background-size: cover;
  image-rendering: pixelated;
  aspect-ratio: 1 / 1;
  width: 100%;
  background-color: #000000;
}

.shopButton:disabled {
  background-color: #060606;
  color:#ffffff;
  border-color: #fbfbfb;
  box-shadow: 0 0 0;
  cursor:not-allowed;
}

#shopDiv .tooltip {
  font-size: calc(15px * var(--font-scale));
  padding: 10px;
  max-width: 230px;
}

.useButton {
  margin-top: 5px;
  font-size: calc(14px * var(--font-scale));
  border: var(--supercoin) 1px solid;
  background-color: #060606;
  height: 25px;
  width: 100%;
  border-radius: 0;
  color: white
}

.shopItemButton {
  margin-bottom: 0;
  border-radius: 3px 3px 0 0
}

#superCount {
  text-align: center;
  color: white;
  margin: 5px;
  margin-top: 15px;
  width:100%;
  font-size: calc(17px * var(--font-scale));
}

.useButton:hover {
  background-color:var(--supercoin);
  color: black
}

.mineralButton {
  background-color: #060606;
  color: var(--supercoin);
  border: var(--supercoin) 1px solid;
  border-radius: 3px;
  width: 48px;
  height: 48px;
  box-shadow: 0 0 1px var(--supercoin);
  cursor: pointer;
  font-size: calc(11px * var(--font-scale));
  margin: 5px;
}

st {
  font-size: calc(30px * var(--font-scale));
  color:var(--supercoin);
  text-shadow: 0 0 5px var(--supercoin);
}
#overdriveTab {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}
.overdriveType {
  max-width: 800px;
  max-height: 120px;
  width: 50vw;
  height: 15vw;
  border: white 1px solid;
  margin: 20px;
}
.overdriveTypeTitle {
  display: flex;
  justify-content: center;
  border-bottom: white 1px solid;
  height:15%;
}
.overdriveTypeName {
  margin: 0 auto;
}
.overdriveTypeDiv{
  height:85%;
}
.overdriveTypeProgressBarBase{
  background-color: #111111;
  height: 99%;
  display: flex;
  align-items: center;
  text-align: center;
  cursor:pointer;
    
}
#overdriveType1ProgressBar{
  height: 100%;
  background-image:radial-gradient( var(--coin), black 210%);
}
#overdriveType2ProgressBar{
  height: 100%;
  background-image:radial-gradient( var(--crystal), black 210%);
}
#overdriveType3ProgressBar{
  height: 100%;
  background-image:radial-gradient( var(--supercoin), black 210%);
}
.overdriveTypeGhost {
  position: absolute;
  color: white;
  pointer-events: none;
  cursor: default;
  display: flex;
  max-width: 800px;
  width: 50vw;
  justify-content: center;
  z-index: 1000;
  font-size: calc(16px * var(--font-scale));
}

#progressBarGain, #progressBarGain2, #progressBarGain3 {
  font-size: calc(18px * var(--font-scale));
}

.overdriveTypeProgressBarActive {
  position: absolute;
  background-color: #FFFFFF77;
  pointer-events: none;
  cursor: default;
  display: flex;
  max-width: 800px;
  justify-content: center;
  z-index: 2000;
  max-height: 101px;
  height: 12.75vw;
  transition: opacity 0.25s ease-in-out;
  opacity: 0;
}

#crystalCount, #bitsCount {
  text-align: center;
  color: white;
  margin: 0 auto;
  font-size: calc(15px * var(--font-scale));
}

ct {
  color:var(--crystal);
  font-size: calc(25px * var(--font-scale));
  text-shadow: 0 0 5px var(--crystal);
}

rt {
  color:var(--reflash);
  font-size: calc(25px * var(--font-scale));
  text-shadow: 0 0 5px var(--reflash);
}

#doPrestige, #doReflash {
  border-style: solid;
  border-radius: 5px;
  background-color: black;
  color: var(--crystal);
  font-size: calc(13px * var(--font-scale));
  max-width: 250px;
  max-height: 90px;
  width: 25vw;
  height: 5vw;
  text-align: center;
  transition:  0.2s ease-in-out;
  cursor: pointer;
  border-color:var(--crystal);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

#doReflash, .reflashButton {
  color: var(--reflash) !important;
  border-color: var(--reflash) !important;
}

#doPrestige:hover {
  background-color: var(--crystal);
  color:black;
}

#doReflash:hover {
  background-color: var(--reflash) !important;
  color:black !important;
}

#prestigeGet, #reflashGet {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5px;
    justify-content: space-around;
}

.prestigeButton {
  color: var(--crystal) !important;
  border-color: var(--crystal) !important;
}

.prestigeButton:hover {
  background-color: rgba(0, 255, 255, 0.144) !important;
}

#crystalConvert {
  color: var(--crystal) !important;
}

#coinConvert {
  color: var(--coin) !important;
}

.reflashButton:hover {
  background-color: rgba(0, 220, 0, 0.144) !important;
}

.fortuneButton2:hover {
  background-color: rgba(220, 0, 220, 0.144) !important;
}

.fortuneButton2 {
  color: var(--fortune) !important;
  border-color: var(--fortune) !important;
}

/* Specific active styles for special-colored tab buttons */
.tabButton.prestigeButton.active,
.tabButton.prestigeButton[aria-selected="true"] {
  /* make the aqua color the background and use dark text */
  background-color: var(--crystal) !important;
  color: black !important;
  border-color: var(--crystal) !important;
}
.tabButton.prestigeButton.active:hover,
.tabButton.prestigeButton[aria-selected="true"]:hover {
  background-color: var(--crystal) !important;
}

.tabButton.fortuneButton2.active,
.tabButton.fortuneButton2[aria-selected="true"] {
  /* use a stronger pink for fortune active */
  background-color: var(--fortune) !important;
  color: black !important;
  border-color: var(--fortune) !important;
}
.tabButton.fortuneButton2.active:hover,
.tabButton.fortuneButton2[aria-selected="true"]:hover {
  background-color: rgba(255, 105, 180, 0.9) !important;
}

.tabButton#eventSelect.active,
.tabButton#eventSelect[aria-selected="true"] {
  /* use a stronger pink for fortune active */
  background-color: red;
  color: black;
  border-color: red;
}
.tabButton#eventSelect.active:hover,
.tabButton#eventSelect[aria-selected="true"]:hover {
  background-color: rgba(255, 0, 0, 0.9);
}

.tabButton.reflashButton.active,
.tabButton.reflashButton[aria-selected="true"] {
  background-color: var(--reflash) !important;
  color: black !important;
  border-color: var(--reflash) !important;
}

.tabButton.reflashButton.active:hover,
.tabButton.reflashButton[aria-selected="true"]:hover {
  background-color: var(--reflash) !important;
}


#prestigeSingleUpgrades {
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin-top: 20px;
}
#prestigeBuyableUpgrades {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.pSURow {
  display: flex;
  flex-direction: column;
}

#threeRowMilestones{
  display: flex;
}

.milestone {
  border: 3px #212121 solid;
  background-color: rgb(151, 151, 151);
  color: black;
  max-width: 300px;
  max-height: 70px;
  width: 30vw;
  height: 15vw;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: calc(12px * var(--font-scale));
  flex-direction: column;
  text-align: center;
}

#milestonesTab {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#horizontalMilestones {
  display: flex;
}

.horizontalMilestone {
  width: 452.5px;
}

.prestigeMilestone {
  border-color: rgb(56, 55, 55);
  background-color: rgb(74, 74, 74);
}

.prestigeMilestone.completed {
  border-color: var(--break-prestige-upgrade);
  background-color: var(--prestige-upgrade);
}

.centeredDiv {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

#shardsClick {
  background-color: #ff000000;
  width: 180px;
  height: 180px;
  border: none;
  cursor: pointer;
  transition: background-image 0.2s ease-in-out;
  background-image: url('./images/misc/shardoff2.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center center;
}

#shardsClick:hover {
  background-image: url('./images/misc/shard.png');
}

#shardsCountText {
  color: white;
  text-align: center;
}

shn {
  color: var(--shard);
  font-size: calc(30px * var(--font-scale));
  text-shadow: 0 0 5px var(--shard);
}

#breakCrystal {
  flex-direction: column;
  align-items: center;
}

#howMuchCrystalsInput {
  width: 50%;
  margin: 10px 0px;
}

#submitBreak {
  font-family: Poly;
  width: 25%;
  height: 25px;
}

#doBreakCrystal {
  border: var(--crystal) solid 2px !important;
  width: 300px;
  height: 50px;
  font-size: calc(16px * var(--font-scale));
  margin: 10px 0px;
}

#doBreakCrystal:hover {
  background-color: var(--crystal) !important;
  color: black;
}

.shardSinglesRow {
  display: flex;
  justify-content: center
}

.shardUnlockableBase {
  border: var(--shard) 1px solid;
  border-radius: 3px; 
  background-color: #111111;
  width: 600px;
  height: 50px;
  display: flex;
  align-items: center;
  text-align: center;
  cursor:pointer;
  margin: 5px;
}

.shardUnlockable {
  height: 100%;
  background-image: url('./images/misc/shardspb.png');
  background-size: auto 100%;
}

.shardUnlockableText {
  position: absolute;
  color: white;
  pointer-events: none;
  cursor: default;
  display: flex;
  justify-content: center;
  width: 600px;
  text-shadow: 1px 1px black, -1px -1px black, 1px -1px black, -1px 1px black;
}

#shardUnlockableBase3, #shardUnlockableBase4 {
  height: 100px;
}

.shardAchUnlBase {
  width: 48%;
  height: 70px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(16px * var(--font-scale));
}

.shardAchUnlBase:hover {
  background-color: #252525;
}

spn {
  color: var(--spirit);
  font-size: calc(30px * var(--font-scale));
  text-shadow: 0 0 5px var(--spirit);
}

pn {
  color: rgb(255, 108, 211);
  font-size: calc(30px * var(--font-scale));
  text-shadow: 0 0 5px rgb(255, 108, 211);
}

gn {
  color: rgb(111, 255, 108);
  font-size: calc(30px * var(--font-scale));
  text-shadow: 0 0 5px rgb(111, 255, 108);
}

bn {
  color: rgb(108, 189, 255);
  font-size: calc(30px * var(--font-scale));
  text-shadow: 0 0 5px rgb(108, 189, 255);
}

rn {
  color: var(--rune);
  font-size: calc(30px * var(--font-scale));
  text-shadow: 0 0 5px var(--rune);
}

#shopBuyableU1 {
  background-image: url('./images/items/goldengloves.png')
}
#shopBuyableU2 {
  background-image: url('./images/items/goldenwatch.png')
}
#shopBuyableU3 {
  background-image: url('./images/items/goldenkey.png')
}
#shopBuyableU4 {
  background-image: url('./images/items/clover.png')
}
#shopBuyableU5 {
  background-image: url('./images/items/shardrain.png')
}
#shopBuyableU6 {
  background-image: url('./images/items/P.webp')
}
#shopBuyableU7 {
  background-image: url('./images/items/energymaybe10.webp')
}
#shopBuyableU8 {
  background-image: url('./images/items/goldengloves2.png')
}
#shopBuyableU9 {
  background-image: url('./images/items/goldenwatch2.png')
}
#shopBuyableU10 {
  background-image: url('./images/items/goldenkey2.png')
}
#shopBuyableU11 {
  background-image: url('./images/items/goldenclover.png')
}
#shopBuyableU12 {
  background-image: url('./images/items/MiniUReducer.png')
}
#shopBuyableU13 {
  background-image: url('./images/items/tarotcards.png')
}
#shopBuyableU14 {
  background-image: url('./images/items/minisob.png')
}
#shopBuyableU15 {
  background-image: url('./images/items/adrenaline.png')
}
#shopBuyableU16 {
  background-image: url('./images/items/diamondpersV3.webp')
}
#shopPermanentU1 {
  background-image: url('./images/items/creditcard.png')
}
#shopBuyableU17 {
  background-image: url('./images/items/cursorwhitepercent.bmp')
}
#shopBuyableU18 {
  background-image: url('./images/items/cursorredX.bmp')
}
#shopPermanentU2 {
  background-image: url('./images/items/glowhand.webp')
}
#shopPermanentU3 {
  background-image: url('./images/items/lightningcrystalfinish.webp')
}
#shopPermanentU4 {
  background-image: url('./images/items/swordcrystal.webp')
}
#shopPermanentU5 {
  background-image: url('./images/items/fortuneTicket.png')
}
#shopPermanentU6 {
  background-image: url('./images/items/creditcardplus.png');
  background-position: -0.75px -4px;
  image-rendering: pixelated;
}
#shopPermanentU7 {
  background-image: url('./images/items/reaper.png');
  background-position: -0.75px -0.5px;
  image-rendering: pixelated;
}
#shopBuyableU19 {
  background-image: url('./images/items/shardhammer.png')
}
#shopPermanentU8 {
  background-image: url('./images/items/winnerheadband.png')
}
/* #shopSingleU2{
  background-image: url('./images/brokenspeedometer.webp');
  background-position: -0.5px -0.5px;
  image-rendering: pixelated;
} */
#shopSingleU1 {
  background-image: url('./images/items/crystalactualspeedometer.webp');
  background-position: -0.5px -0.5px;
  image-rendering: pixelated;
}
#shopSingleU2 {
  background-image: url('./images/items/modernize.webp');
  background-position: -0.5px -0.5px;
  image-rendering: pixelated;
}
#shopSingleU3 {
  background-image: url('./images/items/trophy.webp');
  background-position: -0.5px -0.5px;
  image-rendering: pixelated;
}
#shopSingleU4 {
  background-image: url('./images/items/crystalclock.webp');
  background-position: -0.5px -0.5px;
  image-rendering: pixelated;
}
#shopSingleU5 {
  background-image: url('./images/items/aqua_pickaxe.png');
  background-position: -0.5px -0.5px;
  image-rendering: pixelated;
}
#shopSingleU6 {
  background-image: url('./images/items/Paper.png');
  background-position: -2px -0.5px;
  image-rendering: pixelated;
}
#shopSingleU7 {
  background-image: url('./images/items/overdriveexpansion1.png');
  image-rendering: pixelated;
}
#shopSingleU8 {
  background-image: url('./images/items/goldenspeedomoter.png');
  background-position: -0.5px -0.5px;
  image-rendering: pixelated;
}
#shopItem1 {
  background-image: url('./images/items/Uxtotallydonenow.bmp');
  background-position: -1.5px;
  image-rendering: pixelated;
}
#shopItem2 {
  background-image: url('./images/items/U1totallydonenow.bmp');
  background-position: -1.5px;
  image-rendering: pixelated;
}
#shopItem3 {
  background-image: url('./images/items/TW1m.bmp');
  image-rendering: pixelated;
}
#shopItem4 {
  background-image: url('./images/items/coinrain.png');
  image-rendering: pixelated;
}
#shopItem5 {
  background-image: url('./images/items/crystalrain.png');
}
#shopItem6 {
  background-image: url('./images/items/FreeUAdder.png');
}
#mineral1 {
  background-image: url('./images/mins/opalfinished.webp');
}
#mineral2 {
  background-image: url('./images/mins/topazfinished.webp');
}
#mineral3 {
  background-image: url('./images/mins/jadeshiny.webp');
  background-position: -1px -1px;
}
#mineral4 {
  background-image: url('./images/mins/aquamarine.png');
  background-position: -1px -1px;
}

.challengePair {
  display: flex;
  flex-direction: row;
}

.prestigeChallengePair {
  display: flex;
  flex-direction: row;
}

#superCrystalsTab, #superCrystalUpgrades{
  margin-top: 30px;
  justify-content: space-evenly;
  text-align: center;
}

#superCrystalCount {
  font-size: calc(18px * var(--font-scale));
}

#superCrystalBarBase {
  width: 250px;
  height: 300px;
}

#superCrystalGen {
  height: 550px;
}

scn {
  color: var(--supercrystal);
  font-size: calc(30px * var(--font-scale));
  text-shadow: 0 0 5px var(--supercrystal);
}

#superCrystalBarBase{
  background-image: url(images/misc/supercrystaloff.png);
  background-size: contain;
  background-repeat: no-repeat;
  align-items: center;
  text-align: center;
  cursor: pointer;
  height: 500px;
  width: 400px;
  font-size: calc(24px * var(--font-scale));
}
#superCrystalBar{
  background-image: url(images/misc/supercrystalon.png);
  background-size: contain;
  background-repeat: no-repeat;
  height: 100%;
  width: 100%;
  clip-path: inset(100% 0 0 0); 
}
#superCrystalBarGhost {
  position: absolute;
  color: white;
  pointer-events: none;
  cursor: default;
  display: flex;
  width: 400px;
  justify-content: center;
  z-index: 10000;
  height: 500px;
  align-items: center;
}
.superCrystalUpgradesRow {
  display: flex;
}


#mineralsTab, #mineralsCountDiv, .mineralContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Make mineral blocks wrap to a new row when container gets narrow */
#mineralsDiv {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap; /* allow children to wrap */
  justify-content: center;
  gap: 16px; /* spacing between items */
}

.mineralContainer {
  width: 300px;
  height: 300px;
  margin-top: 50px;
  box-sizing: border-box;
}

.mineralButton {
  border-color: var(--rune);
}

#generateRunes, #generateRunesMax {
  margin: 0;
  border-color: var(--rune);
  width: 175px;
  height: 60px;
  margin-bottom: 10px;
}

#generateRunes:hover, #generateRunesMax:hover{
  background-color: var(--rune);
  box-shadow: 0 0 10px var(--rune);
  color: black;
}

#generateRunesMax{
  height: 30px;
  border-radius:2px;
}

super {
  color: var(--supercoin);
  text-shadow: 0 0 5px var(--supercoin);
  pointer-events: none;
  user-select: none;
}
table {
  border-spacing: 0; 
}
th {
  color: white;
  border:white 1px solid;
  width: 150px;
  font-weight: normal;
  font-size: calc(13px * var(--font-scale));
  padding: 2px;
  height: 17.5px;
}

#welcomeToDigitalGod {
  font-size: calc(17px * var(--font-scale));
}

#recentPrestigesTab {
  flex-direction: column;
    align-items: center;
}

#saveButtons {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

#breakPrestigeTab {
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.row {
  display: flex;
}

.averageTable {
  background-color: #222222;
}

#shardAchsTab {
  flex-direction: column;
  align-items: center;
}

.shardAchBarRow{
  display: flex;
  flex-direction: row;
}

.shardAchBarDiv {
  max-width: 600px;
  max-height: 70px;
  width: 42vw;
  height: 10vw;
  border: white 2px solid;
  border-radius: 50px;
  margin: 20px;
}

.shardAchBarBase{
  background-color: #111111;
  height: 99%;
  display: flex;
  align-items: center;
  text-align: center;
  border-radius: 50px;
}

.shardAchBarGhost {
  position: absolute;
  color: white;
  pointer-events: none;
  cursor: default;
  display: flex;
  max-width: 600px;
  width: 42vw;
  justify-content: center;
  z-index: 1000;
  font-size: calc(14px * var(--font-scale));
}

.shardAchBar{
  height: 100%;
  width: 100%;
  background-image:radial-gradient( rgba(255, 255, 255, 0.505), black 210%);
  border-radius: 50px;
}

#shardAchBar1{
  background-image:radial-gradient( rgba(255, 221, 0, 0.505), black 210%);
}

#shardAchBar2{
  background-image:radial-gradient( rgba(255, 174, 0, 0.505), black 210%);
}

#shardAchBar3{
  background-image:radial-gradient( rgba(0, 255, 238, 0.505), black 210%);
}

#shardAchBar4{
  background-image:radial-gradient( rgba(153, 255, 248, 0.505), black 210%);
}

#shardAchBar5{
  background-image:radial-gradient( rgba(205, 205, 205, 0.505), black 210%);
}

#shardAchBar6{
  background-image:radial-gradient( rgba(133, 133, 133, 0.505), black 210%);
}

#shardAchBar7{
  background-image:radial-gradient( rgba(5, 208, 195, 0.505), black 210%);
}

#shardAchBar8{
  background-image:radial-gradient( rgba(255, 255, 255, 0.505), black 210%);
}

#shardAchBar9{
  background-image:radial-gradient( rgba(255, 0, 0, 0.505), black 210%);
}

#shardAchBar10{
  background-image:radial-gradient( rgba(199, 255, 251, 0.505), black 210%);
}

#fortuneTab {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap; /* allow the two halves to wrap like balance */
  align-items: flex-start;
  justify-content: space-evenly;
  gap: 16px;
}

#fortuneTab .sideFortune {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* prefer a 420px base so halves wrap to next row when narrow */
  flex: 0 1 700px;
  max-width: 700px;
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  height: auto; /* don't force 90vh so it can shrink on small screens */
}

#fortuneConvert {
  position: relative;
  width: 360px;
  height: 360px;
  margin: 30px 0;
}

.halfButton {
  position: absolute;
  width: 358px;
  height: 356px;
  border-radius: 50%;
  border: 2px solid white;
  top: 0;
  left: 0;
  background: transparent;
  cursor: pointer;
  z-index: 1;
  transition: filter 0.2s;
  color: black;
  text-align: center;
  display: flex;
  align-items: center;
}

.halfButton.left {
  background: radial-gradient(rgb(0, 0, 0) 45%, var(--coin) 100%);
  clip-path: polygon(0 0, 180px 0, 180px 360px, 0 360px);
  border-right: none;

}

.halfButton.right {
  background: radial-gradient(rgb(0, 0, 0) 45%, var(--crystal));
  clip-path: polygon(180px 0, 360px 0, 360px 360px, 180px 360px);
  border-left: none;
  justify-content: right;
}

.halfButton:hover {
  filter: brightness(2);
}

#whiteLine {
  width: 2px;
  height: 360px;
  left: 50%;
  background: white;
  position: absolute;
  z-index: 2;
}

.donut-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  background: black;
  border-radius: 50%;
  border: 2px solid white;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  text-align: center;
}

.fortuneBoost img {
  margin: 5px;
}

.fortuneBoost {
  color: white;
  font-size: calc(12px * var(--font-scale));
  border: 1px solid white;
  border-radius: 2px;
  max-width: 400px;
  height: 70px;
  display: flex;
  align-items: center;
  pointer-events: none;
  transition:  0.25s ease-in-out;
}

.fortuneBoost.disabled {
  color:#a1a1a1;
}

.fortuneBoostName {
  width: 75%;
}

.rightSideElements{
  display: flex;
  flex-direction: column;
  align-self: flex-end;
  margin-top: -8px;
  font-weight: 900;
  height: 100%;
  position: relative;
  width: 15%;
}

.fortuneBoostTime {
  position: absolute;
  top: 0;
  right: 5px;
}

.fortuneBoostRarity {
  position: absolute;
  right: 10px;
  bottom: 0;
  margin-left: auto;
  font-weight: 900;
  font-size: calc(28px * var(--font-scale));
}

.fortuneBoostRarity.B-rarity {
  color: rgb(0, 153, 255);
}
.fortuneBoostRarity.A-rarity {
  color: rgb(255, 153, 0);
}
.fortuneBoostRarity.S-rarity {
  color: rgb(140, 0, 255);
}
.fortuneBoostRarity.EX-rarity {
  color: rgba(255, 38, 0, 0.801);
}

img.disabled {
  filter: drop-shadow(0 0 2px #ffffff73) drop-shadow(0 0 2px #ffffff6e) drop-shadow(0 0 2px #ffffff71) !important;
}

.fortuneBoost.B-rarity {
  background: radial-gradient(rgb(0, 0, 0) 75%, rgb(3, 136, 177));
}

.fortuneBoost.A-rarity {
  background: radial-gradient(rgb(0, 0, 0) 70%, rgb(187, 137, 0));
}

.fortuneBoost.S-rarity {
  background: radial-gradient(rgb(0, 0, 0) 65%, rgb(116, 0, 211));
}

.fortuneBoost.EX-rarity {
  background: radial-gradient(rgb(0, 0, 0) 60%, rgba(192, 38, 0, 0.801) 90%, rgba(194, 39, 0, 0.877)95%,rgba(202, 0, 0, 0.884) 100%);
}

.fortuneUpgradesRow {
  display: flex;
}

/* Balance tab: two columns that wrap on small screens */
#balanceTab {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-evenly;
  gap: 16px;
}

/* Target the two halves inside the balance tab */
#balanceTab .sideFortune {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 1 600px; /* do not force growth, allow shrinking, base 420px */
  max-width: 600px;
  box-sizing: border-box;
  padding: 8px;
}

#fortuneUpgrades {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#balanceCoinBlocks {
  position: absolute;
  margin-left: 40px;
  margin-top: 137.5px;
  
}

#balanceCoinBlocks2 {
  position: absolute;
  display: flex;
  flex-direction: row;
  gap: 131.5px;
  height: 250px;
}

.balanceCoinBlock {
  border: 1px solid white;
  background-color: #000000;
  border-radius: 3px;
  width: 65px;
  height: 80px;
  transition: transform 0.3s ease-in-out;
  font-size: 9px;
}

.verticalLine {
  height: 5px;
  width: 1px;
  background-color: white;
  transition: height 0.3s ease-in-out;
}

.softcapBlock {
  display: flex;
  flex-direction: column;
  width: 300px;
  background-color: #111111;
  margin: 10px;
}

#plusCoinsDesc, #minusCoinsDesc {
  max-width: 350px;
  width: 45vw;
}

#balanceScalesCount {
  text-align: center;
}

#mySlider {
  width: 80%;
}

#autosaveSlider {
  font-size: calc(14px * var(--font-scale));
}

.fortuneButton {
  font-size: calc(16px * var(--font-scale)) !important;
  height: 60px !important;
  max-width: 340px !important;
  width: 25vw !important;
  margin: 0 !important;
  border-width: 2px !important;
}

.fortuneBoost {
  font-size: calc(12px * var(--font-scale));
}

.save_slot {
  max-height: 50px;
  width: 200px;
}

#algoTopBar {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tree-container {
  position: relative;
  width: 100%;
  max-width: 1250px;
  margin-top: 20px;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 250px;
}

#algorithmTab {
  width: 100vw;
  flex-direction: column;
  align-items: center;
}

.presetButton {
  max-width: 90px;
  width: 15vw;
}

/* Слой с линиями лежит позади кнопок */
.tree-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1; 
    pointer-events: none; /* Чтобы клики проходили сквозь линии на фон */
}

.tree-grid {
    display: grid;
    /* Создаем сетку из 4 одинаковых колонок */
    grid-template-columns: repeat(4, 1fr);
    /* Размеры ячеек и отступы (подгони под себя) */
    grid-auto-rows: 80px; 
    gap: 60px 60px;
    position: relative;
    z-index: 2; /* Кнопки лежат поверх линий */
}

#treeGrid2 {
  width: 100%;
  position: absolute;
  top: 0;
  z-index: 10;
  pointer-events: none;
}

.treeNode {
    background-color: black;
    border: 1px solid var(--reflash) !important;
    color: white;
    font-family: "Poly";
    font-size: calc(12px * var(--font-scale)) !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: 0.25s ease-in-out;
    height: 10vh;
    width: 15vw;
    max-height: 100px;
    max-width: 220px;
}

.treeNode:hover {
    background-color: var(--reflash) !important;
    color: black;
}

.treeNode.bought {
    background-color: var(--reflash) !important;
    color: black;
}

.treeNode:active:enabled {
    transform: scale(0.95); 
}
.treeNode:disabled{
    background-color: rgb(65, 65, 65) !important; 
}
.treeNode:disabled:hover{
    background-color: rgb(241, 103, 103)  !important;
    color: black  !important;
}

.treeNodeGhost {
  border: solid 1px black;
  display: none;
  font-weight: bold;
  text-align: center;
  align-items: center;
  background-color: rgb(148, 147, 147);
  color: black;
  font-size: calc(16px * var(--font-scale)) !important;
  height: 10vh;
  width: 15vw;
  max-height: 100px;
  max-width: 220px;
  opacity: 0.8;
  pointer-events: none;
  justify-content: center;
}

.treeNodeGhost.locked {
  display: flex;
}

#nodeOrderInput {
  background-color: black;
  color: white;
  border: 1px solid white;
  width: 250px;
  font-size: calc(18px * var(--font-scale));
}

#loadingScreen {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: black; /* Черный цвет для фоновых рамок */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; 
    z-index: 9999;
}

#introVideo {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Вписывает видео целиком, сохраняя пропорции и добавляя рамки */
}

#respecTree.active {
    background-color: rgb(255, 255, 255);
    color: rgb(0, 0, 0);
    border-color: rgb(0, 0, 0);
}

#respecTree.active:hover {
    background-color: rgb(230, 230, 230);
}

#dialogueWindow {
  display: flex;
  position: fixed;
  bottom: 8vh;
  height: 25vh;
  width: 100%;
  align-items: center;
  justify-content: center;
}

#dialogueDiv {
  background-color: black;
  height: 100%;
  width: 80%;
  max-width: 1000px;
  border: solid 4px white;
  color: white;
  font-size: calc(32px * var(--font-scale));
}

#dialogueName {
  height: 20%;
  width: 100%;
  border: solid 0px white;
  border-bottom-width: 4px;
  font-size: calc(40px * var(--font-scale));
  font-weight: bold;
  text-align: left;
  display: flex;
  align-items: center;
}

#dialogueDesc, #dialogueName span {
  padding: 0 10px;
}

#acceleratorTab {
  display: flex;
  justify-content: center;
}

#acceleratorSpeedometerIcon {
  background: url('./images/misc/accelerator_speedometer.png') no-repeat; 
  background-size: cover; 
  image-rendering: pixelated;
  height: 100px;
  width: 100px;
}

#acceleratorMachine {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 800px;
  max-width: 650px;
  height: 80vh;
  width: 85vw;
}

#acceleratorMachineBar {
  border: 3px solid var(--reflash) !important; 
  height: 60%;
  width: 90%;
  border-radius: 50px 50px 0 0;
  border-bottom-width: 0px;
  position: relative;
}

#acceleratorMachinePanel {
  border: 3px solid var(--reflash) !important;
  display: flex;
  flex-direction: column;
  height: 40%;
  width: 100%;
  height: 100%;
}

#acceleratorMachineMain {
  display: flex;
  flex-direction: column;
  height: 60%;
  align-items: center;
} 

#acceleratorMachineMainDiv1 {
  display: flex;
  flex-direction: row;
  height: 60%;
  width: 100%;
  justify-content: space-around;
  align-items: center;
}

#acceleratorMachineUpgrades {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40%;
  width: 100%;
}

#acceleratorMachineUpgradesDiv {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  border: 3px solid var(--reflash);
  height: 60%;
  width: 85%;
  gap: 2%;
}

.acceleratorUpgrade {
  border: solid 2px var(--reflash) !important;
  height: 90%;
  width: 22.5%;
  color: var(--reflash) !important;
  background-color: #000000;
  transition: ease-in-out 0.3s;
  box-shadow: inset 0 0 10px 5px var(--reflash) !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-weight: bold;
  font-size: calc(16px * var(--font-scale));
}

.acceleratorUpgrade:disabled {
  box-shadow: none !important;
}

.acceleratorUpgrade:hover {
  background-color: #26a82613 !important;
}

.acceleratorUpgrade img {
  height: 35px;
}

#acceleratorU5, #acceleratorU5_1 {
  display: block;
  font-size: calc(18px * var(--font-scale));
  width: 100%;
  max-width: 100%;
  height: 100%;
  font-weight: 300;
}

#acceleratorU5_1 {
  font-weight: bold;
}

#acceleratorResetDiv {
  width: 50%;
  height: 100px;
}

#acceleratorCurrentSpeed {
  display: flex;
  font-size: calc(24px * var(--font-scale));
  color: var(--reflash) !important;
  height: 30%;
  width: 75%;
  justify-content: center;
  align-items: center;
  flex-direction: row;
}

/*.progress-bar-base*/
#acceleratorMachineBar{
  height:100%;
  background-color: transparent;
  overflow: hidden;
  position: relative;
}

/*.progress-bar-base*/
#acceleratorMachineProgressBar {
  position: absolute;
  bottom: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50%;
  font-size: calc(12px * var(--font-scale));
  background-image: radial-gradient(color-mix(in srgb, var(--reflash) 80%, black 90%), #040000 170%); 
}

#acceleratorMachine-pbt-div {
  top: 40%;
  position: absolute;
  display: flex;
  justify-content: center;
  width: 100%;
  text-align: center;
} 

#acceleratorMachine-progress-bar-text {
  display: block;
  font-size: calc(30px * var(--font-scale));
  text-shadow: 0 0 5px var(--reflash) ;
  color: var(--reflash) !important;
}

#additionalVirusWindow {
  height: 20vh;
  width: 100vw;
  display: block;
}

#virusWindow {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 10000;
}

#virusWindow header {
  background-color: #000000;
  height: 20px
}

#virusWindow footer {
  background-color: #000000;
  height: 20%;
}

#virus-progressbar {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50%;
  font-size: calc(12px * var(--font-scale));
  background-image: radial-gradient(#ff0000, #040000 170%); 
}

#virus-progress-bar-base{
  position: relative;
}

#virus-progress-bar-text {
  font-size: calc(18px * var(--font-scale));
  position: absolute;
  width: 100%;
  top: 0;
  display: flex;
  justify-content: center;
  color: white;
}

#virusWindow footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  box-shadow: inset 0 0 50px 5px red;
}

vn {
  color: red
}

#temporaryBonuses {
  display: flex;
  flex-direction: column;
  position: fixed; 
  top: 20%;        
  right: 0;        
  width: 300px;    
  background: black;
  color: white;
  padding: 15px;
  padding-left: 25px;
  border: 2px solid white;
  transition: transform 0.5s ease-in-out;
  transform: translateX(100%); 
  z-index: 1000;
  gap: 15px;
}

#temporaryBonuses.open {
  transform: translateX(0);
}

#toggleBtn {
  position: absolute;
  left: -45px; 
  top: 11px;
  width: 40px;
  height: 40px;
  background: black;
  cursor: pointer;
  border: 2px solid white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: calc(30px * var(--font-scale));
}

#digitalizationEvent, #digitalizationPreStart  {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#digitalizationEvent .titleTab {
  font-size: calc(20px * var(--font-scale));
}

#digitalizationLogo, #digitalizationLogo2 {
  width: 450px;
  height: 70px;
  background: url('./images/misc/digitalization_logo.png') no-repeat;
  background-size: cover; 
}

#digitalizationEventTime {
  width: 400px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
}

#digitalizationContent {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  width: 100%;
  align-items: center;
}

#digitalizationQuest {
  max-width: 500px;
  width: 80vw;
  display: flex;
  flex-direction: column;
  margin-bottom: 40px;
  border: 2px solid white;
  border-bottom-width: 0px;
  color: white;
}

#digitalizationQuestSelection {
  display: flex;
  justify-content: center;
  align-content: center;
  gap: 10px;
  padding: 5px;
  border-bottom: 2px solid white;
}

#digitalizationQuestTimerDailyDiv, #digitalizationQuestTimerWeeklyDiv, #digitalizationPassTimerDiv, #digitalizationPassPointsDiv, #digitalizationPassTitle, #digitalizationQuestTitle, #digitalizationQuestDailyTitleDiv, #digitalizationQuestWeeklyTitleDiv  {
  height: 30px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#digitalizationQuestTimerDailyDiv, #digitalizationQuestTimerWeeklyDiv, #digitalizationPassPointsDiv {
  border-bottom: 2px solid white;
}

#digitalizationPassPointsDiv #digitalizationPassLevel, #digitalizationPassPointsDiv #digitalizationPassPoints {
  margin: 20px;
}

#digitalizationQuestList {
  display: flex;
  justify-content: center;
}

#digitalizationQuestSelection button{
  margin: 0 !important;
}

#digitalizationQuestListDaily, #digitalizationQuestListWeekly {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.digitalizationQuest {
  height: 60px;
  width: 100%;
  border-bottom: 2px solid white;
  display: flex;
  flex-direction: row;
  position: relative;
}

#digitalizationPass {
  height: 300px;
  max-width: 750px;
  width: 90vw;
  border: 2px solid white;
}

#digitalizationPassList {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  height: 80%;
  overflow-x: auto;
}

#digitalizationPassLevels {
  display: flex;
  height: 100%;
  align-items: center;
  text-align: left;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px;
}

.digitalizationPassItemContainer {
  height: 180px;
  width: 120px;
  border: 2px solid white;
  color: white;
  display: flex;
  align-items: center;
  flex-direction: column;
  font-size: calc(17px * var(--font-scale));
  text-align: center;
  pointer-events: none;
  cursor: pointer;
  transition: ease-in-out 0.3s;
}

.digitalizationPassItemContainer.completed {
  border-color: yellow;
  box-shadow: inset 0 0 15px 0px yellow;
  pointer-events: all;
}

.digitalizationPassItemContainer.completed:hover {
  background-color: rgba(255, 255, 0, 0.178);
}

.digitalizationPassItemContainer.completed .digitalizationPassItemIcon {
  border-color: yellow;
}

.digitalizationPassItemContainer.tookReward {
  border-color: #0099ff;
  pointer-events: none !important;
  cursor: none;
  box-shadow: none;
}

.digitalizationPassItemContainer.tookReward .digitalizationPassItemIcon {
  border-color: #0099ff;
}

.digitalizationPassItemIcon {
  height: 120px;
  width: 120px;
  border: 0px solid white;
  border-top-width: 1px;
  border-bottom-width: 1px;
  background-repeat: no-repeat;
  background-size: contain;
  image-rendering: pixelated;
  background-position: center;
  background-color: transparent;
}

.digitalizationPassItemTitle{
  height: 20px;
}

.horizontalLine {
  display: block;
  height: 5px;
  width: 150px;
  background: rgb(0, 0, 0);
  border: solid white;
  border-width: 2px 0px;
  flex-shrink: 0;
}

#digitalizationPassTop {
  height: 20%;
}

.digitalizationWeeklyQuestTitle, .digitalizationDailyQuestTitle {
  font-weight: bold;
  padding-left: 10px;
}

.digitalizationWeeklyQuestDesc, .digitalizationDailyQuestDesc {
  padding-left: 10px;
}

.digitalizationWeeklyQuestReward, .digitalizationDailyQuestReward {
  font-weight: bold;
  position: absolute;
  bottom: 0;
  right: 0;
}

.digitalizationQuestDesc {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.digitalizationQuestDescDiv {
  position: relative;
  width: 100%;
}

.digitalizationQuestProgressBar {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.1);
  width: 100%;
  height: 100%;
  top: 0;
  z-index: -10;
}

.digitalizationQuestProgressBar.completed {
  background-color: rgba(30, 255, 0, 0.1);
}

#digitalization-pass-progressbar {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50%;
  font-size: calc(12px * var(--font-scale));
  background-image: none !important;
  background-color: #ffee00
}

#digitalization-pass-progress-bar-base{
  position: relative;
  width: 160px;
  height: 20px;
  border: 2px solid white;
  background-color: #0099ff;
}

#digitalization-pass-progress-bar-text {
  font-size: calc(16px * var(--font-scale));
  position: absolute;
  width: 100%;
  top: 0px;
  display: flex;
  justify-content: center;
  color: rgb(0, 0, 0);
  margin: 0 !important;
}

.digitalizationHalf {
  height: 600px;
}

#eventTreasuresDiv {
  display: flex;
  width: 100%;
  flex-direction: row;
  justify-content: center;
  gap: 10px;
}

.treasure {
  background-repeat: no-repeat;
  background-size: contain;
  background-color: transparent;
  aspect-ratio: 1 / 1;
  width: 100%;
  display: flex;
  justify-content: center;
  background-position: center;
  color: white;
  border: 1px solid white;
  border-bottom-width: 0;
  cursor: pointer;
  image-rendering: pixelated;
}

.eventTreasureContainer {
  max-width: 120px;
  width: 15vw;
}

.treasuneName {
  color: white;
  height: 40px;
  width: 100%;
  border: 1px solid white;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: calc(16px * var(--font-scale));
}

#treasureTab .tooltip {
  font-size: calc(16px * var(--font-scale));
  max-width: 300px;
}

#treasureDetails {
  width: 100%;
  height: 100%;
  max-height: 100%;
}

#treasureIconAndName {
  display: flex;
  height: 40%;
  width: 100%;
}

#treasureIconBig {
  height: 100%;
  aspect-ratio: 1 / 1;
  border: 0px white solid;
  border-right-width: 1px;
  border-bottom-width: 1px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  image-rendering: pixelated;
}

#treasureDetailsText {
  display: flex;
  height: 100%;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.temporaryTreasure {
  text-shadow: 0 0 1px #000000;
  color: var(--grey-text);
}

.temporaryTreasure.disabled {
  text-shadow: 0 0 1px #000000;
  color: var(--grey-text);
}

#treasureDescriptionText {
  font-size: calc(20px * var(--font-scale));
}

#treasureDescriptionDate {
  font-size: calc(18px * var(--font-scale));
}

#computerTab {
  width: 100%;
  flex-direction: column;
  align-items: center;
}

#computerTopBar {
  width: 100%;
  display: flex;
  align-items: center;
  height: 20vh;
  max-height: 400px;
  flex-direction: column;
}

#computerLogo {
  background-image: url('./images/computer/os1.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  image-rendering: pixelated;
  height: 100%;
  width: 50%;
}

#computerComponentsDiv {
  width: 90%;
  max-width: 800px;
  display: flex;
  align-items: center;
  height: 42vh;
  max-height: 420px;
  flex-direction: column;
  border: 2px solid var(--reflash);
  justify-content: space-evenly;
}

#computerComponents {
  width: 100%;
  display: flex;
  align-items: center;
  height: 100%;
  max-height: 400px;
  flex-direction: row;
  justify-content: space-evenly;
}

.computerComponentContainer {
  width: 15%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--reflash);
  cursor: pointer;
  box-shadow: inset 0 0 15px 1px var(--reflash) !important;
}

.computerComponentImage {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-bottom: 1px solid var(--reflash);
}

.computerComponentText {
  display: flex;
  flex-direction: column;
  color: white;
  text-align: center;
  font-size: calc(14px * var(--font-scale));
}

.computerComponentSpan {
  display: block;
}

.computerComponentName {
  font-size: calc(18px * var(--font-scale));
}

.computerComponentContainer.disabled, .computerComponentContainer.disabled .computerComponentImage {
  box-shadow: inset 0 0 0 0 !important;
}

.computerComponentImage img{
  height: 100%;
  aspect-ratio: 1 / 1;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  image-rendering: pixelated;
}

#algoTopBar {
  position: fixed;
  z-index: 1000;
  background-color: black;
  border: 1px solid var(--reflash);
  bottom: 2%;
  padding: 10px;
}

.shop-arrow {
  position: absolute;
  border: white 0px solid;
  background-color: transparent;
  color: white;
  height: 100px;
  width: 100px;
  font-size: calc(100px * var(--font-scale));
  text-align: center;
}

.left-shop-arrow {
  left: -12%;
  top: 30%;
}

.right-shop-arrow {
  right: -12%;
  top: 30%;
}

.automechanismRow {
  display: flex;
  flex-direction: row;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
}

.automechanismContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: var(--reflash) solid 2px;
  border-radius: 10px;
  max-height: 200px;
  max-width: 230px;
  width: 20vw;
  height: 20vh;
  padding-top: 10px;
  position: relative;
}

.automechanismCheckbox {
  position: absolute;
  bottom: 5px;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
  cursor: pointer;
}

.automechanismGhost {
  display: none;
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  border-radius: 10px;
  opacity: 0.8;
  font-weight: bold;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: rgb(148, 147, 147);
  color: black;
  font-size: calc(16px * var(--font-scale));
}

.automechanismGhost.locked {
  display: flex;
}

.autoMechanismComplex, .autoMechanismComplex input {
  width: 90%;
}

.autoMechanismComplex button:hover {
  background-color: var(--reflash);
  color: black
}

#autoBalanceCoinsInputsDiv {
  display: flex;
  flex-direction: row;
  max-width: 300px;
  width: 100%;
}

.autoMechanismComplex button {
  border: 2px var(--reflash) solid;
  background-color: #101010;
  color: var(--reflash);
  cursor: pointer;
  font-size: calc(12px * var(--font-scale));
  /* border-bottom: 0px; */
  width: 100%;
}

.reflashInput {
  border: 2px var(--reflash) solid;
  font-size: calc(14px * var(--font-scale));
  background-color: #222222;
  color: white;
  text-align: left;
}

.automechanismContainer .intervalText {
  margin: 3px;
}

#autoBalanceCoinsMode {
  border-bottom-width: 0px !important;
}

#mineralsAutomationEditor, #itemsAutomationEditor {
  height: 90%;
  max-height: 600px;
  max-width: 750px;
  width: 90%;
  font-size: calc(18px * var(--font-scale));
}

.dnd-zone {
  min-height: 80px; 
  min-width: 400px;
  width: 90%;
  border: 2px dashed #444; 
  display: flex; 
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-left: 10px;
}

.mineral-item, .item-item {
  width: 65px; 
  height: 65px; 
  cursor: grab;
  border: 1px solid var(--rune) 
}

.item-item {
  border-color: var(--supercoin)
}

.mineral-item img, .item-item img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

#bulkBuyMinerals, #bulkBuyItems {
  margin-top: 10px;
  width: 90%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.mineralMiniContainer, .itemMiniContainer {
  height: 95px;
  width: 74px;
}

.mineralInput, .itemInput {
  width: 100%;
  font-size: calc(16px * var(--font-scale));
}

.mineralIcon, .itemIcon {
  width: 80px;
  height: 80px;
  border: 1px solid var(--rune) 
}

.itemIcon {
  border-color: var(--supercoin)
}

.mineralIcon img, .itemIcon img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

#autoMineralsMode, #autoItemsMode {
  margin-bottom: 10px
}

.itemInput {
  border-color: var(--supercoin)
}

/* #itemOrderContainer, #itemPoolContainer {
  min-width: 500px;
} */



































@media (max-width: 1200px) {
  span, gt, pbn, st, ct, p, input, label, select, footer, button, #autosaveSlider, .shardAchBarGhost {
    /* font-size: 60% !important; */
    --font-scale: 0.85;
  }
  .upgradeButton, .prestigeMilestone, .fortuneBoost, .fortuneButton {
    --font-scale: 0.9; 
  }
  .challengeDiv {
    --font-scale: 1; 
  }
}

@media (max-width: 800px) {
  span, gt, pbn, st, ct, p, input, label, select, footer, button, #autosaveSlider, .shardAchBarGhost {
    /* font-size: 60% !important; */
    --font-scale: 0.8;
  }
  .upgradeButton, .tooltip {
    --font-scale: 0.9; 
  }
  .challengeDiv {
    --font-scale: 1; 
  }
  .fortuneBoost, .fortuneButton {
    --font-scale: 0.8;
  }
  #superCrystalsTab {
    flex-direction: column;
    align-items: center;
  }
  #harshUmulti {
    width: 90px !important
  }
  #shopTitleDiv {
    width: 90%;
  }
  #shopDiv {
    width: 90%
  }
  .multiplierChooser {
    height: 35px !important;
  }
  #digitalizationContent {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  span, gt, pbn, st, ct, p, input, label, select, footer, button, #autosaveSlider, .shardAchBarGhost {
    /* font-size: 60% !important; */
    --font-scale: 0.6;
  }
  .upgradeButton, .prestigeMilestone, .fortuneBoost, .fortuneButton, .tooltip {
    --font-scale: 0.7; 
  }
  .challengeDiv {
    --font-scale: 0.6; 
  }

  #maxOrNoUpgrades, #modernizeButton, #maxOrNoShardUpgrades, #maxOrNoBreakPrestigeUpgrades, #maxOrNoBalanceUpgrades {
    border-radius: 2.5px;
  }
  #multiplierStats {
    width: 200px;
  }
  .versionButtonVertical{
    height: 30px !important;
  }
  .windowDesc{
    max-height: 350px;
    --font-scale: 0.8
  }
  #versionChooser {
    height: 7%;
  }
  #helpDiv {
    max-height: 90%;
  }
  #versionDiv {
    max-height: 85%;
  }
  #doPrestige, #doReflash {
    height: 10vw;
  }
  .progress-bar-base {
    height: 12px;
    --font-scale: 0.6;
  }
  .tabButton {
    --font-scale: 0.4
  }
  .mainSettings {
    margin-top: 40px
  }
  #temporaryBonuses {     
    width: 150px;  
    --font-scale: 0.6  
  }
  .challengeDesc, .challengePDesc, .challengePDiv {
    --font-scale: 0.6
  }
  .mineralContainer {
    width: 100px;
  }
  .settingButton {
    height: 70px;
  }
  .ghostSettingsText {
    --font-scale: 0.7
  }
  th {
    --font-scale: 0.7
  }
  #majorVersionSelection button {
    height: 25px;
    width: 25px;
  }
  #acceleratorCurrentSpeed {
    --font-scale: 0.5
  }
  .treasuneName {
    --font-scale: 0.6
  }
  .shopContainer {
    --font-scale: 0.7
  }
  #dialogueDiv {
    --font-scale: 0.7
  }

  #bookWindow {
    width: 105vw;
    height: auto;
    aspect-ratio: 1.5 / 1;
    transform: translate(-50%, -50%); 
  }

  .leftPageTitle p, .rightPageTitle p {
    --font-scale: 0.5;
    margin-top: 20px;
    margin-bottom: 5px;
  }

  .grid-buttons {
    grid-template-columns: repeat(2, 1fr); 
    grid-template-rows: repeat(2, auto);
    gap: 5px; 
    margin-top: 5px;
    padding: 0 5%; 
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }

  .btn {
    width: 100%; 
    height: auto; 
    aspect-ratio: 150 / 200; 
    background-size: contain !important; 
    background-position: center top;
    font-size: 8px; 
  }

  .close-btn { 
    top: 7%; 
    right: 0; 
    width: 30px; 
    height: 20px; 
  }

  .arrow-btn { 
    bottom: 17%; 
    width: 40px; 
    height: 25px; 
  }
  
  .left-arrow { left: 0%; }
  .right-arrow { right: 0%; }

  #paperWindow {
    width: 92vw;
    height: auto;
    aspect-ratio: 0.8 / 1; 
    max-height: none;
    
    padding: 35px; 
    
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    --font-scale: 0.5;
  }

  #chapterDiv {
    width: 100%;
    height: 100%;
    justify-content: flex-start;
    padding-top: 25px; /* Небольшой отступ сверху, чтобы текст не залазил на крестик */
  }

  /* Уменьшаем шрифты текста на бумаге, чтобы они не разрывали блок */
  #chapterTitle {
    margin-bottom: 10px;
  }

  #chapterDescription {
    line-height: 1.4;
    overflow-y: auto; /* Если текста много, появится аккуратный скролл */
    max-height: 70vh;
  }

  /* Возвращаем крестик закрытия на нормальное место внутри карточки */
  #exitPaper {
    top: 10%;
    right: 10%;
    height: 35px;
    width: 45px;
    position: absolute;
  }

  .computerComponentText {
    font-size: calc(10px * var(--font-scale));
  }

  .dnd-zone {
    min-height: 45px; 
    min-width: 200px;
  }

  .mineral-item, .item-item, .mineralIcon, .itemIcon {
    width: 40px; 
    height: 40px; 
  }

  .mineralMiniContainer, .itemMiniContainer {
    height: 45px;
    width: 34px;
  }
}