/* Custom Font */
@font-face {
  font-family: 'KirangHaerang';
  src: url(/7dd9ceb7425c0440ec02.ttf) format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Reset default styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background-image: url(/7c192b358593ff9bdf15.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  color: #E1DED5;
}

/* Ensure all text elements use the main font color */
input::-moz-placeholder {
  color: inherit;
}
p, span, div, h1, h2, h3, h4, h5, h6, label, input::placeholder {
  color: inherit;
}

/* Override Bootstrap text-muted class with higher specificity */
.text-muted,
.text-muted.mb-0,
.text-muted.fs-5,
p.text-muted,
i.text-muted {
  color: #E1DED5 !important;
}

/* Specific styling for chat placeholder text */
.chat-placeholder-text {
  color: #E1DED5 !important;
  font-size: 1.25rem !important;
}

/* Custom label styling */
.custom-label {
  color: #E1DED5 !important;
}

#root {
  margin: 0;
  padding: 0;
  text-align: left;
  max-width: none;
}

/* Player Name Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.overlay-content {
  background: #1A1A18;
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.overlay-content h2 {
  color: #E1DED5;
  margin-bottom: 1rem;
}

.overlay-content p {
  color: #E1DED5;
}

/* Header */
.app-header {
  display: flex;
  padding: 20px 64px 32px 64px;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
}

