body {
  margin: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.87);
  background-color: #000000;
  font-family: Arial, sans-serif;
}

#app {
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

#game-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #1a1a1a;
}

#top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #2a2a2a;
  color: white;
  border-bottom: 2px solid #3a3a3a;
}

#controls {
  display: flex;
  gap: 10px;
}

.control-button {
  background: none;
  border: none;
  color: white;
  font-size: 1.2em;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background-color 0.2s;
}

.control-button:hover {
  background-color: #3a3a3a;
}

.control-button.text-button {
  background-color: #ff3333;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background-color 0.2s ease;
}

.control-button.text-button:hover {
  background-color: #cc0000;
}

.control-button.text-button.leaderboard-button {
  background-color: #3366ff;
}

.control-button.text-button.leaderboard-button:hover {
  background-color: #0033cc;
}

#score {
  font-size: 1.2em;
  font-weight: bold;
}

#game-area {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#pixi-container {
  width: 100%;
  height: 100%;
}

#leaderboard {
  width: 15%;
  min-width: 200px;
  background: rgba(0, 0, 0, 0.85);
  padding: 15px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: width 0.3s ease;
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#leaderboard h2 {
  margin: 0;
  font-size: 18px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

#leaderboard-toggle {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 5px;
  font-size: 12px;
  transition: all 0.2s ease;
}

#leaderboard-toggle:hover {
  color: #fff;
}

.toggle-icon {
  display: inline-block;
  transition: transform 0.2s;
}

.toggle-icon.expanded {
  transform: rotate(180deg);
}

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

.podium-entry {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.podium-entry:hover {
  transform: translateX(5px);
  background: rgba(255, 255, 255, 0.06);
}

.podium-entry .crown {
  position: absolute;
  top: -8px;
  font-size: 20px;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

.podium-entry .name {
  font-size: 14px;
  color: #fff;
  margin: 5px 0;
}

.podium-entry .score {
  font-size: 18px;
  font-weight: bold;
}

.gold {
  background: linear-gradient(
    45deg,
    rgba(255, 215, 0, 0.1),
    rgba(255, 215, 0, 0.05)
  );
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.gold .score {
  color: #ffd700;
}

.silver {
  background: linear-gradient(
    45deg,
    rgba(192, 192, 192, 0.1),
    rgba(192, 192, 192, 0.05)
  );
  border: 1px solid rgba(192, 192, 192, 0.2);
}

.silver .score {
  color: #c0c0c0;
}

.bronze {
  background: linear-gradient(
    45deg,
    rgba(205, 127, 50, 0.1),
    rgba(205, 127, 50, 0.05)
  );
  border: 1px solid rgba(205, 127, 50, 0.2);
}

.bronze .score {
  color: #cd7f32;
}

#game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(20, 20, 20, 0.9) 100%
  );
  border-bottom: 2px solid rgba(255, 215, 0, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

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

#scene-title {
  font-size: 24px;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

#level {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#sound {
  font-size: 24px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease;
}

#sound:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

/* Tutorial Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: #2a2a2a;
  border: 2px solid #3a3a3a;
  border-radius: 10px;
  padding: 25px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  color: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
  text-align: center;
  margin: 0 0 20px 0;
  color: #ffd700;
  font-size: 24px;
}

.tutorial-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tutorial-step {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tutorial-step h3 {
  margin: 0 0 10px 0;
  color: #ffd700;
  font-size: 18px;
}

.tutorial-step p {
  margin: 0;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.tutorial-step ul {
  margin: 0;
  padding-left: 20px;
  list-style-type: none;
}

.tutorial-step li {
  margin: 8px 0;
  line-height: 1.5;
}

.modal-close {
  display: block;
  margin: 20px auto 0;
  padding: 10px 30px;
  background-color: #ffd700;
  color: #000;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-close:hover {
  background-color: #ffed4a;
}

/* Leaderboard specific styles */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: url("/public/assets/bgscene.png") no-repeat center center fixed;
  background-size: cover;
  position: relative;
}

.container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
}

.card {
  background: rgba(255, 255, 255, 0.95);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 600px;
  text-align: center;
  position: relative;
  z-index: 1;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-header {
  text-align: center;
}

.trophy-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

.card-header h1 {
  margin-bottom: 1.5rem;
  color: #333;
  font-size: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.leaderboard-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.leaderboard-filters button {
  padding: 0.75rem 1.5rem;
  background: none;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.leaderboard-filters button:hover {
  border-color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.leaderboard-filters button.active {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
}

.leaderboard-list {
  max-height: 400px;
  overflow-y: auto;
  margin: 1rem 0;
  padding: 0 1rem;
}

.score-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.score-item:hover {
  transform: translateX(5px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.score-rank {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  width: 50px;
}

.score-info {
  flex: 1;
  text-align: left;
  margin: 0 1rem;
}

.score-email {
  font-weight: bold;
  color: #333;
  margin-bottom: 0.25rem;
}

.score-date {
  font-size: 0.9rem;
  color: #666;
}

.score-points {
  font-size: 1.25rem;
  font-weight: bold;
  color: #007bff;
}

.card-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.primary-button,
.secondary-button {
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
}

.primary-button {
  background-color: #007bff;
  color: white;
}

.primary-button:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.secondary-button {
  background-color: #6c757d;
  color: white;
}

.secondary-button:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
}

.loading {
  color: #333;
  font-size: 1.2rem;
  padding: 2rem;
  text-align: center;
}

/* Scrollbar styles */
.leaderboard-list::-webkit-scrollbar {
  width: 8px;
}

.leaderboard-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.leaderboard-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Top 3 ranks styling */
.score-item.rank-1 .score-rank {
  color: #ffd700;
}

.score-item.rank-2 .score-rank {
  color: #c0c0c0;
}

.score-item.rank-3 .score-rank {
  color: #cd7f32;
}

/* Current user score highlight */
.current-user-score {
  background: linear-gradient(
    45deg,
    rgba(218, 165, 32, 0.1),
    rgba(255, 255, 255, 0.1)
  );
  border: 2px solid rgba(218, 165, 32, 0.3);
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.your-score-badge {
  background: linear-gradient(45deg, #daa520, #cd853f);
  color: #000;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7em;
  font-weight: bold;
  margin-left: 8px;
  display: inline-block;
  animation: pulse 2s infinite;
}

.score-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ceos-found {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85em;
  color: #888;
}

.ceo-count {
  background: rgba(218, 165, 32, 0.1);
  padding: 2px 8px;
  border-radius: 8px;
  color: #daa520;
  font-weight: 500;
}

.ceo-icons {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.9em;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.current-user-score .score-email {
  font-weight: 600;
  color: #daa520;
}

.current-user-score .score-points {
  color: #daa520;
  text-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
}

.current-user-score .ceo-count {
  background: rgba(218, 165, 32, 0.2);
  color: #cd853f;
}

/* Share section styles */
.share-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  text-align: center;
}

.share-text {
  color: #888;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.share-url {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-family: monospace;
  color: #daa520;
}

.button-icon {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #888;
  border-radius: 4px;
  transition: all 0.2s;
}

.button-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #daa520;
}

.share-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.share-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  color: white;
}

.share-button svg {
  width: 18px;
  height: 18px;
}

.share-button.twitter {
  background: #1da1f2;
}

.share-button.facebook {
  background: #1877f2;
}

.share-button.linkedin {
  background: #0a66c2;
}

.share-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

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

.score-divider {
  text-align: center;
  padding: 10px;
  color: #666;
  font-weight: bold;
  letter-spacing: 2px;
}
