/* AI Companion Risk Awareness Game Styles */

:root {
  --primary-blue: #4B7BA7;
  --warning-orange: #FF8C42;
  --success-green: #22C55E;
  --neutral-dark: #2C2C2C;
  --neutral-light: #F9F7F4;
  --neutral-gray: #5A5A5A;
  --border-light: #E5E3E0;
}

#game-container {
  font-family: 'Inter', sans-serif;
  color: var(--neutral-dark);
}

/* Difficulty Selection Screen */
.difficulty-select {
  text-align: center;
  padding: 2rem;
}

.difficulty-select h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: 'Poppins', sans-serif;
}

.difficulty-select p {
  font-size: 1.1rem;
  color: var(--neutral-gray);
  margin-bottom: 2rem;
}

.difficulty-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.difficulty-btn {
  background: white;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.difficulty-btn:hover {
  border-color: var(--primary-blue);
  box-shadow: 0 8px 24px rgba(75, 123, 167, 0.15);
  transform: translateY(-4px);
}

.difficulty-btn h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: 'Poppins', sans-serif;
}

.difficulty-btn p {
  font-size: 1rem;
  color: var(--neutral-gray);
  margin-bottom: 0.75rem;
}

.difficulty-btn small {
  display: block;
  font-size: 0.85rem;
  color: #8B8B8B;
  font-style: italic;
}

/* Scenario Screen */
.scenario {
  animation: fadeIn 0.5s ease-in;
}

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

.scenario-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-light);
}

.scenario-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: 'Poppins', sans-serif;
}

.scenario-description {
  font-size: 1.1rem;
  color: var(--neutral-gray);
  margin-bottom: 1rem;
}

.progress {
  display: inline-block;
  background: var(--neutral-light);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--neutral-gray);
}

.scenario-narrative {
  background: linear-gradient(135deg, #F9F7F4 0%, #F3F1EE 100%);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary-blue);
}

.scenario-narrative p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--neutral-dark);
}

/* Conversation */
.conversation {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  max-height: 400px;
  overflow-y: auto;
}

.message {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  position: relative;
}

.message.you {
  background: #F3F1EE;
  margin-left: 2rem;
}

.message.alex,
.message.companion {
  background: linear-gradient(135deg, #E8F0F7 0%, #F0F5FA 100%);
  margin-right: 2rem;
  border-left: 3px solid var(--primary-blue);
}

.message strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--neutral-dark);
  font-weight: 600;
}

.message p {
  margin: 0;
  line-height: 1.5;
}

.red-flag-indicator {
  display: inline-block;
  background: var(--warning-orange);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.5rem;
  cursor: help;
}

/* Detective Mode */
.detective-mode {
  background: linear-gradient(135deg, #FFF8F0 0%, #FFF5E6 100%);
  border: 2px dashed var(--warning-orange);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.detective-mode h3 {
  color: var(--warning-orange);
  margin-bottom: 0.5rem;
  font-family: 'Poppins', sans-serif;
}

.detective-mode p {
  color: var(--neutral-gray);
  margin: 0;
}

/* Choices */
.choices {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.choice-btn {
  background: white;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  line-height: 1.5;
}

.choice-btn:hover {
  border-color: var(--primary-blue);
  background: #F9F7F4;
  box-shadow: 0 4px 12px rgba(75, 123, 167, 0.1);
  transform: translateX(4px);
}

.choice-btn:active {
  transform: translateX(2px);
}

/* Feedback Screen */
.feedback {
  animation: slideUp 0.5s ease-out;
}

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

.feedback h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  font-family: 'Poppins', sans-serif;
}

.feedback-text {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--neutral-gray);
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #F3F1EE;
  border-radius: 8px;
  border-left: 4px solid var(--primary-blue);
}

.lesson-box {
  background: linear-gradient(135deg, #F0F8FF 0%, #E8F4FF 100%);
  border: 2px solid var(--primary-blue);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.lesson-box h3 {
  color: var(--primary-blue);
  margin-bottom: 0.75rem;
  font-family: 'Poppins', sans-serif;
}

.lesson-box p {
  color: var(--neutral-gray);
  margin-bottom: 1rem;
}

.lesson-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lesson-box li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--neutral-dark);
}

.lesson-box li:before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--warning-orange);
  font-weight: bold;
}

.score-display {
  background: white;
  border: 2px solid var(--success-green);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  margin-bottom: 2rem;
}

.score-display p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--neutral-gray);
}

.score-display strong {
  color: var(--success-green);
  font-size: 1.5rem;
}

.next-btn {
  background: var(--primary-blue);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.next-btn:hover {
  background: #3D6B8F;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(75, 123, 167, 0.2);
}

/* Results Screen */
.results {
  animation: slideUp 0.5s ease-out;
  text-align: center;
}

.results h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-family: 'Poppins', sans-serif;
}

.final-score {
  background: linear-gradient(135deg, #F0F8FF 0%, #E8F4FF 100%);
  border: 2px solid var(--primary-blue);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.final-score p {
  font-size: 1.2rem;
  margin: 0.5rem 0;
  color: var(--neutral-gray);
}

.final-score strong {
  color: var(--primary-blue);
  font-size: 1.5rem;
}

.result-message {
  background: linear-gradient(135deg, #F0FFF4 0%, #E8FFE8 100%);
  border: 2px solid var(--success-green);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.result-message p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--neutral-dark);
  margin: 0;
}

.key-takeaways {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: left;
}

.key-takeaways h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  font-family: 'Poppins', sans-serif;
  color: var(--neutral-dark);
}

.key-takeaways ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.key-takeaways li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--neutral-gray);
  line-height: 1.6;
}

.key-takeaways li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-green);
  font-weight: bold;
  font-size: 1.2rem;
}

.next-steps {
  background: linear-gradient(135deg, #FFF8F0 0%, #FFF5E6 100%);
  border: 2px dashed var(--warning-orange);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
}

.next-steps h3 {
  color: var(--warning-orange);
  margin-bottom: 0.75rem;
  font-family: 'Poppins', sans-serif;
}

.next-steps p {
  color: var(--neutral-gray);
  margin: 0;
  line-height: 1.6;
}

.restart-btn {
  background: var(--primary-blue);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.restart-btn:hover {
  background: #3D6B8F;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(75, 123, 167, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .difficulty-options {
    grid-template-columns: 1fr;
  }

  .scenario-header h2 {
    font-size: 1.5rem;
  }

  .message.you {
    margin-left: 0;
  }

  .message.alex,
  .message.companion {
    margin-right: 0;
  }

  .conversation {
    max-height: 300px;
  }

  .choices {
    gap: 0.75rem;
  }

  .choice-btn {
    padding: 1rem;
    font-size: 0.95rem;
  }

  .results h2 {
    font-size: 1.75rem;
  }

  .next-btn,
  .restart-btn {
    padding: 0.875rem 1.5rem;
  }
}

/* Scrollbar Styling */
.conversation::-webkit-scrollbar {
  width: 6px;
}

.conversation::-webkit-scrollbar-track {
  background: #F3F1EE;
  border-radius: 10px;
}

.conversation::-webkit-scrollbar-thumb {
  background: var(--primary-blue);
  border-radius: 10px;
}

.conversation::-webkit-scrollbar-thumb:hover {
  background: #3D6B8F;
}
