@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

html {
    font-family: 'Open Sans';
}

/* css/style.css */

/* Reset */
* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: rgba(255, 255, 255, 0.92);
    overflow-x: hidden;
}

/* Background layers */
.bg {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(10, 18, 40, 0.85), rgba(16, 12, 28, 0.85)),
        url("../images/bg.jpg") center/cover no-repeat;
    filter: saturate(1.1);
    transform: scale(1.02);
    z-index: -3;
}

.bg-glow {
    position: fixed;
    inset: -20%;
    background:
        radial-gradient(circle at 20% 20%, rgba(64, 160, 255, 0.22), transparent 45%),
        radial-gradient(circle at 80% 30%, rgba(255, 90, 180, 0.16), transparent 45%),
        radial-gradient(circle at 60% 80%, rgba(120, 255, 210, 0.14), transparent 50%);
    z-index: -2;
    pointer-events: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 26px 18px 60px;
}

/* Header */
.header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

h1 {
    margin: 0 0 6px;
    font-size: 34px;
    letter-spacing: -0.02em;
}

.subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 120, 120, 0.85);
    box-shadow: 0 0 18px rgba(255, 120, 120, 0.5);
    display: inline-block;
    position: relative;
    top:1px;
    right: 1px;
}

.dot.green {
    background: rgba(120, 255, 190, 0.85) !important;
    box-shadow: 0 0 18px rgba(120, 255, 190, 0.5) !important;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 10000;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 260px;
  max-width: 360px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(24, 28, 40, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
  color: rgba(255,255,255,0.92);

  transform: translateY(10px);
  opacity: 0;
  animation: toast-in 180ms ease-out forwards;
}

.toast.hide {
  animation: toast-out 160ms ease-in forwards;
}

.toast .top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.toast .msg {
  font-size: 13px;
  font-weight: 700;
  margin-top: 5px;
  overflow: hidden;
}


.toast .x {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  border-radius: 10px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 10px;
}

.toast .x:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.24);
}

@keyframes toast-in {
  to { transform: translateY(0); opacity: 1; }
}

@keyframes toast-out {
  to { transform: translateY(8px); opacity: 0; }
}



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

    .header {
        flex-direction: column;
    }
}

/* Glass cards */
.card {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    padding: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 50%, rgba(255, 255, 255, 0.10));
    opacity: 0.7;
    pointer-events: none;
    mask: linear-gradient(#000, transparent 45%);
}

.card-wide {
    margin-bottom: 16px;
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

/* Common text */
.muted {
    color: rgba(255, 255, 255, 0.68);
}

.small {
    font-size: 12px;
}

code {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.10);
    padding: 2px 6px;
    border-radius: 8px;
}

/* Rows */
.row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 12px 0;
}

/* Inputs + Select */
.input,
.select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.22);
    color: rgba(255, 255, 255, 0.92);
    outline: none;
    transition: 0.2s ease;
}

.select {
    min-width: 280px;
}

.input {
    max-width: 220px;
}

.grade-input {
    max-width: 130px;
}

.input:focus,
.select:focus {
    border-color: rgba(140, 200, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(90, 160, 255, 0.18);
}

.modal-body .input {
    max-width: 100%;
}

/* Buttons */
.btn {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(120, 170, 255, 0.22);
    color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    transition: transform 0.08s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    background: rgba(120, 170, 255, 0.30);
    border-color: rgba(255, 255, 255, 0.24);
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
}

.badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.80);
    font-size: 12px;
}

/* Output boxes */
.output {
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.26);
    border: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* Logs */
.log {
    margin-top: 8px;
    height: 220px;
    overflow: auto;
    padding: 12px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.26);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.pre {
    margin-top: 10px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.26);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    overflow: auto;
    min-height: 84px;
}

/* Footer */
.footer {
    margin-top: 18px;
    text-align: center;
}

.mt-2 {
    margin-top: 20px;
}

.blockchain-logo {
    height: 20px;
    position: relative;
    top: 4px;
}

/* --- Modal (popup login) --- */
.hidden { display: none !important; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(300px, calc(100% - 28px));
  margin: 10vh auto 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.icon-btn {
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.24);
}

.modal-body {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}
