:root {
  --green: #006b4e;
  --green-deep: #004937;
  --green-darker: #003628;
  --gold: #f7b619;
  --ink: #092a20;
  --muted: #577369;
  --paper: #ffffff;
  --bubble-ai: #edf5f1;
  --line: #e2ece7;
  --shadow: 0 12px 36px rgba(0, 35, 25, 0.22);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--green-deep);
  background: linear-gradient(175deg, #003d2e 0%, #004937 40%, #005941 100%);
  color: var(--paper);
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 860px;
  margin: 0 auto;
}

/* Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}

.brand-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand {
  color: #ffffff;
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-sub {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quiet-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.quiet-button:hover, .quiet-button:active {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
}

/* Compact 4-Step Prep Navigation */
.step-nav {
  padding: 4px 12px 10px;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.step-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 38px;
  padding: 2px 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: rgba(0, 38, 28, 0.35);
  color: #e3efe9;
  font: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
}

.step-num {
  width: 20px;
  height: 20px;
  min-width: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  transition: all 0.18s ease;
}

.step-text {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.45);
}

.step-btn.active {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(247, 182, 25, 0.2);
}

.step-btn.active .step-num {
  background: var(--gold);
  color: var(--green-darker);
  border-color: var(--gold);
}

.step-btn.active .step-text {
  color: #ffffff;
}

/* Handshake Research Banner */
.handshake-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 12px 10px;
  padding: 8px 14px;
  background: rgba(0, 36, 26, 0.45);
  border: 1px solid rgba(247, 182, 25, 0.35);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  text-align: center;
  flex-wrap: wrap;
}

.handshake-text {
  font-size: 13px;
  font-weight: 600;
  color: #e3efe9;
  letter-spacing: -0.2px;
}

.handshake-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.handshake-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold);
  color: var(--green-darker);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.handshake-btn:hover {
  background: #ffc433;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(247, 182, 25, 0.35);
}

.handshake-btn:active {
  transform: translateY(0);
}

.handshake-btn-secondary {
  background: #ffffff;
  color: var(--green-darker);
  border: 1px solid rgba(247, 182, 25, 0.6);
}

.handshake-btn-secondary:hover {
  background: #fdf6e2;
  border-color: var(--gold);
}

/* Main Content Workspace */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 12px;
}

/* Desktop Hero banner (hidden on mobile) */
.desktop-hero {
  display: none;
}

/* Coach Chat Panel */
.coach-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 480px;
}

.coach-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
}

.coach-head img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--green);
}

.coach-info {
  flex: 1;
  min-width: 0;
}

.coach-name {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.mode-label {
  margin: 1px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.status {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  background: #edf7f2;
  padding: 4px 9px;
  border-radius: 12px;
  border: 1px solid #cbe6db;
}

/* Messages */
.messages {
  flex: 1;
  min-height: 260px;
  max-height: calc(100vh - 310px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  max-width: 90%;
  padding: 12px 15px;
  border-radius: 16px;
  line-height: 1.48;
  font-size: 14.5px;
  white-space: pre-wrap;
  word-break: break-word;
}

.message.assistant {
  background: var(--bubble-ai);
  color: var(--ink);
  align-self: flex-start;
  border-top-left-radius: 4px;
  border: 1px solid #e1eee7;
}

.message.user {
  background: var(--green);
  color: #ffffff;
  align-self: flex-end;
  border-top-right-radius: 4px;
}

.message small {
  display: block;
  margin-bottom: 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* Suggested Prompts */
.suggestions-wrap {
  padding: 4px 14px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.suggestions {
  display: flex;
  gap: 7px;
  flex-wrap: nowrap;
}

.suggestions button {
  border: 1px solid #9dc4b6;
  border-radius: 16px;
  background: #f7faf8;
  color: var(--green-deep);
  padding: 7px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.suggestions button:hover, .suggestions button:active {
  background: #eaf3ef;
  border-color: var(--green);
}

/* Voice Practice Panel (Mode 3: Practice) */
.voice-practice-panel {
  margin: 10px 14px 12px;
  padding: 14px 16px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.voice-practice-panel[hidden] {
  display: none !important;
}

.voice-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.voice-panel-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.voice-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
  color: #065f46;
  background: #d1fae5;
  padding: 4px 10px;
  border-radius: 999px;
}

.voice-hint {
  font-size: 12px;
  color: #047857;
  font-weight: 600;
}

.voice-status-badges {
  display: flex;
  align-items: center;
}

.mic-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #047857;
  padding: 3px 8px;
  background: #ffffff;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
}

.mic-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
}

.mic-dot.recording {
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: mic-pulse 1.2s infinite;
}

@keyframes mic-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.waveform-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 10px;
}

.waveform {
  display: flex;
  align-items: center;
  gap: 3.5px;
  height: 28px;
  flex: 1;
}

.waveform-bar {
  width: 4px;
  height: 6px;
  background-color: #10b981;
  border-radius: 2px;
  transition: height 0.12s ease;
}

.waveform.active .waveform-bar:nth-child(2n) { animation: voice-wave 1.1s ease-in-out infinite alternate; }
.waveform.active .waveform-bar:nth-child(3n) { animation: voice-wave 0.75s ease-in-out infinite alternate; }
.waveform.active .waveform-bar:nth-child(5n) { animation: voice-wave 1.4s ease-in-out infinite alternate; }

@keyframes voice-wave {
  0% { height: 6px; }
  100% { height: 26px; }
}

.voice-timer {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #065f46;
  white-space: nowrap;
}

.voice-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 600px) {
  .voice-controls {
    grid-template-columns: 1fr;
  }
}

.btn-voice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.voice-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  font-weight: 800;
}

.btn-voice-record {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  border-color: #047857;
}

.btn-voice-record:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-voice-stop {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.btn-voice-stop:hover:not(:disabled) {
  background: #fecaca;
}

.btn-voice-send {
  background: linear-gradient(135deg, #006b4e 0%, #004d38 100%);
  color: #ffffff;
  border-color: #003828;
}

.btn-voice-send:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-voice:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.voice-status-text {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #065f46;
  min-height: 16px;
}

.voice-status-text.error {
  color: #b91c1c;
}

.voice-status-text.working {
  color: #0284c7;
}

/* Chat Here Section Header */
.chat-here-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px 4px;
  background: #ffffff;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.chat-here-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--green-deep);
  letter-spacing: -0.2px;
}

.chat-here-hint {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

/* Composer Form */
.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 14px 14px;
  background: #ffffff;
}

textarea#message-input {
  flex: 1;
  height: 44px;
  min-height: 44px;
  max-height: 90px;
  padding: 11px 14px;
  border: 1.5px solid #a8c7bd;
  border-radius: 20px;
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  line-height: 1.35;
  resize: none;
  background: #fafcfb;
}

textarea#message-input:focus {
  outline: none;
  border-color: var(--green);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 107, 78, 0.15);
}

