:root{--bg:#0f1724;--card:#0b1220;--muted:#94a3b8;--accent:#06b6d4;--success:#16a34a!important;--danger:#ef4444}
    *{box-sizing:border-box;font-family:Inter,system-ui,Segoe UI,Roboto,'Helvetica Neue',Arial}
    body{margin:0;background:#1BB2E9;color:#e6eef6;min-height:100vh;display:flex;flex-direction: column;align-items:center;justify-content:center;padding:32px}
    .card{width:100%;max-width:620px;border: 1px solid #090909; background: #051c3e; border-radius:14px;box-shadow:0 10px 30px rgba(2,6,23,0.6)}
    header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
    header h1{font-size:18px;margin:0}
    header p{margin:0;color:var(--muted);font-size:13px}
    .grid{
        display:grid;/*grid-template-columns:1fr 360px; */}
    .panel{background:rgba(255,255,255,0.02);padding:14px;border-radius:10px}
    label{display:block;font-size:13px;color:var(--muted);margin-bottom:8px}
    input[type=text], textarea{width:100%;padding:10px;border-radius:8px;border:1px solid rgba(255,255,255,0.04);background:transparent;color:inherit;font-size:14px}
    input[type=text]:required{border-color:#4e4e4e}
    textarea{height:220px;resize:vertical}
    .controls{display:flex;gap:8px;margin-top:10px}
    button{background:var(--accent);color:#042027;border:0;padding:9px 12px;border-radius:8px;font-weight:600;cursor:pointer}
    button.ghost{background:transparent;border:1px solid rgba(255,255,255,0.04);color:var(--muted)}
    .result{margin-top:12px;padding:12px;border-radius:8px;font-weight:700}
    .result.success{background:linear-gradient(90deg, rgba(22,163,74,0.12), rgba(22,163,74,0.06));border:1px solid rgba(22,163,74,0.16);color:var(--success)}
    .result.danger{background:linear-gradient(90deg, rgba(239,68,68,0.08), rgba(239,68,68,0.04));border:1px solid rgba(239,68,68,0.12);color:var(--danger)}
    .hint{font-size:13px;color:var(--muted);margin-top:8px}
    .list{max-height:180px;overflow:auto;margin-top:10px;border-radius:8px;padding:8px;background:rgba(0,0,0,0.04)}
    .item{padding:8px;border-radius:6px;margin-bottom:6px;background:rgba(255,255,255,0.01);display:flex;justify-content:space-between;align-items:center}
    .item small{color:var(--muted)}
    footer{margin-top:14px;color:var(--muted);font-size:13px;text-align:center}
    @media (max-width:900px){.grid{grid-template-columns:1fr}}
/* responsive */
.vibe-container {
        max-width: 650px;
        margin: 0 auto;
        text-align: center;
        padding: 20px;
    }

    .vibe-container h1 {
        color: #FFF000;
        font-size: 48px;
        margin-top: -80px;
    }

    .vibe-container img {
        width: 100%;
        height: auto;
    }

    .barcode-img {
        width: 250px;
        max-width: 50%;
        margin-top: 10px;
    }

    #codeInput {
        width: 100%;
        max-width: 350px;
        padding: 12px;
        margin-top: 20px;
        font-size: 18px;
        border: 2px solid #ccc;
        border-radius: 8px;
        outline: none;
        text-align: center;
    }

    #codeInput:focus {
        border-color: #ffd900;
    }

    /* ---- Responsive Breakpoints ---- */
    @media (max-width: 768px) {
        .vibe-container h1 {
            font-size: 36px;
            margin-top: -40px;
        }
        .barcode-img {
            max-width: 60%;
        }
    }

    @media (max-width: 480px) {
        .vibe-container h1 {
            font-size: 30px;
            margin-top: -20px;
        }
        #codeInput {
            font-size: 16px;
            color: #090909;
        }
    }
/* Modal background */
.modal {
  display: none; /* Hidden by default */
  position: fixed; 
  z-index: 9999; 
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(15, 23, 36, 0.85); /* semi-transparent overlay */
  backdrop-filter: blur(4px);
}

/* Modal content box */


/* Modal close button (top-right X) */
.modal-close {
    margin-right: 10px;
  align-self: flex-end;
  font-size: 30px;
  cursor: pointer;
  color: var(--muted);
}

/* Modal heading */
.modal-content h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

/* Modal result content */
#modalResultArea {
  font-weight: 700;
  font-size: 14px;
}

/* Close button inside modal */
#modalCloseBtn {
  align-self: flex-end;
  background: var(--accent);
  color: #042027;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}
#modalCloseBtn:hover {
  opacity: 0.9;
}

/* Success & danger styling (same as your .result) */
.modal-success {
  background: linear-gradient(90deg, rgba(22,163,74,0.12), rgba(22,163,74,0.06));
  border: 1px solid rgba(22,163,74,0.16);
  color: var(--success);
  padding: 10px;
  border-radius: 8px;
}

.modal-danger {
  background: linear-gradient(90deg, rgba(239,68,68,0.08), rgba(239,68,68,0.04));
  border: 1px solid rgba(239,68,68,0.12);
  color: var(--danger);
  padding: 10px;
  border-radius: 8px;
}


.modal-content {
  background: var(--card);
  margin: 5% auto;
  border-radius: 14px;
  width: 95%; 
  max-width: 772px;   
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

/* Make modal full-width on small screens */
@media (max-width: 500px) {
  .modal-content {
    width: 95%;
    margin: 5% auto;
    max-width: 95%;
  }
}

/* Modal images inside modal-body */
#modalResultArea img {
  width: 100%;      /* full width of modal */
  height: auto;     /* maintain aspect ratio */
  border-radius: 12px;
  margin-bottom: 10px;
}

@media (max-width: 400px) {
  .modal-content {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    justify-content: center;
  }
  #modalResultArea img {
    border-radius: 0;
  }
}