/* Reset & layout dasar */


body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to bottom right, #ffffff, #ccc9ff);
  color: black;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* New Kanyat Button */
.top-right-btn {
  position: absolute;
  top: -120px; /* Adjust as needed */
  right: -40px; /* Adjust as needed */
  width: 40px; /* Smaller size */
  height: 40px; /* Smaller size */
  border-radius: 50%;
  background: linear-gradient(135deg, #9d6fe9 0%, #6d28d9 100%); /* Purple gradient */
  color: white;
  border: none;
  font-size: 20px; /* Adjust font size */
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  z-index: 100; /* Ensure it's above other elements */
}

.top-right-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(109,40,217,0.3);
}

.top-right-btn i {
  font-style: italic; /* Ensure the 'i' is italic */
}


/* Login Styles */
.login-container {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  max-width: 400px;
  width: 90%;
  margin: 50px auto;
  text-align: center;
}

.login-container h1 {
  color: #6d28d9;
  margin-bottom: 10px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
}

.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(109,40,217,0.3);
}

.alternative-options {
  margin-top: 25px;
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
}

.btn-google img {
  width: 20px;
  height: 20px;
}

.status-message {
  margin-top: 20px;
  padding: 10px;
  border-radius: 5px;
}

.status-message.error {
  background: #ffebee;
  color: #c62828;
}

.status-message.success {
  background: #e8f5e9;
  color: #2e7d32;
}

/* Container tengah */
.container {
  text-align: center;
  max-width: 600px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Judul */
h1 {
  font-size: 2rem;
  margin-bottom: 20px;
  animation: fadeIn 1s ease-in-out;
}

/* ... (existing styles) ... */


/* ... (rest of your existing styles) ... */

/* Avatar Dot Assistant */
#avatar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 30px auto;
  height: 60px;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  animation: bounce 1s infinite ease-in-out;
}

.dot.blue { background-color: #9d6fe9; animation-delay: 0s; }
.dot.red { background-color: #814ed3; animation-delay: 0.1s; }
.dot.yellow { background-color: #5119ac; animation-delay: 0.2s; }
.dot.green { background-color: #23005c; animation-delay: 0.3s; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Teks transkrip */
#transcript {
  margin-top: 20px;
  font-size: 18px;
  color: #000000;
  animation: fadeInUp 1s ease-out;
  min-height: 30px;
}

/* Tombol Bulat Ikonik */
#start-btn {
  width: 80px;
  height: 80px;
  margin-top: 30px;
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle, #8b5cf6 0%, #6d28d9 100%);
  color: white;
  font-size: 24px;
  cursor: pointer;
  position: relative;
  animation: pulse-btn 2s infinite;
  transition: background 0.3s ease;
}

#start-btn::before {
  content: attr(data-icon);
  position: absolute;
  top: 22%;
  left: 33%;
  font-size: 28px;
  transition: all 0.3s ease;
}

/* Ringkasan akhir */
#summary-panel {
  margin-top: 0px;
  background: #1e1b4b;
  border-left: 5px solid #8b5cf6;
  padding: 5px;
  border-radius: 12px;
  display: none;
  text-align: left;
  color: #000000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.reflection-box {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 0px;
  margin-top: 5px;
  border-left: 4px solid #6c757d;
  font-style: italic;
  line-height: 1.6;
}

#answers-summary ul {
  list-style-type: none;
  padding-left: 0;
}
#answers-summary li {
  margin-bottom: 8px;
  background: #222;
  padding: 0px;
  border-radius: 8px;
}
#answers-summary h4 {
  margin-top: 20px;
  color: #f0db4f;
}

/* Chat Container */
#chat-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: none;
  flex-direction: column;
  max-height: 100vh;
  background: white;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}

#chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Chat Bubbles */
.chat-message {
  max-width: 80%;
  padding: 0 10px;
}

.bot-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
}

.bot-bubble {
  background: #f0e9ff;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 4px;
  color: #333;
  display: inline-block;
}

.user-bubble {
  background: #6d28d9;
  color: white;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  display: inline-block;
}

#chat-input-area {
  display: flex;
  padding: 15px;
  background: #f5f3ff;
  border-top: 1px solid #e5e7eb;
}

#chat-input {
  flex: 1;
  resize: none;
  padding: 12px 15px;
  font-size: 16px;
  border-radius: 20px;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  outline: none;
  max-height: 120px;
}

#send-chat {
  margin-left: 10px;
  width: 50px;
  height: 50px;
  background: #6d28d9;
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
}

#send-chat:hover {
  background: #7c3aed;
}

#send-chat svg {
  width: 20px;
  height: 20px;
}

/* Container tombol start */
.start-btn-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 30px;
  z-index: 2; /* Pastikan di atas elemen lain */
}

/* Tombol start itu sendiri */
#start-btn {
  position: relative; /* Ubah dari absolute jika ada */
  width: 80px;
  height: 80px;
  /* margin-top: 30px; */ /* Hapus ini */
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle, #8b5cf6 0%, #6d28d9 100%);
  color: white;
  font-size: 24px;
  cursor: pointer;
  animation: pulse-btn 2s infinite;
  transition: background 0.3s ease;
  z-index: 10;
}

/* Untuk mode mobile */
@media (max-width: 500px) {
  #start-btn {
    width: 60px;
    height: 60px;
    font-size: 20px;
  }
}

/* Modal Styles */
/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: modalFadeIn 0.3s ease-out;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  max-width: 400px;
  width: 80%;
}

.mode-options {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.modal-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.modal-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

#voice-mode-btn {
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
}

#chat-mode-btn {
  background: linear-gradient(135deg, #9d6fe9 0%, #b794f4 100%);
}


/* Animasi Modal */
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#mode-selection-modal {
  animation: modalFadeIn 0.3s ease-out;
}
.narrative-container {
  background-color: #1a1a1a;
  color: white;
  padding: 30px;
  border-radius: 12px;
  white-space: pre-line;
  font-family: 'Helvetica Neue', sans-serif;
  line-height: 1.7;
}

.narrative-title {
  font-size: 22px;
  margin-bottom: 16px;
  color: #ffffff;
}

.narrative-text {
  font-size: 16px;
  color: #e0e0e0;
}

.export-btn {
  background-color: #af4c4c;
  color: white;
  padding: 12px 24px;
  margin-top: 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.export-btn:hover {
  background-color: #932f2f;
}


/* Animasi tombol pulse */
@keyframes pulse-btn {
  0% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.6);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(139, 92, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
  }
}

/* Efek fade */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsif Mobile */
@media (max-width: 500px) {
  h1 { font-size: 1.5rem; }
  #start-btn { width: 60px; height: 60px; font-size: 20px; }
  #start-btn::before { font-size: 22px; top: 26%; left: 36%; }
  
  #chat-container {
    max-height: 95%;
    transition: opacity 0.3s ease;
  }
  
  .bot-bubble, .user-bubble {
    max-width: 90%;
  }
}