body {
  font-family: Arial, sans-serif;
  background-color: #ffffff;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  max-width: 1200px;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.power {
  position: absolute;
  top: -12px;
  left: 8%;
  transform: translateX(-50%);
  width: 36px;
  height: 20px;
  background: #c00;
  border: 2px solid #900;
  border-radius: 3px 3px 0 0;
  cursor: pointer;
  z-index: 100 !important;
  pointer-events: auto !important;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.power::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  height: 6px;
  background: #900;
  border-radius: 1px;
  transition: background 0.2s;
}

.power.on {
  background: #f00;
  border-color: #b00;
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.5),
    inset 0 1px 2px rgba(255, 255, 255, 0.3),
    0 0 8px rgba(255, 0, 0, 0.6);
}

.power.on::before {
  background: #fff;
  box-shadow: 0 0 4px #fff;
}

.calculator.off {
  pointer-events: none;
}

.calculator.off #indicator {
  color: transparent !important;
  background: #222 !important;
  text-shadow: none;
}

.calculator.off button {
  pointer-events: none;
  cursor: not-allowed;
}

.calculator-container {
  transform: scale(0.91);
  margin-top: -30px;
  display: flex;
  justify-content: center;
  width: 1000px;
}

.calculator {
  background: #000000;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  padding: 20px;
  width: 100%;
  position: relative;
  overflow: visible !important;
  box-sizing: border-box;
  padding-top: 20px;
  font-size: 16px;
}

.calculator .top-stripes {
  position: absolute;
  top: 40px;
  left: 4%;
  width: 8%;
  height: 350px;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 8px,
    #1b1b1b 8px,
    #3c3c3c 15px
  );
  pointer-events: none;
  z-index: 1;
}

.calculator .square {
  position: absolute;
  top: 40px;
  right: 4%;
  width: 80%;
  height: 350px;
  background: #1b1b1b;
  pointer-events: none;
  z-index: 1;
  pointer-events: auto;
  display: flex;
}

.calculator .square1 {
  position: absolute;
  top: 3.5em;
  right: 8%;
  font-size: 1em;       
  padding: 0.6em 1.4em;
  border-radius: 0.5em;
  background: #000000;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}


.calculator .square1::before {
  content: "Искра-111М";
  color: #626262;
  font-family: monospace;
  font-size: 1.8vw;
  white-space: nowrap;
}


.manual {
  background: #fffef9;
  border: 4px double #333;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  padding: 20px;
  width: clamp(280px, 30vw, 450px);
  font-family: 'Courier New', monospace;
  color: #000;
  height: fit-content;
  max-height: 80vh;
  overflow: hidden;
}

.manual h2 {
  color: #c00;                 
  font-size: 1.6rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 20px 0;
  border-bottom: 2px solid #c00;
  padding-bottom: 8px;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
}

.accordion-item {
  border-bottom: 1px dashed #c00; 
  margin-bottom: 10px;
}

.accordion-header {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  color: #c00;
  padding: 10px 0;
  cursor: pointer;
  transition: color 0.2s;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
}

.accordion-header:hover {
  color: #900;                 
}

.accordion-header::after {
  content: "▼";              
  float: right;
  font-size: 0.9rem;
}

.accordion-header.active::after {
  content: " ▲";              
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 10px;
  font-size: 0.95rem;
  line-height: 1.4;
  font-size: clamp(0.8rem, 1.3vw, 0.95rem);
}

.accordion-content.open {
  max-height: 400px;           
  padding: 10px;
}

.display {
  width: 97%;
  background: #222;
  color: #0f0;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  text-align: right;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 15px;
  margin: 400px 0 30px 0;
}

#indicator {
  background-color: #222;
  color: rgb(255, 145, 0);
  font-size: 1.7em;
  border: 1px solid #222;
  border-radius: 5px;
  width: 100%;
  height: 70px;              
  box-sizing: border-box;
  overflow: hidden;
  display: flex;       
  align-items: center;       
  justify-content: flex-end; 
  padding-right: 10px;
  transition: visibility 0.1s;
  visibility: visible;
  letter-spacing: 0.01em;
}

.content-wrapper{
  display: flex;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}
.keyboard-container {
  display: flex;
  gap: 15px;
  width: 100%;
}

.left-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 90px;
}

.keyboard {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  width: 100%;
}

.btn {
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 5px;
  padding: 10px;
  font-size: 1.0rem;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}

.btn_op {
  background: #b8b8b8;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  padding: 10px;
  font-size: 1.0rem;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}

.btn_red {
  background: #d62d2d;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  padding: 10px;
  font-size: 1.0rem;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}

.btn_left {
  width: 40px;
  background: #464343;
  color: #000000;
  border: none;
  border-radius: 5px;
  padding: 10px;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}

.btn_left_red {
  width: 40px;
  background: #d62d2d;
  color: #494949;
  border: none;
  border-radius: 5px;
  padding: 10px;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}

.btn#kswap{
  font-size: 1.2rem;
  padding-top: 8px;
}

.btn:hover {
  background: #bdbdbd;
}

.btn_op:hover {
  background: #969696;
}

.btn_red:hover {
  background: #b50000;
}

.btn_left:hover {
  background: #615f5f;
}

.btn_left_red:hover {
  background: #b50000;
}

.btn:active {
  background: #969696;
}

.btn_op:active {
  background: #7b7b7b;
}

.btn_red:active {
  background: #b50000;
}

.btn_left:active {
  background: #646464;
}

.btn_left_red:active {
  background: #b50000;
}

.span-2 {
  grid-column: span 2;
}

.span-21 {
  grid-row: span 2;
}

.left-button-item {
  display: flex;
  align-items: center;
  gap: 7px;
  position: relative;
}

.button-label {
  color: #363636;
  font-size: 0.9rem;
  font-weight: bold;
  white-space: nowrap;
}

.btn_left.active {
  background: rgb(78, 78, 78) !important;
  box-shadow: 0 0 10px rgb(136, 136, 136) !important;
}