/* Reset box-sizing untuk semua div */
div {
    box-sizing: border-box;
}

/* Body */
body {
    background: black;
    font-family: 'Oswald', sans-serif;
}

/* Spacer */
.space {
    width: 100%;
    height: 150px;
}

/* Container utama */
.container2 {
    width: 65%;
    margin: auto;
}

/* Banner yang floating di bawah */
.banner-float {
    position: fixed;
    width: 100%;
    text-align: center;
    bottom: 1px;
    z-index: 9999;
}

.banner-float img {
    width: 728px;
}

/* Banner 1 */
.banner1 img {
    display: inline-block;
    width: 49%;
}

/* Floating header dan footer */
.floating-top,
.floating-bottom {
    background: transparent;
    height: auto;
    left: 0;
    padding: 0;
    position: fixed;
    text-align: center;
    width: 100%;
    z-index: 1001;
}

.floating-top {
    top: 0;
}

.floating-bottom {
    bottom: 0;
}

/* Ukuran gambar floating */
.floating-top img {
    width: 49%;
}

.floating-bottom img {
    width: 100%;
}

/* Header banner */
.headerbanner {
    padding: 10px 0;
    text-align: center;
}

.headerbanner img {
    width: 100%;
}

/* Banner top */
.banner-top img {
    width: 728px;
}

/* Bagian head */
.head {
    width: 100%;
    padding: 3px;
    background: #000;
    border: 1px solid #6f00e0;
}

/* Logo */
.logo {
    display: block;
    width: 450px;
    height: 180px;
    background: url("/img/logo-sgp.png") center no-repeat;
    background-size: 100% 100%;
    margin: auto;
}

/* Menu navigasi */
.menu {
    display: block;
    width: 100%;
    text-align: center;
    background: #6f00e0;
}

.menu a {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    color: white;
    margin: 0;
    font-size: 18px;
}

.menu a:hover {
    color: black;
}

/* Konten utama */
.content {
    width: 100%;
    border: 1px solid #6f00e0;
}

h1, h2, h3 {
    text-align: center;
}

h3 {
    font-family: Arial, sans-serif;
    margin: 40px 0;
    color: white;
    font-size: 28px;
}

.title-head {
    font-size: 24px;
    text-decoration: none;
    color: white;
}

.title-footer {
    font-size: 28px;
    text-decoration: none;
    color: white;
}

.content p {
    text-align: left;
    font-size: 16px;
    color: white;
    margin: 10px;
}

/* Iklan */
.iklan {
    width: 100%;
}

.iklan img {
    width: 100%;
}

/* Tabel styling */
.t1, .t2, .t3 {
    padding: 5px 10px;
    border: 1px solid #989898;
    background: white;
    font-size: 16px;
}

.t1 {
    width: 40%;
}

.t2, .t3 {
    width: 30%;
}

/* Responsif container */
.lassres {
    padding-top: 40px;
    width: 65%;
    margin: auto;
    box-sizing: border-box;
}

.lassres table {
    width: 100%;
    border: 1px solid white;
}

.lassres img {
    max-width: 100%;
    height: auto;
    padding-top: 1px;
}

/* Link eksternal */
.out-link {
    list-style-type: square;
    margin: 0 35px;
    color: white;
}

.out-link a {
    text-decoration: none;
    color: white;
}

a:hover {
    color: #d1243d;
}

/* Media Queries */
@media only screen and (max-device-width: 1000px) {
    .floating-top img {
        width: 100%;
    }
    .floating-bottom img {
        width: 98%;
    }
    .headerbanner img {
        width: 100%;
    }
    .container2 {
        width: 100%;
    }
    .logo {
        width: 280px;
        height: 80px;
        margin: auto;
    }
    .banner1 {
        display: block;
    }
    .banner1 img {
        display: block;
        width: 100%;
    }
    .lassres {
        width: 100%;
        margin: auto;
    }
    .lassres table {
        width: 100%;
        padding: 0;
        border: 1px solid white;
    }
    .lassres img {
        width: 100%;
        height: auto;
        padding-top: 1px;
    }
    .banner2 {
        display: block;
    }
    .banner2 img {
        display: block;
        width: 100%;
    }
    .banner {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        background: #3a3a3a;
    }
    .banner img {
        display: inline-block;
        width: 48%;
        box-sizing: border-box;
        margin: 5px;
    }
    .banner-float {
        width: 100%;
    }
    .banner-float img {
        width: 100%;
    }
    .banner-top {
        width: 100%;
    }
    .banner-top img {
        width: 100%;
    }
    h3 {
        font-size: 14px;
    }
    .title-footer {
        font-size: 14px;
    }
}

@media only screen and (max-device-width: 550px) {
    .logo {
        width: 205px;
        margin: auto;
    }
    .banner1 img {
        display: inline-block;
        width: 100%;
    }
}

