* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: rgba(0, 0, 0, 0.85);
  color: white;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.85);}


.container {
  max-width: 800px;
  width: 95%;
  margin: 0 auto;
  background-image: url('https://s12.gifyu.com/images/bEH5Y.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover; 
  background-attachment: fixed;

  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-backdrop-filter: blur(10px);
}

header {
  text-align: center;
  margin-bottom: 15px;
  padding: 10px;
}

header h1 {
  font-size: 1.8rem;
  margin-bottom: 5px;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.7),
    0 0 10px rgb(255, 208, 0),
    0 0 20px rgb(212, 184, 1);
  opacity: 0;
  animation: fadeInTitle 1.2s forwards 0.5s;
}

@keyframes fadeInTitle {
  to {
    opacity: 1;
  }
}

header {
  text-align: center;
  margin-bottom: 15px;
  padding: 10px;
}

header p {
  font-size: 1.8rem;
  margin-bottom: 8px;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.7),
    0 0 10px rgba(255, 255, 255, 0.2),
    0 0 20px rgba(100, 180, 255, 0.4);
}

#welcome-text {
  opacity: 0;
  transition: opacity 0.5s ease;
  text-align: center;
  font-size: 1.1em;
  color: #ddd;
  margin: 10px 0;
}

@keyframes blinkCursor {
  50% { border-right-color: transparent; }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }
  #welcome-text {
    font-size: 0.8rem;
  }
}

.chat-box {
  flex: 1;
  height: 200px;
  max-height: 400px;
  overflow-y: auto;
  padding: 15px;
  background: url('https://s12.gifyu.com/images/bEH5Y.jpg') center center no-repeat;
  background-size: cover;
  border-radius: 10px;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message {
  padding: 10px 15px;
  margin-bottom: 8px;
  border-radius: 12px;
  max-width: 75%;
  word-wrap: break-word;
  position: relative;
  display: inline-block;
  font-size: 0.95rem;
}

.user {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.bot {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.text {
  font-size: 0.95rem;
}

.chat-box::-webkit-scrollbar {
  width: 6px;
}
.chat-box::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

.input-area {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 0;
}

.input-area input {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 0px;
  font-size: 0.95rem;
  min-width: 10px;
}

#username {
  max-width: 120px;
}

#send-btn {
  background: linear-gradient(145deg, #4CAF50, #45a049); /* Gradien hijau dalam */
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  min-width: 60px;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

#send-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
 background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
 opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: -1;
filter: blur(6px);
}
#send-btn:hover::after {
  opacity: 1;
  animation: glowPulse 0.5s infinite alternate;
}

@keyframes glowPulse {
  from { filter: brightness(1); }
  to { filter: brightness(1.3); }
}

#send-btn:hover {
  background: linear-gradient(145deg, #45a049, #3d8b40);
  transform: scale(1.03);
  border-color: rgba(255, 255, 255, 0.5);
}

.emoji-btn {
  background: #555;
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-btn:hover {
  background: #666;
}

.emoji-panel {
  display: none;
  position: absolute;
  bottom: 80px;
  left: 20px;
  right: 20px;
  max-width: 760px;
  margin: 0 auto;
  background: rgba(30, 30, 40, 0.95);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 8px;
}

.emoji-panel.show {
  display: grid;
}

.emoji-item {
  font-size: 1.3rem;
  text-align: center;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.emoji-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-color-1 { background: #2d5a87; }
.user-color-2 { background: #e74c3c; }
.user-color-3 { background: #9b59b6; }
.user-color-4 { background: #f39c12; }
.user-color-5 { background: #1abc9c; }
.user-color-6 { background: #3498db; }
.user-color-7 { background: #d35400; }
.user-color-8 { background: #8e44ad; }
.user-color-9 { background: #2ecc71; }
.user-color-10 { background: #34495e; }
.user-color-11 { background: #16a085; }
.user-color-12 { background: #27ae60; }
.user-color-13 { background: #2980b9; }
.user-color-14 { background: #c0392b; }
.user-color-15 { background: #f1c40f; }
.user-color-16 { background: #e67e22; }
.user-color-17 { background: #95a5a6; }
.user-color-18 { background: #7f8c8d; }
.user-color-19 { background: #bdc3c7; }
.user-color-20 { background: #2c3e50; }
.user-color-21 { background: #e91e63; }
.user-color-22 { background: #9c27b0; }
.user-color-23 { background: #673ab7; }
.user-color-24 { background: #3f51b5; }
.user-color-25 { background: #2196f3; }
.user-color-26 { background: #009688; }
.user-color-27 { background: #4caf50; }
.user-color-28 { background: #ff9800; }
.user-color-29 { background: #ff5722; }
.user-color-30 { background: #795548; }




@media (max-width: 480px) {
  .container {
    width: 98%;
    padding: 15px;
    min-height: 100vh;
    border-radius: 12px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .chat-box {
    height: 200px;
    max-height: 300px;
    padding: 10px;
  }

  .message {
    font-size: 0.9rem;
    padding: 8px 12px;
  }

  .input-area {
    gap: 6px;
  }

  .input-area input {
    font-size: 0.9rem;
    padding: 8px 10px;
  }

  #username {
    max-width: 100px;
  }

  #send-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .emoji-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .emoji-panel {
    bottom: 70px;
    left: 10px;
    right: 10px;
    padding: 10px;
  }

  .emoji-item {
    font-size: 1.2rem;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .container {
    width: 95%;
    padding: 18px;
  }

  .chat-box {
    height: 300px;
    max-height: 400px;
  }

  .message {
    font-size: 0.95rem;
  }

  .input-area input {
    font-size: 1rem;
  }

  #send-btn {
    font-size: 1rem;
  }
}

@media (min-width: 769px) {
  .container {
    width: 800px;
    padding: 10px;
    min-height: 600px;
  }

  .chat-box {
    height: 400px;
    max-height: 500px;
  }

  .message {
    font-size: 1rem;
  }

  .input-area input {
    font-size: 1rem;
  }

  #send-btn {
    font-size: 1rem;
  }
}

@media (max-width: 414px) and (orientation: portrait) {
  .container {
}
  .chat-box {
    height: 400px;
    max-height: 500px;
  }

  .message {
    font-size: 1rem;
  }

  .input-area input {
    font-size: 1rem;
  }

  #send-btn {
    font-size: 1rem;
  }
}
@media (min-width: 1024px) {
  .container {
    width: 1000px;
  }
}