* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #111;
  color: #333;
}

#app {
  min-height: 100vh;
}

.screen {
  display: none;
  min-height: 100vh;
}

.screen--active {
  display: flex;
}

/* Main menu */

#screen-menu {
  background: #1a1a2e;
  color: #fff;
  align-items: center;
  justify-content: center;
}

.menu-content {
  text-align: center;
  padding: 20px;
}

.menu-title {
  font-size: 48px;
  font-weight: 700;
  color: #00d4ff;
  margin: 0 0 5px;
  text-shadow: 0 0 10px #00d4ff;
}

.menu-subtitle {
  font-size: 56px;
  font-weight: 700;
  color: #ff6b9d;
  margin: 0 0 30px;
  text-shadow: 0 0 10px #ff6b9d;
}

.menu-couch {
  margin: 30px auto;
  width: 300px;
  height: 200px;
  background: url('menu-couch.svg') center/contain no-repeat;
}

.menu-tagline {
  margin: 0 0 30px;
  font-size: 16px;
  line-height: 1.5;
}

.menu-features {
  text-align: left;
  max-width: 320px;
  margin: 0 auto 20px;
  color: #aaa;
  font-size: 14px;
}

.menu-warning {
  font-size: 12px;
  color: #ff6b9d;
  font-style: italic;
}

/* Shared buttons */

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
}

.btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn--primary {
  background: #00d4ff;
  color: #1a1a2e;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.7);
}

.btn--secondary {
  background: #555;
  color: #fff;
}

.btn--orange {
  background: #ff6b00;
  color: #fff;
}

.btn--green {
  background: #4caf50;
  color: #fff;
}

.btn--purple {
  background: #9c27b0;
  color: #fff;
}

.btn--gold {
  background: #ffd700;
  color: #000;
}

.btn--small {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.btn--circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* Game screen */

#screen-game.screen--active {
  display: flex;
  flex-direction: row;
  gap: 0;
  overflow: hidden;
  height: 100%;
  background: #0a0a0a;
}

.office-left {
  flex: 0 0 55%;
  background: linear-gradient(135deg, #2c1810 0%, #4a3020 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-shadow: inset -10px 0 30px rgba(0, 0, 0, 0.5);
}

.game-right {
  flex: 0 0 45%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 15px;
  background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(138, 43, 226, 0.6) rgba(0, 0, 0, 0.1);
}

.game-right::-webkit-scrollbar {
  width: 10px;
}

.game-right::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.game-right::-webkit-scrollbar-thumb {
  background: rgba(138, 43, 226, 0.6);
  border-radius: 5px;
}

.game-right::-webkit-scrollbar-thumb:hover {
  background: rgba(138, 43, 226, 0.8);
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  background: transparent;
  border-bottom: 2px solid rgba(138, 43, 226, 0.3);
  margin-bottom: 10px;
}

.game-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.game-subtitle {
  font-size: 12px;
  color: #666;
}

.game-rating {
  padding: 8px 0 4px;
}

.rating-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 4px;
}

.rating-bar {
  position: relative;
  width: 100%;
  height: 16px;
  background: #e0e0e0;
  border-radius: 8px;
  border: 1px solid #bdbdbd;
  overflow: hidden;
}

.rating-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  background: #ffc107;
}

.rating-percent {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  color: #2c3e50;
}