/* Banner adjustments outside media queries */
.banner1 {
    display: block;
    text-align: center;
}

.banner img {
    display: block;
    width: 100%;
    margin: 0;
}

.banner-float {
    width: 100%;
}

.banner-float img {
    width: 100%;
}

/* Additional classes */
.asu {
    font-weight: 100;
}

.e1, .e2, .e3, .e4, .e5, .e6, .e7, .e8, .e9, .e0 {
    background-color: #ff4d4d;
    border-radius: 0;
    color: #fff;
}

.k1, .k2, .k3, .k4, .k5, .k6, .k7, .k8, .k9, .k0 {
    background-color: green;
    border-radius: 0;
    color: #fff;
}

.c1, .c2, .c3, .c4, .c5, .c6, .c7, .c8, .c9, .c0 {
    background-color: blue;
    border-radius: 0;
    color: #fff;
}

.a1, .a2, .a3, .a4, .a5, .a6, .a7, .a8, .a9, .a0 {
    background-color: orange;
    border-radius: 0;
    color: #fff;
}

.highlight {
    padding: 1px 4px;
    margin: 0 -4px;
}

input.cari {
    width: 50px;
    text-align: center;
    color: red;
    font-weight: 700;
    background: #f0f7f2;
}

#rb {
    background: #f03a17;
}

/* Remove fieldset default border and spacing */
fieldset {
    border: none;
    margin: 0;
    padding: 0;
    list-style: none;
    vertical-align: baseline;
}

/* Table header */
.head th {
    background: #9C1512;
    color: #fff;
}

/* Entry and comment content table cells */
.entry-content th, .entry-content td,
.comment-content th, .comment-content td {
    padding: 0 !important;
}

/* Textarea styling */
textarea {
    width: 100%;
}

/* Background for .asux */
.asux {
    background: none repeat scroll 0 0 #fff;
    color: #d7d1d1;
    font-weight: 400;
}

/* Zebra striping on table rows */
tr:nth-last-child(5n+1) {
    background: #e8e4e7 !important;
}

/* Color menu */
.colormenu-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.colormenu {
  background: #d9d9d9;
  border: 2px double #333;
  width: 796px;
  height: 30px;
  padding: 0;
  max-width: 100%;
  margin-bottom: 10px;
  z-index: 99999;
  transition: all 1s ease;
}

/* Fixed color menu */
.colormenu.fixed {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Intro table cells */
.intro td {
    background: #ffffff !important;
}

/* Default table styling */
table {
    background: #fff;
    margin: 1px;
    min-width: 500px;
}

/* Specific table header styles */
#drawing-table thead td {
    background: #0000f4 !important;
    width: 100%;
    margin-top: 10px;
}

/* Table data cells */
#drawing-table td {
    border: 1px solid #d9d9d9;
    text-align: center;
    padding: 3px 0;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: bold;
}

/* Color selector */
#color-selector .color {
    float: left;
    height: 25px;
    position: relative;
    width: 11%;
    cursor: pointer;
}

#color-selector .color.eraser {
    background: #fff;
}

#color-selector .color.Blue { background: #43a2ff; }
#color-selector .color.Aqua { background: #00F5FF; }
#color-selector .color.Teal { background: #43CD80; }
#color-selector .color.Lime { background: #01FF70; }
#color-selector .color.Yellow { background: #FFDC00; }
#color-selector .color.Orange { background: #FF851B; }
#color-selector .color.Red { background: #FF4136; }
#color-selector .color.Pink { background: #F012BE; }
#color-selector .color.Purple { background: #A23BEC; }
#color-selector .color.Silver { background: #a9a9a9; }

#color-selector .selected {
    box-shadow: inset 0 0 0 2px #000;
}

/* Buttons */
#btnSubmit {
    float: left;
    margin-top: 0;
    font-size: 9px;
    background: #000;
    color: #FFF;
    font-weight: 600;
    border: none;
    height: 25px;
    line-height: 25px;
    width: 10%;
    cursor: pointer;
    text-transform: uppercase;
}

/* Table wrapper */
#table-wrap {
    font-weight: 700;
    position: relative;
}

#table-wrap table {
    position: relative;
    z-index: 10;
}

#toggle-tracing-mode {
    display: none;
}

#html-wrap textarea {
    height: 50px;
    margin: 0 0 10px;
    overflow: auto;
    width: 100%;
}

/* Responsive tweaks */
@media (max-width: 767px) {
    #drawing-table {
        min-width: 100%;
        margin-right: -10px;
        margin-left: -10px;
    }
}

@media (max-width: 370px) {
    #drawing-table td {
        font-size: 10px;
    }
}

