/* ================= RESET ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ================= ROOT ================= */
:root {
  --header-height: 80px;
}

/* ================= BODY ================= */
body {
  margin: 0;
  min-height: 100dvh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding-top: var(--header-height);
  overflow: hidden;

  flex-direction: column;

  /* 🔥 BACKGROUND */
  background:
    radial-gradient(circle at 75% 25%, rgba(0,0,0,0.9), transparent 60%),
    radial-gradient(circle at 55% 70%, rgba(255,255,255,0.25), transparent 50%),
    linear-gradient(135deg, #0b4a84 0%, #1e5f9a 35%, #5f7f9e 65%, #8fa3b5 100%);

  color: white;
}

/* ================= HEADER ================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);

  display: flex;
  align-items: center;
  gap: 20px;

  padding: 0 30px;
  z-index: 1000;
}

/* logo */
.logo-ui {
  height: 50px;
}

.logo-bdo {
  height: 45px;
}

/* ================= CONTENT WRAPPER ================= */
#fusername {
  flex: 1;

  /* 🔥 offset dari header */
  margin-top: var(--header-height);

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;
  padding: 20px;
  font-family: 'Play', sans-serif;
}

/* ================= CENTER CONTENT ================= */
.center-content {
  width: 100%;
  max-width: 900px;
}

/* ================= TEXT ================= */
h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

h1 span {
  display: block;
}

.subtitle {
  font-size: clamp(16px, 2vw, 20px);
  opacity: 0.85;
  margin-bottom: 30px;
}

.description {
  font-size: clamp(14px, 2vw, 18px);
  opacity: 0.85;
  line-height: 1.6;
  margin-top: 30px;
}

/* ================= FORM ================= */
.center-content p {
  margin: 10px 0;
}

.center-content input {
  height: 55px;
  width: 260px;

  border-radius: 10px;
  border: none;
  padding: 0 15px;
  font-size: 16px;

  margin-right: 10px;
}

.center-content button {
  height: 55px;
  padding: 0 25px;

  border-radius: 10px;
  border: none;
  cursor: pointer;

  font-size: 16px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .header {
    padding: 0 15px;
  }

  .logo-ui {
    height: 40px;
  }

  .logo-bdo {
    height: 35px;
  }

  .center-content input {
    width: 100%;
    margin: 10px 0;
  }

  .center-content button {
    width: 100%;
  }
}

.header::after {
  content: "";
  height: 40px;
  width: 2px;
  background: rgba(255,255,255,0.5);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;

  background: radial-gradient(
    circle at 60% 60%,
    rgba(255,255,255,0.15),
    transparent 50%
  );

  pointer-events: none;
}

.session-badge {
  position: fixed;
  left: 14px;
  bottom: 12px;
  z-index: 1100;
  max-width: min(320px, calc(100vw - 28px));
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(5, 12, 24, 0.64);
  color: rgba(255, 255, 255, 0.82);
  font: 12px/1.2 Arial, sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.session-badge[hidden] {
  display: none;
}

.loading-screen {
  position: fixed;
  inset: 0;
  background: #0b0f1a;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  color: white;
  font-family: sans-serif;
}

.loading-box {
  width: 300px;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
  margin-top: 10px;
  overflow: hidden;
}

#progress-fill {
  width: 0%;
  height: 100%;
  background: #00c3ff;
  transition: width 0.3s ease;
}
.custom-alert {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.alert-box {
  background: #111827;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  color: white;
  min-width: 300px;
}

.alert-box button {
  margin-top: 15px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #00c3ff;
  color: black;
  cursor: pointer;
}
/* background masih salah*/
/* APP WRAPPER */
.app-wrapper {
  position: relative;

  width: 900px;
  height: 506px;
}
.bg {
  position: absolute;
  inset: 0;

  pointer-events: none; /* tetap aman */
  background-size: 100% 100%;
}
/* content */
.content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

/* button */
#prev-btn,#next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%); /* 🔥 ini center */
}     
#prev-btn {
  left: -65px;      /* geser kiri dari tengah */
}
#next-btn {
  right: -65px;      /* geser kiri dari tengah */
}     
.nav-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  position: relative;
      
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(6px);
}  
/* panah */
.nav-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;

  border: solid white;
  border-width: 0 3px 3px 0;

  transform: translate(-50%, -50%) rotate(45deg);
}

/* next (kanan) */
.next::before {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* prev (kiri) */
.prev::before {
  transform: translate(-50%, -50%) rotate(135deg);
}
button {
  padding: 12px 24px;
  font-size: 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  color: white;
  backdrop-filter: blur(10px);
  transition: 0.2s;
}

button:hover {
  transform: scale(1.05);
  background: rgba(255,255,255,0.2);
}

/* START */
#start-screen {
  text-align: center;
  margin-top: 450px;
}

