/* รีเซ็ตค่าพื้นฐาน + กันสกอลล์บาร์ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Segoe UI", Tahoma, sans-serif;
}
/* สีพื้นเข้มสำรอง ใส่ที่ html อย่างเดียว (อยู่หลังสุด ไม่บังวิดีโอ) */
html { background: #04121c; }

/* ── วิดีโอเต็มจอ ── */
#bg {
  position: fixed;
  inset: 0;                       /* top/right/bottom/left = 0 → ติดขอบทุกด้าน */
  width: 100%;
  height: 100%;
  object-fit: cover;              /* ขยายเต็มจอ ตัดส่วนเกินทิ้ง ไม่บีบภาพ ไม่มีขอบดำ */
  z-index: 0;                     /* อยู่หลังสุด แต่ไม่ติดลบ (กัน body bg มาทับ) */
}

/* ── เงาขอบจางๆ (optional) ── */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 100% at 50% 40%, transparent 58%, rgba(0,0,0,.35) 100%);
}

/* ── แถบล่าง Clean UI ── */
.bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffffff;
  font-size: 18px;
  letter-spacing: 1px;
  text-shadow: 0 2px 6px rgba(0,0,0,.55);
  background: linear-gradient(to top, rgba(0,0,0,.45), transparent);
  z-index: 3;               /* บนสุด เหนือวิดีโอ+ฟอง */
}

/* ── ฟองอากาศเล็กๆ ลอยขึ้นเหมือนใต้น้ำ ── */
#bubbles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;               /* อยู่เหนือวิดีโอ แต่ใต้แถบล่าง */
}
.bub {
  position: absolute;
  bottom: -40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,
    rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.28) 45%, rgba(255,255,255,0.05) 72%);
  border: 1px solid rgba(255,255,255,0.45);
  will-change: transform;          /* บังคับใช้ GPU เคลื่อนไหวลื่น ไม่กวนวิดีโอ */
  animation: rise linear infinite;
}
@keyframes rise {
  0%   { transform: translateY(0)      translateX(0);    opacity: 0; }
  12%  { opacity: 0.85; }
  88%  { opacity: 0.7; }
  100% { transform: translateY(-110vh) translateX(24px); opacity: 0; }
}

/* ── ช่องค้นหา Google ── */
.ggl {
  position: fixed;
  top: 23%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;                 /* เหนือวิดีโอ+ฟอง */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 90%;
}
.glogo {
  font-size: 72px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 1px;
  text-shadow: 0 3px 16px rgba(0,0,0,.55);
}
.search {
  width: min(560px, 80%);
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 40px;
  padding: 15px 26px;
  box-shadow: 0 10px 34px rgba(0,0,0,.32);
}
.search svg { width: 24px; height: 24px; flex: none; }
.search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 19px;
  color: #222;
  margin-left: 14px;
}
.search input::placeholder { color: #777; }