.composer button {
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 22px;
  background: var(--green);
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.1s ease;
}

.composer button:hover {
  background: var(--green-darker);
}

.composer button:active {
  transform: scale(0.97);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* Bottom Footer with AI Portfolio Button */
.app-footer {
  padding: 16px 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.portfolio-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.portfolio-btn:hover, .portfolio-btn:active {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.6);
}

.footer-privacy {
  margin: 0;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.65);
}

/* Tablet & Desktop Enhancements */
@media (min-width: 860px) {
  .app-container {
    padding: 0 20px;
  }

  .topbar {
    padding: 20px 0 14px;
  }

  .brand {
    font-size: 26px;
  }

  .step-nav {
    padding: 6px 0 16px;
  }

  .step-list {
    gap: 12px;
  }

  .step-btn {
    height: 44px;
    padding: 4px 12px;
    gap: 8px;
  }

  .step-num {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .step-text {
    font-size: 14px;
  }

  .main-content {
    padding: 0;
    gap: 18px;
  }

  .desktop-hero {
    display: block;
    position: relative;
    height: 180px;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

  .desktop-hero:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 38, 28, 0.85), rgba(0, 38, 28, 0.15) 70%);
  }

  .desktop-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .hero-copy {
    position: absolute;
    z-index: 1;
    left: 28px;
    bottom: 22px;
    max-width: 540px;
  }

  .hero-copy h1 {
    margin: 0 0 6px;
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: -0.5px;
  }

  .hero-copy p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #e0eee8;
  }

  .coach-panel {
    min-height: 520px;
  }

  .messages {
    max-height: 420px;
    padding: 20px;
  }

  .suggestions {
    flex-wrap: wrap;
  }
}

/* Feedback Controls */
.answer-feedback {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(246, 247, 244, 0.85);
  border: 1px solid var(--line);
}

.feedback-prompt {
  margin: 0 0 6px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

.feedback-controls,
.feedback-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feedback-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.feedback-button:hover:not(:disabled) {
  border-color: var(--green);
  background: #f0fdf4;
}

.feedback-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.feedback-up {
  color: #15803d;
}

.feedback-down {
  color: #b91c1c;
}

.feedback-submit {
  background: var(--green);
  color: #ffffff;
  border-color: var(--green);
}

.feedback-submit:hover:not(:disabled) {
  background: var(--green-deep);
  color: #ffffff;
}

.feedback-form {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.feedback-form[hidden] {
  display: none;
}

.feedback-form label {
  display: block;
  margin: 6px 0 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.feedback-form textarea {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: #ffffff;
  resize: vertical;
}

.feedback-form textarea:focus {
  outline: none;
  border-color: var(--green);
}

.feedback-warning {
  margin: 5px 0 8px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.feedback-status {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.feedback-status.feedback-success {
  color: #15803d;
}

.feedback-status.feedback-error {
  color: #b91c1c;
}

/* Career Mentor Callout */
.mentor-callout {
  margin: 16px 12px 12px;
  padding: 16px 20px;
  background: #ffffff;
  border: 2px solid #f97316;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22), 0 2px 12px rgba(249, 115, 22, 0.2);
}

.mentor-callout-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.mentor-callout-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #062b1e;
  font-weight: 700;
  flex: 1;
  min-width: 250px;
}

.mentor-callout-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ea580c;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  font-size: 13.5px;
  font-weight: 800;
  padding: 9px 20px;
  border-radius: 22px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.18s ease;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
}

.mentor-callout-btn:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.55);
}

.mentor-callout-btn:active {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Floating Admin Review Button (Bottom Right) */
.admin-fab {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(7, 21, 16, 0.85);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 999px;
  color: #a7f3d0;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  opacity: 0.82;
}

.admin-fab:hover {
  opacity: 1;
  background: rgba(14, 34, 25, 0.95);
  border-color: #10b981;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.admin-fab:active {
  transform: translateY(0);
}


