/* Reset dan dasar */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #000; /* fallback sementara, akan ditimpa via JS */

  background-size: cover;
  justify-content: center;
  align-items: center;
  padding-left: 1rem;
  padding-right: 1rem;
  height: calc(var(--vh, 1vh) * 100);
}

:root {
  --primary-color: #b3b1b6;
  --secondary-color: #2a2a2a;
  --accent-color: #ebe9e3;
}

.container {
  background: rgba(31, 30, 30, 0.6); /* transparan agar blur terlihat */
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 400px;
  min-width: 320px;
  color: rgb(197, 172, 30);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px); /* 🌫️ efek blur */
  -webkit-backdrop-filter: blur(12px); /* untuk Safari */
  position: relative;
  z-index: 100;
}


/* Logo & Branding */
.logo-section {
  text-align: center;
  margin-bottom: 1rem;
}

.logo-img {
  max-width: 180px;
  height: auto;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.3));
}

.tagline {
  font-size: 0.9rem;
  color: #a3a3a3;
  margin-top: -0.15rem;
  letter-spacing: 1px;
}

.landing-text {
  font-size: 1.2rem;
  color: var(--accent-color);
  font-weight: bold;
  margin-bottom: 1rem;
  text-align: center;
}

/* General Section Style */
.join-section,
.name-section,
.chat-section {
  text-align: center;
}

/* Input dan Checkbox */
input[type="text"] {
  width: 70%;
  padding: 0.8rem;
  margin: 1rem 0 0.5rem;
  border: none;
  border-radius: 20px;
  font-size: 1rem;
  outline: none;
  box-sizing: border-box;
  background-color: #111111 !important;
  color: rgb(187, 182, 186) !important;
}

label {
  font-size: 0.9rem;
  display: block;
  margin-top: 0.5rem;
}

/* Tombol Umum */
button {
  background-color: var(--primary-color);
  color: var(--secondary-color);  
  border: none;
  padding: 0.7rem 1.2rem;
  margin-top: 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
  font-weight: bold;

}

button:hover {
  background-color: #c1d31e;
}

/* Tombol khusus edit & kirim */
.chat-section header button,
.chat-section footer button {
  border-radius: 8px;
  padding: 0.6rem 1rem;
}

/* Chat Section */
.chat-section header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--primary-color);
  color: var(--secondary-color);  
  padding: 0.5rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: bold;
}

/* Chatbox */
.chatbox {
  background: #131213;
  border-radius: 10px;
  padding: 1rem;
  height: 200px;
  overflow-y: auto;
  margin-bottom: 1rem;
  text-align: left;
  scroll-behavior: smooth;
}

/* Chat Bubble */
.bubble {
  display: flex;
  flex-direction: column;
  padding: 0.8rem; /* paling ramping tanpa kelihatan sesak */
  border-radius: 10px;
  margin-bottom: 0.5rem;
  background: #2a2a2a;
  line-height: 1.2;
  gap: 0.3rem; /* jangan ada gap antar elemen */
}

.bubble .message {
  margin: 0 !important;      /* paksa hilangkan margin bawaan */
  padding: 0 !important;
  font-size: 1rem;
  line-height: 1.2;
  color: #d8cccc;
}

.bubble .message strong {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2;
  font-weight: bold;
  color: var(--accent-color);
}

.bubble .status {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.7rem;
  font-style: italic;
  line-height: 1.2;
  color: #9b9292;
}


/* Footer */
.chat-section footer {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

/* ✅ Textarea auto-expand tanpa resize manual */
.chat-section footer textarea {
  flex: 1;
  border-radius: 25px;
  padding: 0.8rem;
  font-family: 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  resize: none;
  overflow: hidden;
  box-sizing: border-box;
  min-height: 2.5rem;
  max-height: 120px;
  background: #141414;
  color: rgb(197, 197, 193);
}

/* DEFAULT (desktop & mobile) */
.toast {
  position: fixed;
  left: 50%;
  transform: translate(-50%, -20px);  /* posisi awal: sedikit naik */
  opacity: 0;
  background: rgba(0, 255, 0, 0.5);
  color: #f3f735;
  padding: 0.6rem 0.5rem;
  border-radius: 25px;
  font-size: 1rem;
  z-index: 9999;
  max-width: 90%;
  text-align: center;
  border: 2px solid #ffffff80;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#toastAlert {
  background: rgba(255, 0, 0, 0.7);
  color: #fff8e1;
  border: 2px solid #ffffff80;
}


/* Utilitas */
.hidden {
  display: none;
}

/* === Floating Particles === */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

@keyframes floatUpJS {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translateY(-120vh) scale(1);
    opacity: 0;
  }
}

.container-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  position: relative;
  z-index: 100;
}

#toastWrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none; /* supaya klik tidak mengganggu */
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 9999;
  padding: 1rem 0;
}
 

.logo-wrapper {
  position: relative;
  width: 180px;
  height: 60px;
  margin: 0 auto;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  z-index: 2;
  position: relative;
  transition: opacity 0.3s ease;
}

.hidden-logo {
  visibility: hidden;
}

.logo-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 32px;
  height: 32px;
  pointer-events: none;
}

.logo-loader::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border: 3px solid #ffd700;
  border-top: 3px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
