body {
  font-family: Arial, sans-serif;
  background: #1f1f1f;
  color: #fff;
  margin: 0;
  padding: 20px;
}

body {
    background-image: url('rsilo.png');
    background-repeat: repeat;
}


body, html {
    overflow-x: hidden;
    background-color:#000000
}
  
.rotating-container {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.rotating-image {
  width: 90%;
  animation: spin 10s linear infinite;
  display: block;
}

  
  @keyframes spin {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }
  


.container {
  max-width: 500px;
  margin: auto;
  background: #2a2a2a;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 0 10px #000;
}

h1, h2 {
  text-align: center;
  color: #fff;
}

.section {
  margin-top: 20px;
}

.field {
  margin-bottom: 15px;
}

.field label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  margin-bottom: 5px;
}

.field input {
  width: -webkit-fill-available;
  padding: 8px;
  border-radius: 8px;
  border: none;
  font-size: 16px;
}

.button-group {
  display: flex;
  gap: 10px;
}

.button-group button {
  flex: 1;
  padding: 10px;
  background: #444;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

.sellBtn.selected {
  background: #d63031;
}

.buyBtn.selected {
    background: #329239;
}

.buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.clear-btn, .copy-btn {
  flex: 1;
  padding: 10px;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.clear-btn {
  background: #f7931a;
  color: #fff;
}

.copy-btn {
  background: #329239;
  color: #fff;
}

.copy-btn:disabled,
.copy-btn:disabled:hover {
  background: #555;
  cursor: not-allowed;
  color: #ccc; /* если нужно обесцветить текст */
  border: none; /* если есть рамка */
}

button:not(:disabled):not(.selected):hover {
    opacity: 0.5;
    transition: 0.2s;

}


.toggleContainer {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
  max-width: 300px;
  margin: 0 auto 20px;
  border: 3px solid #343434;
  border-radius: 20px;
  background: #343434;
  font-weight: bold;
  color: #343434;
  cursor: pointer;
}

.toggleContainer::before {
  content: '';
  position: absolute;
  width: 50%;
  height: 100%;
  left: 0%;
  border-radius: 20px;
  background: white;
  transition: all 0.3s;
}

.toggleCheckbox:checked + .toggleContainer::before {
  left: 50%;
}

.toggleContainer div {
  padding: 10px;
  text-align: center;
  z-index: 1;
}

.toggleCheckbox {
  display: none;
}

.toggleCheckbox:checked + .toggleContainer div:first-child {
  color: white;
}

.toggleCheckbox:checked + .toggleContainer div:last-child {
  color: #343434;
}

.toggleCheckbox + .toggleContainer div:first-child {
  color: #343434;
}

.toggleCheckbox + .toggleContainer div:last-child {
  color: white;
}

.check-icon::before {
  content: "☐";
  font-size: 18px;
  color: gray;
}

.field.valid .check-icon::before {
  content: "☑️";
  color: #00ff00;
}


.tg-buttons {
    display: flex;
    gap: 10px;
  }
  
  .tg-buttons button {
    flex: 1;
  }
  

  




  .tg-btn {
    background-color: #ffffff;
    color: black;
    border: 2px solid #000000;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
  }
  
  .tg-btn.active {
    background-color: #24A1DE;
    color: white;
    /* border-color: #4caf50; */
  }
  
  .tg-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
  }
  
  .tg-modal-content {
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 300px;
  }
  
  .tg-modal-content input {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
  }
  
  .tg-modal-content button {
    padding: 10px;
    border-radius: 6px;
    color: white;
    border: none;
    cursor: pointer;
}

#tgSaveBtn{
    background-color: #329239;
}
  
#tgDeleteBtn{
    background-color: #d63031;
}


.toast {
  visibility: hidden;
  min-width: 160px;
  background-color: #000000ba;
  color: #fff;
  text-align: center;
  border-radius: 8px;
    border-color: #c9c9c9;
    border-width: 1px;
    border-style: solid;
  padding: 10px 16px;
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.toast.show {
  visibility: visible;
  opacity: 1;
}


.preview-box {
    max-width: 500px;
    margin: auto;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 10px #000;

    background-color: #f9f9f9;
    color: #333;
    margin-top: 20px;


  border: 1px solid #ccc;
  font-family: monospace;
  white-space: pre-wrap;
}




.input-with-button {
    position: relative;
    display: inline-block;
    width: 100%;
  }
  
 
  
  .dop-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    font-size: 13px;
    background-color: #333;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
  }

  .otkup-btn {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    font-size: 13px;
    background-color: #333;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
  }
  
  /* .dop-btn:hover {
    background-color: #555;
    transform: translateY(-50%) scale(1.05);
  }
  
  .dop-btn:active {
    background-color: #666;
    transform: translateY(-50%) scale(0.98);
  } */
  






.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px auto;
  max-width: 500px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background: #333;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.tab-btn:hover {
  background: #555;
}

.tab-btn.active {
  background: #24A1DE;
}





textarea {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  resize: vertical;
  font-size: 16px;
  min-height: 100px;
  background-color: #1e1e1e;
  color: #fff;
  border: 1px solid #555;
  font-family: monospace;
  box-sizing: border-box;
}

.calc-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

#calcPreview .highlight {
  color: #24A1DE;
  font-weight: bold;
}

#calc{
  margin-bottom: 30px;
}

.calc-title{
  margin-top: 0px;
}
