
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #eaf0f8;
  color: #172b4d;
}

header {
  background: #142b50;
  color: white;
  padding: 18px;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 24px;
}

header p {
  margin: 7px 0 0;
  color: #cbd8ed;
}

.container {
  max-width: 1150px;
  margin: 22px auto;
  padding: 12px;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

select, button {
  border: 0;
  border-radius: 7px;
  padding: 11px 15px;
  font-weight: bold;
  cursor: pointer;
}

select {
  background: white;
  border: 1px solid #cbd5e1;
}

button {
  background: #2563eb;
  color: white;
}

button:hover {
  filter: brightness(.92);
}

button.danger {
  background: #dc3545;
}

button.gray {
  background: #52647d;
}

button.green {
  background: #16834b;
}

.main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.panel {
  background: white;
  border: 1px solid #d5deeb;
  border-radius: 12px;
  padding: 17px;
  box-shadow: 0 3px 12px #142b5010;
}

.panel h2 {
  font-size: 18px;
  margin: 0 0 14px;
  color: #173b70;
}

.display {
  background: #101c2b;
  color: #62f6a5;
  border-radius: 8px;
  min-height: 75px;
  padding: 16px;
  font-family: monospace;
  font-size: 25px;
  letter-spacing: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.lcd-main {
  min-width: 0;
  flex: 1;
}

.lcd-heading,
.lcd-values {
  display: grid;
  grid-template-columns: auto auto auto auto;
  align-items: center;
  gap: 8px;
}

.lcd-heading {
  color: #b8c7dc;
  font-size: 11px;
  letter-spacing: 1px;
}

.lcd-heading span:first-child {
  grid-column: 1 / 4;
}

.lcd-heading span:last-child {
  text-align: center;
}

.lcd-values {
  margin-top: 5px;
  font-size: 22px;
  letter-spacing: 2px;
}

.lcd-values span:last-child {
  text-align: center;
}

.status {
  font-size: 13px;
  color: #b8c7dc;
  letter-spacing: 0;
  margin-left: 12px;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
}

.keypad button {
  min-height: 48px;
  background: #e8eef8;
  color: #173b70;
  border: 1px solid #cbd5e1;
  font-size: 15px;
}

.keypad button.action {
  background: #173b70;
  color: white;
}

.keypad button.enter {
  background: #16834b;
  color: white;
}

.keypad button.reset {
  background: #dc3545;
  color: white;
}

.info {
  margin-top: 12px;
  padding: 10px;
  background: #f0f5fc;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.7;
}

.memory {
  height: 260px;
  overflow: auto;
  background: #101c2b;
  color: #b8f5ce;
  padding: 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 14px;
}

.memory-row {
  padding: 4px 2px;
  border-bottom: 1px solid #26384d;
}

.memory-row.active {
  background: #254d76;
  color: white;
}

.hardware-panel {
  grid-column: 1 / -1;
}

.hardware {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.device {
  background: #f3f6fb;
  border: 1px solid #d8e1ed;
  border-radius: 9px;
  padding: 14px;
  text-align: center;
}

.device h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.matrix {
  width: 176px;
  height: 176px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  background: #1c2939;
  padding: 9px;
  border-radius: 8px;
}

.pixel {
  border-radius: 50%;
  background: #526071;
}

.pixel.orange {
  background: #ff8c27;
  box-shadow: 0 0 7px #ff8c27;
}

.pixel.green {
  background: #20df77;
  box-shadow: 0 0 7px #20df77;
}

.seven {
  width: 145px;
  height: 190px;
  margin: auto;
  background: #17202d;
  border-radius: 8px;
  padding: 15px;
  position: relative;
}

.seg {
  position: absolute;
  background: #394352;
  border-radius: 5px;
}

.seg.on {
  background: #ff3d48;
  box-shadow: 0 0 8px #ff3d48;
}

.seg.a, .seg.g, .seg.d {
  width: 65px;
  height: 9px;
  left: 40px;
}

.seg.a { top: 15px; }
.seg.g { top: 88px; }
.seg.d { top: 161px; }

.seg.b, .seg.c, .seg.e, .seg.f {
  width: 9px;
  height: 65px;
}

.seg.b { top: 22px; right: 25px; }
.seg.c { top: 95px; right: 25px; }
.seg.e { top: 95px; left: 25px; }
.seg.f { top: 22px; left: 25px; }

.runlog {
  margin-top: 12px;
  padding: 10px;
  border-radius: 7px;
  background: #f0f5fc;
  min-height: 42px;
  font-size: 13px;
}

@media (max-width: 750px) {
  .main {
    grid-template-columns: 1fr;
  }

  .hardware {
    grid-template-columns: 1fr;
  }

  .keypad {
    gap: 5px;
  }

  .keypad button {
    padding: 8px 2px;
    font-size: 13px;
  }
}


.memory-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
  font-size: 13px;
  font-weight: bold;
}

.memory-actions button {
  padding: 9px 12px;
  font-size: 12px;
}

.memory-row {
  padding: 7px 5px;
  border-bottom: 1px solid #26384d;
  cursor: pointer;
}

.memory-row:hover {
  background: #263f5d;
}

.memory-row.active {
  background: #254d76;
  color: white;
}

.memory-row.selected {
  background: #a33b35;
  color: white;
  outline: 2px solid #ff7770;
}





/* FOUR LED DISPLAY */

.led-panel {
  background: #f3f6fc;
  border: 1px solid #d8e2f0;
  border-radius: 12px;
  padding: 25px;
  margin-top: 20px;
  text-align: center;
  grid-column: 1 / -1;
}

.led-panel h3 {
  color: #193b68;
  margin-bottom: 30px;
}

.led-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 55px;
  flex-wrap: wrap;
}

.led-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-weight: bold;
  color: #193b68;
}