.header-left {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

.app-title-container {
  width: auto;
  height: auto;
  padding-right: 30px;
  align-items: center;
  gap: 4px;
  display: flex;
}

.logo-img {
  width: auto;
  height: 90px;
  -o-object-fit: contain;
     object-fit: contain;
}


/* Info blocks */
.info-blocks-container {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.info-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.info-block-label {
  display: flex;
  padding: 4px 16px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  border-radius: 4px 4px 0 0;
  border: 2px solid #64645B;
  background: linear-gradient(179deg, #F0AB00 20%, #FF4D00 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'KirangHaerang', sans-serif;
  color: #E1DED5;
  font-size: 20px;
  font-weight: 600;
}

.info-block-value {
  display: flex;
  padding: 4px 8px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  border-radius: 0 0 4px 4px;
  background: #1A1A18;
  color: #E1DED5;
  font-size: 1rem;
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.player-name-display {
  background: #1A1A18;
  color: #E1DED5;
  border: 2px solid #64645B;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-name-display i {
  color: #F0AB00;
}

.player-edit-button {
  background: #1A1A18;
  color: #E1DED5;
  border: 2px solid #64645B;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.player-edit-button i {
  color: #F0AB00;
}

.player-edit-button:hover {
  background: rgba(240, 171, 0, 0.15);
  border-color: #F0AB00;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(240, 171, 0, 0.3);
}

/* Main app container */
.app-container {
  min-height: 100vh;
  padding: 2rem 1rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}



/* Main card */
.main-card {
  position: relative;
  background: transparent;
  border-radius: 12px;
  margin-bottom: 2rem;
}

/* Title */
.title-section {
  font-size: 32px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 2rem;
  text-align: center;
  background: linear-gradient(179deg, #F0AB00 20%, #FF4D00 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'KirangHaerang', sans-serif;
}

/* Enhanced form elements */
.enhanced-select, .enhanced-input {
  border: 2px solid #e3e6f0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  transition: all 0.3s ease;
  width: 100%;
  background: #1A1A18;
  color: #E1DED5;
}

.enhanced-input::-moz-placeholder {
  color: #E1DED5;
  opacity: 0.7;
}

.enhanced-input::placeholder {
  color: #E1DED5;
  opacity: 0.7;
}

.enhanced-select:focus, .enhanced-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
  outline: none;
}

/* Chat container */
.chat-container {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.hint-text {
  color: #E1DED5;
  font-size: 0.9rem;
  font-style: italic;
  opacity: 0.8;
  padding: 8px 12px;
  background: rgba(240, 171, 0, 0.1);
  border-left: 3px solid #F0AB00;
  border-radius: 4px;
}

.hint-text i {
  color: #F0AB00;
}

.chat-message {
  padding: 1rem 0;
  border-bottom: 1px solid #e2e8f0;
  color: #E1DED5;
}

.chat-message:last-child {
  border-bottom: none;
}

.chat-message p,
.chat-message span,
.chat-message div {
  color: #E1DED5 !important;
}

.user-badge {
  background: #3182ce;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.bot-badge {
  background: #38a169;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Input groups */
.enhanced-input-group {
  margin-bottom: 1.5rem;
}

.input-row, .solution-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.enhanced-input {
  flex: 1;
}

/* Buttons */
.custom-btn {
  display: flex;
  width: 123px;
  padding: 12px 16px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 100px;
  border: 1px solid #FFD000;
  color: #E1DED5;
  background-color: #FFD37E1A;
}

.custom-btn:hover {
  background: rgba(240, 171, 0, 0.15);
  border-color: #F0AB00;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(240, 171, 0, 0.3);
}

.custom-btn:disabled {
  background: #1A1A18;
  border-color: #64645B;
  transform: none;
  box-shadow: none;
  color: #64645B;
  opacity: 0.5;
  cursor: not-allowed;
}

/* Spinner */
.spinner-enhanced {
  width: 1rem;
  height: 1rem;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Alerts */
.alert-enhanced {
  border-radius: 8px;
  border: none;
  color: #E1DED5 !important;
  background: #1A1A18;
}

.alert-info-enhanced {
  background: #1A1A18;
  color: #E1DED5;
}

.alert-danger-enhanced {
  background: #1A1A18;
  color: #E1DED5 !important;
}

.alert-danger-enhanced * {
  color: #E1DED5 !important;
}

/* Form labels */
.form-label {
  font-weight: 600;
  color: #E1DED5;
  margin-bottom: 0.5rem;
}

/* Rangliste Styles */
.leaderboard {
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
}

.leaderboard-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  align-self: stretch;
  background: transparent;
}

.rank {
  font-size: 1.5rem;
  font-weight: bold;
  margin-right: 1rem;
  min-width: 3rem;
  text-align: center;
  color: #E1DED5;
}

.winner-icon {
  width: 32px;
  height: 32px;
  -o-object-fit: contain;
     object-fit: contain;
}

.user-info {
  flex: 1;
}

.username {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #E1DED5;
}

.stats {
  display: flex;
  gap: 2rem;
  color: #E1DED5;
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat .label {
  font-weight: 600;
  color: #4a5568;
  font-size: 0.9rem;
}

.stat .value {
  font-weight: 700;
  color: #2d3748;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.no-users {
  text-align: center;
  padding: 3rem 2rem;
  color: #718096;
  font-style: italic;
}

/* Main layout container */
.main-layout {
  display: flex;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: flex-start;
}

/* Rangliste links */
.leaderbord-section {
  flex: 0 0 300px;
  background: transparent;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  height: -moz-fit-content;
  height: fit-content;
  position: sticky;
  top: 20px;
}

.leaderboard-title {
  font-size: 32px;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 20px 0;
  text-align: center;
  background: linear-gradient(179deg, #F0AB00 20%, #FF4D00 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'KirangHaerang', sans-serif;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.leaderboard {
  /* Container für die Rangliste */
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.no-users {
  text-align: center;
  color: #718096;
  font-style: italic;
  padding: 20px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: transparent;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.rank {
  font-weight: bold;
  font-size: 1.1rem;
  margin-right: 12px;
  min-width: 35px;
  text-align: center;
}

.user-info {
  flex: 1;
}

.username {
  font-weight: 600;
  margin-bottom: 4px;
  color: #E1DED5;
}

.stats {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
}

.stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat .label {
  color: #718096;
  font-weight: 500;
}

.stat .value {
  color: #2d3748;
  font-weight: 600;
}

/* Hauptinhalt rechts */
.main-content {
  flex: 0 0 900px;
  min-width: 0; /* Wichtig für Flexbox overflow */
}

.main-content .container {
  max-width: none;
  padding: 0;
}

.main-content .main-card {
  margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .main-layout {
    flex-direction: column;
    gap: 15px;
  }

  .leaderbord-section {
    flex: none;
    position: static;
    order: 2;
  }

  .main-content {
    flex: none;
    order: 1;
  }
}

@media (max-width: 768px) {
  .app-container {
    padding: 1rem 0.5rem;
  }

  .main-layout {
    gap: 10px;
  }

  .leaderbord-section {
    padding: 15px;
  }

  .leaderboard-item {
    padding: 10px;
  }

  .stats {
    flex-direction: column;
    gap: 2px;
  }
}

.level-radio-group {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
}

.level-radio-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  position: relative;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  pointer-events: none;
}

.level-radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.level-icon {
  width: 16px;
  height: 17px;
  -o-object-fit: contain;
     object-fit: contain;
  filter: none;
  transition: filter 0.2s ease, transform 0.2s ease;
  border-radius: 6px;
  margin-bottom: 4px;
}

.level-radio-label.selected .level-icon,
.level-radio-label input[type="radio"]:checked + .level-icon {
  filter: none;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.level-radio-label.selected {
  background-color: rgba(99, 102, 241, 0.15);
  border: 2px solid #6366f1;
}

.level-radio-label.current-level {
  border: 3px solid #F0AB00 !important;
}

.level-radio-label.current-level .level-icon {
  transform: scale(1.2) !important;
  filter: drop-shadow(0 0 10px rgba(240, 171, 0, 0.8)) !important;
}

.level-radio-label.current-level .level-title {
  font-weight: 700 !important;
  color: #F0AB00 !important;
}

.level-title {
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #E1DED5;
}

.level-radio-label.selected .level-title {
  color: #E1DED5;
  font-weight: 600;
}

.description-text {
  color: #E1DED5;
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: left;
  margin: 1.5rem 0;
  padding: 1rem 0;
  border-radius: 12px;
  font-style: italic;
}

/* Hero section with robot image */
.hero-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.robot-image {
  flex: 0 0 auto;
}

.robot-img {
  width: 220px;
  height: 220px;
  aspect-ratio: 1/1;
  -o-object-fit: contain;
     object-fit: contain;
}

.hero-text {
  flex: 1;
}

.hero-text .title-section {
  margin-bottom: 1rem;
  text-align: left;
}

.hero-text .description-text {
  margin: 0;
}

/* Footer */
.app-footer {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  z-index: 100;
}

.footer-text {
  color: #E1DED5;
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.8;
}

/* Level 1 Hint Box */
.level1-hint-box {
  display: flex;
  padding: 16px;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  border-radius: 24px 24px 24px 4px;
  border: 2px solid #F0AB00;
  background: #1A1A18;
  min-width: 200px;
  color: #E1DED5;
}

/* Seitenleiste für Hints */
.hints-sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 20px;
  margin-left: 20px;
  align-self: stretch;
  min-height: 100%;
  padding-bottom: 0;
}/* Success and Fail Solutions */
.chat-message.solution-success {
  background: rgba(56,161,105,0.18);
  border-left: 4px solid #38a169;
  border-radius: 8px;
  padding-left: 12px;
}

.chat-message.solution-fail {
  background: rgba(255,77,0,0.18);
  border-left: 4px solid #FF4D00;
  border-radius: 8px;
  padding-left: 12px;
}

.chat-message.solution-success span,
.chat-message.solution-fail span,
.chat-message.solution-success div,
.chat-message.solution-fail div {
  color: #E1DED5 !important;
}

