
/* --- BASE STYLES --- */
body {
  margin: 0;
  background-color: #1e272e; 
  color: #dfe6e9; 
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  transition: background-color 0.5s ease;
  overflow: hidden; 
}

.container {
  width: 95%;
  max-width: 520px;
}

/* --- HEADER SCALING LOGIC --- */
#start-screen h1 {
  font-size: 4.5rem;
  margin-bottom: 20px;
  color: #d4af37; 
}

#game-ui h1 {
  font-size: 2.2rem; 
  margin-bottom: 10px;
  margin-top: 0;
}

/* --- GAME CONTAINERS --- */
#chat-box {
  background: #2d3436; 
  border-radius: 24px;
  padding: 20px; 
  border: 2px solid #485460;
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* NEW: Scrollable chat area for the Mission Review */
#chat {
    max-height: 380px; 
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: thin;
    scrollbar-color: #485460 transparent;
}

/* Custom scrollbar for Chrome/Safari */
#chat::-webkit-scrollbar {
    width: 6px;
}
#chat::-webkit-scrollbar-thumb {
    background: #485460;
    border-radius: 10px;
}

#score {
  font-weight: bold;
  margin-bottom: 10px;
  color: #38bdf8; 
  font-size: 1.1rem;
}

/* --- CHAT BUBBLES --- */
.message {
  padding: 10px 14px;
  margin: 8px 0;
  border-radius: 16px;
  max-width: 90%;
  line-height: 1.4;
  font-size: 1rem;
  animation: fadeIn 0.4s ease-out;
}

.bot {
  background: #3d4e5e; 
  color: #ffffff;
  border-bottom-left-radius: 4px;
}

.avatar {
  font-size: 0.8rem;
  margin-bottom: 2px;
  color: #94a3b8;
  font-weight: bold;
}

#typing {
  font-style: italic;
  color: #b2bec3;
  height: 20px;
  font-size: 0.9rem;
}

/* --- BUTTONS --- */
#buttons button {
  width: 100%;
  padding: 12px;
  margin: 6px 0;
  border-radius: 10px;
  border: 2px solid #576574;
  background: #485460;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

#buttons button:hover {
  background: #576574;
  border-color: #d4af37;
  transform: translateY(-2px);
}

.play-btn {
  background: #8b5a2b;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  padding: 20px 40px;
  border: 4px solid #d4af37;
  border-radius: 15px;
  cursor: pointer;
  text-transform: uppercase;
  margin-top: 20px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

#nextBtn {
  display: none; 
  margin: 15px auto 5px; 
  width: 220px;
  height: 60px;
  background: #8b5a2b; 
  border: 5px solid #d4af37;
  border-radius: 50px;
  color: white;
  font-size: 1.4rem;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

#restartBtn {
  background: #2D313C; 
  color: #D4AF37;
  border: 3px solid #D4AF37;
  font-size: 1.5rem;
  font-weight: bold;
  padding: 15px 30px;
  border-radius: 12px;
  display: none;
  margin: 15px auto;
  cursor: pointer;
  text-transform: uppercase;
}

/* --- LOADER STYLES (STAYING AS IS) --- */
#loader-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #1A1C23;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.buddy-id-card {
    border: 2px solid #38BDF8;
    padding: 30px;
    border-radius: 20px;
    background: #2D313C;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.scan-line {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 5px;
    background: rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 15px #38BDF8;
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% { top: 0%; }
    100% { top: 100%; }
}

.progress-container {
    width: 250px;
    height: 8px;
    background: #1A1C23;
    border-radius: 20px;
    margin-top: 25px;
}

.progress-bar {
    width: 0%; height: 100%;
    background: #D4AF37; /* Your Gold */
    border-radius: 20px;
    transition: width 0.3s ease;
}

#loading-status {
    color: #38BDF8;
    font-family: monospace;
    margin-top: 15px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}