/* Blinking Button */
.blinking-box {
  display: block;
  width: 100%;
  max-width: 500px;
  margin: 20px auto;
  padding: 12px;
  text-align: center;
  background-color: #ffc107;
  color: #000;
  font-weight: bold;
  font-size: 18px;
  border-radius: 6px;
  cursor: pointer;
  animation: blink 1s infinite;
  border: 2px solid #ff9800;
  box-shadow: 0 0 8px #ff9800;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Modal Style */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
  overflow: auto;
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
  max-width: 600px;
  position: relative;
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 60px;
  font-weight: bold;
  color: #ff0000;
  cursor: pointer;
}

    h2 {
      text-align: center;
    }

    .button-row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;
    }

    .button-row button {
      flex: 1;
      margin: 3px;
      padding: 15px;
      font-size: 18px;
      border-radius: 6px;
      border: 1px solid #ccc;
      cursor: pointer;
    }

    .button-row button.selected {
      background-color: #a5d6a7;
      border-color: #4CAF50;
      color: black;
    }

    .input-boxes {
      display: flex;
      justify-content: space-between;
      margin: 15px 0 5px;
      gap: 5px;
    }

    .input-boxes div {
      flex: 1;
      aspect-ratio: 1 / 1;
      border: 2px solid #888;
      border-radius: 6px;
      font-size: 20px;
      text-align: center;
      line-height: 1;
      cursor: pointer;
      background-color: #f8f8f8;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .action-buttons {
      display: flex;
      justify-content: space-between;
      margin-top: 10px;
    }

    .action-buttons button {
      flex: 1;
      padding: 12px;
      font-size: 16px;
      margin: 5px;
      border-radius: 6px;
      border: none;
      cursor: pointer;
    }

    #resetBtn {
      background-color: #ccc;
    }

    #generateBtn {
      background-color: #4CAF50;
      color: white;
    }

    #message {
      text-align: center;
      margin-top: 15px;
      font-weight: bold;
      color: #555;
    }

    #output {
      margin-top: 10px;
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 6px;
      justify-items: center;
    }

    .result-box {
      padding: 8px 10px;
      border: 1px solid #999;
      border-radius: 6px;
      background-color: #f1f1f1;
      font-size: 16px;
      cursor: pointer;
      transition: background-color 0.3s;
      user-select: none;
    }

    .result-box.copied {
      background-color: #7FFF7F !important;
    }

    @media (max-width: 400px) {
      .button-row button {
        font-size: 16px;
        padding: 12px;
      }

      .result-box {
        font-size: 14px;
        padding: 6px 8px;
      }
    }
/* Generator Angka */
.buka-generator {
  position: relative;
  display: block;
  margin: -20px auto;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  color: white;
  background: #6f00e0;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  z-index: 1;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.buka-generator::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    #ff00ff,
    #00ffff,
    #ff00ff,
    #00ffff
  );
  background-size: 400%;
  z-index: -1;
  border-radius: 14px;
  animation: borderMove 4s linear infinite;
}

.buka-generator::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  border-radius: 10px;
  z-index: -1;
}

@keyframes borderMove {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 400% 50%;
  }
}
  /* POPUP OVERLAY */
  .popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99999;
  }

  /* POPUP LAYAR HP */
  .popup-phone {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 300px;
    max-width: 90%;
    transform: translate(-50%, -50%);
    background: #f2f2f2;
    padding: 20px;
    border-radius: 25px;
    z-index: 100000;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .popup-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 10px;
  }

  .popup-header button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
  }

  .screen {
    background: #000;
    color: #0f0;
    padding: 15px;
    width: 100%;
    min-height: 70px;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    justify-items: center;
  }

  .result-box {
    padding: 5px 6px;
    background: #222;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    border: 1px solid #444;
  }

  .result-box.copied {
	  color: #000;
    background-color: #7FFF7F !important;
  }

  .input-display {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    justify-content: center;
  }

  .input-display div {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 2px solid #999;
    border-radius: 6px;
    text-align: center;
    font-size: 20px;
	  display: flex;
	  align-items: center;
	  justify-content: center;
    cursor: pointer;
  }

  .keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
  }

  .keypad button {
    padding: 15px;
    font-size: 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background-color: #bebebe;
    transition: background-color 0.2s;
  }

  .keypad button.selected {
    background-color: #a5d6a7;
  }

  .keypad button:active {
    background-color: #ccc;
  }

  .wide-reset {
    grid-column: span 2;
	  color: #fff;
	  background-color: #8A0000 !important;
  }

  .wide-generate {
    grid-column: span 3;
    color: #fff;
    background-color: #4CAF50 !important;
  }

  .message {
    font-size: 14px;
    color: #555;
    margin: 10px 0;
    text-align: center;
  }