.led-bulb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #536174;
  border: 4px solid #344256;
  box-shadow: inset 0 0 8px #1e293b;
  transition: 0.15s ease;
}

/* LED ON */

.led-bulb.on {
  background: #ff3838;
  border-color: #ff7777;
  box-shadow:
    0 0 10px #ff3838,
    0 0 25px rgba(255, 56, 56, 0.7),
    inset 0 0 8px white;
}

#ledInfo {
  margin-top: 25px;
  color: #193b68;
  font-weight: 600;
}

@media (max-width: 600px) {
  .led-container {
    gap: 25px;
  }

  .led-bulb {
    width: 40px;
    height: 40px;
  }
}




.lcd-main {
  width: 100%;
  font-family: monospace;
}

.lcd-heading,
.lcd-values {
  display: grid;
  grid-template-columns: 1fr 15px 1fr 1fr;
  align-items: center;
  text-align: center;
}

.lcd-heading {
  color: #b8c7dc;
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.lcd-values {
  color: #62f6a5;
  font-size: 23px;
  font-weight: bold;
  letter-spacing: 1px;
}

#dataDisplay {
  text-align: right;
}

.display {
  gap: 8px;
}

@media (max-width: 450px) {
  .lcd-values {
    font-size: 17px;
  }

  .status {
    font-size: 10px;
  }
}


/* Footer Design */

.site-footer {
    background: #142c50;
    color: #dbeafe;
    text-align: center;
    padding: 15px 15px;
    margin-top: 40px;
    font-family: 'Inter', sans-serif;
}

.site-footer p {
    font-size: 15px;
    margin-bottom: 8px;
}

.site-footer a {
    color: #60a5fa;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s ease;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.site-footer span {
    font-size: 12px;
    color: #b8c7dc;
}

@media (max-width: 600px) {
    .site-footer {
        padding: 20px 10px;
    }

    .site-footer span {
        font-size: 11px;
    }
}

.author-role {
    color: #dbeafe;
    font-weight: 500;
}