#start-btn {
  font-size: 22px;
  padding: 10px 20px;
  cursor: pointer;
}
#username,
#start-btn {
  height: 36px;          /* 🔥 kunci utama */
  font-size: 20px;
  border-radius: 12px;
  border: none;
  padding: 0 20px;       /* horizontal saja */
  box-sizing: border-box;
}
/* GRID */
.grid-box {
  position: absolute;
  inset: 0;
  //max-width: 900px;
  //margin: 150px auto;

  background: linear-gradient(145deg, #0f172a, #020617);

  border: 1px solid rgba(0, 200, 255, 0.3);
  border-radius: 14px;

  box-shadow:
    0 0 10px rgba(0,200,255,0.4),
    0 0 30px rgba(0,200,255,0.2),
    inset 0 0 10px rgba(255,255,255,0.05);

  color: #e0f7ff;
}
.grid {
  display: grid;
  grid-template-columns: 120px repeat(4, 140px);
  grid-template-rows: 140px 140px 40px 140px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  position: relative;
}

/* ROW 1 */
#ref1 { grid-row: 1; grid-column: 2; }
#ref2 { grid-row: 1; grid-column: 3; }
#ref3 { grid-row: 1; grid-column: 4; }
#ref4 { grid-row: 1; grid-column: 5; }

/* ROW 2 */
#drop1 { grid-row: 2; grid-column: 2; }
#drop2 { grid-row: 2; grid-column: 3; }
#drop3 { grid-row: 2; grid-column: 4; }
#drop4 { grid-row: 2; grid-column: 5; }

/* ROW 4 */
#stimulus-slot {
  grid-row: 4;
  grid-column: 1;
}
#stimulus-moved {
  transition: all 0.3s ease;
}

/* CARD */
.ref, #stimulus {
  width: 120px;
  height: 120px;
  background: #fff;
  border: 2px solid #999;
  display: flex;
  justify-content: center;
  align-items: center;
}

//.ref.selected {
//  outline: 3px solid #3498db;
//  border-radius: 8px;
//}
.ref {
  cursor: pointer;
}

/* DROP */
.drop {
  width: 120px;
  height: 120px;
  background: transparent;
}

/* ===== FEEDBACK ===== */
#feedback-overlay {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;

  font-weight: bold;
  font-size: 18px;
  text-align: center;

  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(10px);
}
#feedback-overlay.show {
  opacity: 1;
  transform: translateY(0);
}

/* warna status */
.feedback-correct {
  color: #2ecc71; /* hijau */
}

.feedback-wrong {
  color: #e74c3c; /* merah */
}

.feedback-timeout {
  color: #f39c12; /* orange */
}

#drop0, #drop1, #drop2, #drop3 {
  position: relative; /* WAJIB */
}



/* ================= REPORT MODE ================= */
#report {
  display: none;

  position: fixed;
  inset: 0;

  background: linear-gradient(135deg, #eef2f7, #dce6f2);

  justify-content: center;
  align-items: center;

  z-index: 999;
}

/* CARD */
.report {
  width: 100%;
  max-width: 700px;

  padding: 40px;

  background: white;
  border-radius: 20px;

  box-shadow: 0 25px 50px rgba(0,0,0,0.15);

  text-align: left;
  color: green;
  font-size: larger;
}

/* ROW */
.report .row {
  display: grid;
  grid-template-columns: 1fr auto auto;

  padding: 12px 0;
  border-bottom: 1px solid #eee;

  font-size: 16px;
}

/* BUTTON */
.download-btn {
  margin-top: 25px;
  padding: 14px 22px;

  border: none;
  border-radius: 10px;

  background: #4f46e5;
  color: white;

  font-weight: bold;
  cursor: pointer;
}
/* ALIGN */
.grid > div {
  justify-self: center;
  align-self: center;
}
/* container full screen */
#finish-screen {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
//  background: url("/images/background7.jpg") center/cover no-repeat;
  align-items: center;
  z-index: 999;
}

/* box tengah (yang hitam) */
.finish-content {
  background: rgba(0,0,0,0.9);  /* 🔥 hitam */
  color: white;
  padding: 50px 80px;
  border-radius: 16px;
  text-align: center;
  font-size: 32px;

  box-shadow: 0 0 30px rgba(0,0,0,0.6);
}


/* teks */
.finish-content h1 {
  font-size: 48px;
  color: white;
  margin: 0;

  text-align: center;

  /* optional biar kontras */
  text-shadow: 0 4px 10px rgba(0,0,0,0.7);
}
