:root { font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
body { margin: 0; background: #0b0f19; color: #e8eefc; min-height: 100vh; }
.wrap { max-width: 920px; margin: 0 auto; padding: 24px; }
h1 { margin: 0 0 16px; }
.card { background: #111a2e; border: 1px solid #223055; border-radius: 14px; padding: 16px; margin: 12px 0; }
label { display:block; margin: 8px 0 6px; opacity: .9; }
input, textarea, button { width: 100%; box-sizing: border-box; margin: 6px 0; border-radius: 10px; border: 1px solid #2a3a66; background: #0c1326; color: #e8eefc; padding: 10px; }
button { cursor: pointer; background: #2447ff; border: 0; font-weight: 600; }
button:disabled { opacity: .5; cursor: not-allowed; }
.row { display:flex; gap: 10px; }
.row button { width: 50%; }
.status { margin-top: 8px; opacity: .85; }
.transcript pre { background: #0a1022; border: 1px solid #223055; padding: 12px; border-radius: 10px; overflow:auto; max-height: 280px; }
.foot { opacity: .8; margin-top: 10px; }

/* Login Page Specifics */
.login-wrap {
  display: flex;
  align-items: flex-start; /* Align to top */
  justify-content: center;
  min-height: 100vh;
  padding: 8vh 20px 20px; /* Add top padding to move it down slightly, preserve side padding */
  background: radial-gradient(circle at top right, #1a2642 0%, #0b0f19 60%);
}

.login-card {
  background: #111a2e;
  border: 1px solid #223055;
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.login-card h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #fff, #a0aec0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-card h2 {
  font-size: 1rem;
  color: #a0aec0;
  margin-bottom: 30px;
  font-weight: 400;
}

.login-card label {
  text-align: left;
  font-size: 0.9rem;
  color: #cbd5e0;
  margin-bottom: 8px;
  font-weight: 600;
}

.login-card input {
  background: #080c17;
  border: 1px solid #2a3a66;
  padding: 12px 15px;
  font-size: 1rem;
  margin-bottom: 20px;
  transition: all 0.2s;
}

.login-card input:focus {
  border-color: #2447ff;
  box-shadow: 0 0 0 3px rgba(36, 71, 255, 0.2);
  outline: none;
}

.login-card button {
  margin-top: 10px;
  padding: 14px;
  font-size: 1.05rem;
  background: linear-gradient(135deg, #2447ff 0%, #1a36cc 100%);
  transition: transform 0.1s;
}

.login-card button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(36, 71, 255, 0.3);
}

.login-card button:active {
  transform: translateY(0);
}

/* Stepper */
.stepper-container {
  background: #0d121f;
  border-bottom: 1px solid #223055;
  padding: 15px 0;
  margin-bottom: 20px;
}
.stepper {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
/* Progress Line Background */
.stepper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: #223055;
  z-index: 0;
  transform: translateY(-50%);
}
.step-item {
  position: relative;
  z-index: 1;
  background: #0d121f;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #6b7280;
  cursor: pointer;
}
.step-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #1f2937;
  border: 2px solid #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s;
}
.step-label {
  font-size: 12px;
  font-weight: 600;
}

/* Completed Step */
.step-item.completed .step-circle {
  background: #2447ff;
  border-color: #2447ff;
  color: #fff;
}
.step-item.completed .step-label {
  color: #e8eefc;
}

/* Active/Current Step */
.step-item.current .step-circle {
  border-color: #2447ff;
  color: #fff;
  box-shadow: 0 0 10px rgba(36, 71, 255, 0.4);
}
.step-item.current .step-label {
  border-color: #2447ff;
  color: #e8eefc; /* Changed from #2447ff to match completed text */
  box-shadow: 0 0 10px rgba(36, 71, 255, 0.4);
}

/* User Icon and Dropdown */
.user-menu-container {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

#nav-user-icon {
  text-decoration: none;
  color: #a0aec0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1f2937;
  border: 1px solid #374151;
  transition: all 0.2s;
  cursor: pointer;
}

#nav-user-icon:hover, #nav-user-icon.active {
  background: #2447ff;
  color: #fff;
  border-color: #2447ff;
}

.user-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  width: 220px;
  background: #1a2642;
  border: 1px solid #2a3a66;
  border-radius: 10px;
  padding: 15px;
  display: none; /* Hidden by default */
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  z-index: 100;
  animation: fadeIn 0.2s ease-out;
}

.user-dropdown.show {
  display: flex;
}

.user-email {
  font-size: 0.9rem;
  color: #e8eefc;
  word-break: break-all;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #2a3a66;
  margin-bottom: 5px;
}

.user-dropdown button {
  width: 100%;
  padding: 8px;
  background: #e53e3e;
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.user-dropdown button:hover {
  background: #c53030;
}

/* Memo Page Styles */
#memoText {
  font-family: 'Segoe UI', Roboto, sans-serif;
  font-size: 1.1rem;
  line-height: 1.6;
  background: #080c17;
  border: 1px solid #2a3a66;
  padding: 20px;
  border-radius: 12px;
  resize: vertical;
  transition: border-color 0.2s;
}
#memoText:focus {
  outline: none;
  border-color: #2447ff;
  box-shadow: 0 0 0 2px rgba(36, 71, 255, 0.2);
}

.status-banner {
  animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Make instructions cleaner */
.card p {
  color: #a0aec0;
  line-height: 1.5;
}
.card label {
  color: #e8eefc;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

/* --- Interview Chat UI --- */

/* Chat Container */
#chatContainer {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  background: #080c17; /* Darker background for contrast */
  border: 1px solid #223055;
  border-radius: 12px;
  height: 400px; /* Fixed height for scroll */
  overflow-y: auto;
  margin-bottom: 20px;
}

/* Chat Bubbles */
.chat-bubble {
  max-width: 80%;
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 1rem;
  line-height: 1.5;
  position: relative;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.chat-bubble.ai {
  align-self: flex-start;
  background: #1f2937; /* Dark gray for AI */
  color: #e8eefc;
  border-bottom-left-radius: 4px;
}

.chat-bubble.student {
  align-self: flex-end;
  background: #2447ff; /* Brand Blue for Student */
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Speaker Label (Optional) */
.bubble-label {
  font-size: 0.75rem;
  margin-bottom: 4px;
  opacity: 0.7;
  font-weight: 600;
  display: block;
}

/* Controls Area */
.controls-area {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  padding-top: 10px;
}

/* Big Mic Button */
.big-mic-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #2447ff;
  border: 4px solid #1a2642;
  box-shadow: 0 0 0 4px #2447ff; /* Double border effect */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0; /* Hide text, use icon or change on hover */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z'%3E%3C/path%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'%3E%3C/path%3E%3Cline x1='12' y1='19' x2='12' y2='23'%3E%3C/line%3E%3Cline x1='8' y1='23' x2='16' y2='23'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.big-mic-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 6px #4f4; /* Green glow on hover */
  border-color: #1a2642;
}

.big-mic-btn.recording {
  background-color: #e53e3e;
  box-shadow: 0 0 0 4px #e53e3e, 0 0 20px #e53e3e; /* Red glow */
  animation: pulse 1.5s infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='white' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='6' width='12' height='12'%3E%3C/rect%3E%3C/svg%3E"); /* Stop square */
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 4px #e53e3e; }
  50% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(229, 62, 62, 0.4); }
  100% { transform: scale(1); box-shadow: 0 0 0 4px #e53e3e; }
}

.big-btn-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #cbd5e0;
  margin-top: -5px;
}

/* Secondary Button */
.secondary-btn {
  background: transparent;
  border: 1px solid #4a5568;
  color: #a0aec0;
  padding: 10px 20px;
  max-width: 200px;
}
.secondary-btn:hover {
  border-color: #cbd5e0;
  color: #fff;
}