.patient-card {
  background: #fff;
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.patient-name {
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.patient-meta {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.patient-condition {
  margin-top: 6px;
  font-size: 14px;
  color: #e74c3c;
  font-weight: 600;
}

.symptoms-panel {
  margin-top: 8px;
  margin-bottom: 8px;
  background: #fff9e6;
  padding: 8px;
  border-radius: 6px;
  border-left: 3px solid #ff6b6b;
}

.symptoms-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.symptoms-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 11px;
  color: #555;
}

.symptoms-list li::before {
  content: '•';
  color: #ff6b6b;
  font-weight: 700;
  display: inline-block;
  width: 12px;
}

.mood-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.mood-label {
  font-size: 12px;
  color: #666;
}

.mood-bar {
  flex: 1;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.mood-bar-fill {
  height: 100%;
  width: 50%;
  background: #4caf50;
}

.mood-percent {
  font-size: 12px;
  color: #333;
}

.conversation-card {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  max-height: 400px;
  background: #fff;
  margin: 0;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.conversation-header {
  padding: 10px;
  border-bottom: 1px solid #eee;
  background: #f9f9f9;
  font-size: 14px;
  font-weight: 700;
}

.conversation-body {
  padding: 12px;
  overflow-y: auto;
  font-size: 14px;
}

.message {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 8px;
}

.message--doctor {
  background: #e3f2fd;
  margin-left: 15%;
  max-width: 85%;
}

.message--patient {
  background: #f5f5f5;
  margin-right: 15%;
  max-width: 85%;
}

.message-role {
  font-size: 11px;
  font-weight: 700;
  color: #666;
  margin-bottom: 4px;
}

.message-text {
  white-space: pre-wrap;
}

.message-indicator {
  font-size: 10px;
  font-weight: 700;
  margin-top: 4px;
}

.message-indicator--pos {
  color: #4caf50;
}

.message-indicator--neg {
  color: #f44336;
}

.conversation-empty {
  text-align: center;
  color: #999;
  font-style: italic;
  margin-top: 20px;
}

.input-row {
  display: flex;
  padding: 10px;
  background: #fff;
  border-top: 1px solid #ddd;
  gap: 8px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.input {
  flex: 1;
  border-radius: 20px;
  border: none;
  background: #f5f5f5;
  padding: 10px 15px;
  font-size: 14px;
}

.input:focus {
  outline: 2px solid #2196f3;
}

.actions-row {
  display: flex;
  gap: 10px;
  padding: 0;
  margin-bottom: 10px;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.overlay-card {
  width: 90%;
  max-width: 400px;
  max-height: 70vh;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.overlay-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.overlay-list {
  flex: 1;
  overflow-y: auto;
  margin: 8px 0 12px;
}

.overlay-item {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-bottom: 8px;
  cursor: pointer;
}

.overlay-item--selected {
  border-color: #9c27b0;
  background: #f3e5f5;
}

.overlay-actions {
  display: flex;
  gap: 8px;
}

.trip-banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  text-align: center;
  padding: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #ff00ff;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

/* Center screens (game over, victory) */

#screen-gameover,
#screen-victory,
#screen-license {
  align-items: center;
  justify-content: center;
}

#screen-gameover {
  background: #2d0000;
}

#screen-victory {
  background: #0a2f0a;
}

.center-card {
  max-width: 480px;
  padding: 20px;
  text-align: center;
}

.center-card--red h1 {
  font-size: 42px;
  color: #ff0000;
  text-shadow: 0 0 15px #ff0000;
}

.center-card--green h1 {
  font-size: 32px;
  color: #ffd700;
  text-shadow: 0 0 15px #ffd700;
}

.big-emoji {
  font-size: 80px;
  margin: 10px 0 30px;
}

.center-box {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  color: #fff;
}

.center-box--dark {
  background: rgba(0, 0, 0, 0.4);
}

.center-box--gold {
  background: rgba(255, 215, 0, 0.2);
}

.center-stats {
  margin-top: 12px;
  font-size: 16px;
}

.center-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* License revoked */

.license-bg {
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: center;
}

.license-card {
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.license-header h1 {
  margin: 0;
  font-size: 32px;
  color: #ff0000;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.license-header h2 {
  margin: 5px 0 20px;
  font-size: 16px;
  color: #ff6b6b;
}

.license-icon {
  font-size: 60px;
}

.license-report {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.license-report-header {
  border-bottom: 2px solid #000;
  padding-bottom: 10px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}

.license-case {
  font-size: 12px;
  color: #666;
}

.license-report-body {
  text-align: left;
  font-size: 13px;
}

.field-label {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #666;
}

.field-value {
  font-size: 14px;
  font-weight: 600;
}

.determination {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.4;
}

.license-stamp {
  position: absolute;
  top: 70px;
  right: 20px;
  border: 4px solid #ff0000;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 28px;
  font-weight: 700;
  color: #ff0000;
  letter-spacing: 2px;
  opacity: 0.7;
  transform: rotate(-15deg);
}

.license-consequences {
  background: rgba(255, 0, 0, 0.15);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  text-align: left;
  color: #fff;
}

.consequence-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

/* Simple trophy placeholder (can be replaced with inline SVG later) */

.trophy {
  font-size: 80px;
  margin: 10px 0;
}

@media (min-width: 768px) {
  .center-card {
    padding: 30px;
  }
}
