.main-title {
  text-align: center;
  font-size: 64px;
  color: #402a13;
  margin-bottom: 40px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  margin-top: 5px;
}

body {
  margin: 0;
  padding: 20px;
  font-family: Arial, sans-serif;
  background: #a38468; 
  color: #fff;
}

#game {
  max-width: 1200px;
  margin: 0 auto;
}

.phase {
  text-align: center;
}

.hidden {
  display: none;
}

/* Styles for non-battle phases */
.phase:not(#battle-phase) {
  color: #3b2d1f; 
}

.phase:not(#battle-phase) h2 {
  color: #3b2d1f;
  font-size: 48px;
}

.hidden {display: none !important}

.menu-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin: 20px auto;
  max-width: 400px;
}

.phase:not(#battle-phase) button {
  padding: 10px 10px;
  font-size: 22px;
  cursor: pointer;
  background: #d4a373; 
  color: #3b2d1f; 
  border: 2px solid #8c6b4f;
  border-radius: 8px;
  transition: all 0.2s;
}

.phase:not(#battle-phase) button:hover {
  background: #e0ac69;
  transform: translateY(-2px);
}

.phase:not(#battle-phase) button.back-button {
  background: #8c6b4f;
  color: #fff;
}

.phase:not(#battle-phase) button.back-button:hover {
  background: #a07c5a;
}

.recruitment-card h3 {
  font-weight: 300;
  font-size: 19px;
}

#back-to-menu {
  margin-bottom: 55px
}

.menu-buttons button {
  width: 100%;
  padding: 10px 10px;
  font-size: 22px;
  cursor: pointer;
  background: #d4a373;
  color: #3b2d1f;
  border: 2px solid #8c6b4f;
  border-radius: 8px;
  transition: all 0.2s;
  text-align: center;
}

.menu-buttons button:hover {
  background: #e0ac69;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.menu-buttons a {
  width: 100%;
  text-decoration: none;
}

.menu-buttons button.clear-army {
  background: #cd6358;
  color: #fff;
}

.menu-buttons button.clear-army:hover {
  background: #d97267;
}

.menu-buttons button:disabled {
  background: #888;
  color: #555;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.menu-buttons button:disabled:hover {
  background: #888;
  transform: none;
  box-shadow: none;
}

/* Updated recruitment card styles */
.recruitment-card {
  position: relative;
  display: inline-block;
  padding: 12px; 
  margin: 12px; 
  border: 1px solid #8c6b4f;
  border-radius: 4px;
  background: rgba(212, 163, 115, 0.8);
}

.recruitment-card h3 {
  color: #3b2d1f;
  margin: 0 0 8px 0; 
}

.recruitment-card p {
  color: #3b2d1f;
  margin: 8px 0; 
}

.recruitment-buttons {
  display: flex;
  gap: 8px; 
  justify-content: center;
  margin-top: 8px; 
}

.recruitment-buttons button {
  padding: 10px 10px;
  font-size: 22px;
}

.recruitment-buttons span.unit-count {
  color: #3b2d1f;
  font-size: 20px;
}

.recruitment-card img {
  cursor: help;
}

/* Recruitment buttons specific styles */
.recruitment-buttons .plus-button {
  padding: 0px 10px !important;
  background: #aad56c !important; 
}

.recruitment-buttons .minus-button {
  padding: 0px 10px !important;
  background: #cd6358 !important;
}

/* Add glowing effect for minus button */
.recruitment-buttons .minus-button.glowing {
  animation: glowing 2s ease-in-out infinite;
  position: relative;
}

/* Adjust army toolbar */
.army-toolbar {
  border: 2px solid #3b2d1f;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(212, 163, 115, 0.9);
  padding: 10px 20px;
  border-radius: 8px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.army-unit span {
  color: #3b2d1f; 
  font-size: 18px;
}

/* Adjust gold displays */
.global-gold {
  position: fixed;
  top: 220px;
  right: 20px;
  font-size: 24px;
  background: rgba(212, 163, 115, 0.8);
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 1001;
  color: #3b2d1f;
}

.total-gold {
  font-size: 18px;
  color: #3b2d1f;
  margin-bottom: 5px;
}

/* Adjust army list */
.army-list {
  position: fixed;
  top: 305px;
  right: 20px;
  width: 185px;
  max-height: calc(100vh - 290px);
  overflow-y: auto;
  background: rgba(212, 163, 115, 0.8);
  padding: 15px;
  border-radius: 8px;
  z-index: 1001;
}

.army-list h3 {
  color: #3b2d1f;
  font-size: 18px;
  margin-bottom: 15px;
}

.army-username {
  font-size: 18px;
  color: #3b2d1f;
  margin-bottom: 10px;
  text-align: center;
}

.army-gold {
  font-size: 18px;
  color: #3b2d1f;
  margin-bottom: 5px;
}

.army-units {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.army-unit {
  display: flex;
  align-items: center;
  gap: 5px;
}

.army-unit img {
  width: 32px;
  height: 32px;
}

.army-unit span {
  color: #3b2d1f;
  font-size: 16px;
}

.no-units {
  color: #3b2d1f;
  font-size: 16px;
}

#back-to-menu-button {
  padding: 10px 20px;
  font-size: 20px;
  margin-top: 20px;
  cursor: pointer;
  background: #d4a373;
  color: #3b2d1f;
  border: 1px solid #8c6b4f;
  border-radius: 4px;
}

#back-to-menu-button:hover {
  background: #e0ac69;
}

.unit-tooltip {
  position: absolute;
  background: rgba(212, 163, 115, 0.95);
  color: #3b2d1f;
  padding: 15px;
  border: 1px solid #8c6b4f;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1000;
  max-width: 300px;
  pointer-events: none;
  white-space: pre-line;
}

/* Adjust social lists */
.social-lists {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 20px;
  z-index: 1000;
}

.followers-list, .following-list {
  padding: 7px;
  border-radius: 8px;
  min-width: 200px;
  max-height: 25vh;
  overflow-y: auto;
}

.following-list {background-color: #cd6358}

.followers-list {background-color: #aad56c }

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  cursor: pointer;
}

.list-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 300;
  color: #3b2d1f;
}

.list-content {
  display: none;
}

.list-content.expanded {
  display: block;
}

.social-entry {
  padding: 5px 0;
  border-bottom: 1px solid #8c6b4f;
  color: #3b2d1f;
}

.social-entry:last-child {
  border-bottom: none;
}

.count-badge {
  background: #8c6b4f; 
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 14px;
  color: #fff;
  transition: background-color 0.3s ease; 
}

/* Unfollow button */
.unfollow-button {
  padding: 10px 10px;
  font-size: 22px;
  background: #d4a373;
  color: #3b2d1f;
  border: 1px solid #8c6b4f;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 10px;
}

.unfollow-button:hover {
  background: #e0ac69;
}

/* Styles for modal prompt */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  cursor: pointer;
}

.modal-content {
  background-color: rgba(240, 230, 210, 0.95);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  max-height: 80vh;
  overflow-y: auto;
  color: #3b2d1f;
  cursor: default;
}

.modal-content p {
  color: #3b2d1f;
  font-size: 20px;
  margin-bottom: 20px;
}

.modal-content button {
  margin: 0 10px;
  padding: 10px 10px;
  font-size: 22px;
  background: #d4a373;
  color: #3b2d1f;
  border: 1px solid #8c6b4f;
  border-radius: 4px;
  cursor: pointer;
}

.modal-content button:hover {
  background: #e0ac69;
}

/* Styles for social feed */
#social-feed-wrapper {
  position: fixed;
  top: 100px; 
  left: 0;
  width: 240px;
  max-height: calc(70vh - 120px); 
  overflow-y: auto;
  background: rgba(212, 163, 115, 0.85);
  padding: 0px 5px;
  border-radius: 8px;
  z-index: 1000;
  color: #3b2d1f;
  transform: none; 
}

#social-feed-wrapper h3 {
  color: #3b2d1f;
  font-size: 18px;
  margin-bottom: 10px;
}

#social-feed-wrapper #post-button {
  display: block;
  margin: 0 auto 10px;
  padding: 4px 18px;
  font-size: 16px;
  background: #d4a373;
  color: #3b2d1f;
  border: 1px solid #8c6b4f;
  border-radius: 4px;
  cursor: pointer;
}

#social-feed-wrapper #post-button:hover {
  background: #e0ac69;
}

#social-feed {
  margin-top: 10px;
}

.post-entry {
  background: rgba(255, 255, 255, 0.7);
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
}

.post-author {
  font-weight: bold;
  margin-bottom: 5px;
  color: #3b2d1f;
}

.post-content {
  font-size: 14px;
  color: #3b2d1f;
}

.post-timestamp {
  font-size: 12px;
  color: #6e5f4f;
  text-align: right;
}

/* Styles for reply button */
.reply-button {
  margin-top: 5px;
  padding: 5px 10px;
  font-size: 14px;
  background: #d4a373;
  color: #3b2d1f;
  border: 1px solid #8c6b4f;
  border-radius: 4px;
  cursor: pointer;
}

.reply-button:hover {
  background: #e0ac69;
}

/* Styles for replies */
.post-replies {
  margin-left: 20px;
  margin-top: 10px;
  border-left: 2px solid #8c6b4f;
  padding-left: 10px;
}

.reply-entry {
  background: rgba(255, 255, 255, 0.6);
  padding: 8px;
  margin-bottom: 5px;
  border-radius: 4px;
}

.reply-entry .post-author {
  font-weight: bold;
  margin-bottom: 3px;
  color: #3b2d1f;
}

.reply-entry .post-content {
  font-size: 13px;
  color: #3b2d1f;
}

.reply-entry .post-timestamp {
  font-size: 11px;
  color: #6e5f4f;
  text-align: right;
}

/* HUD toggle button */
#hud-toggle {
  position: fixed;
  top: 10px;
  left: 10px;
  padding: 8px 10px;
  font-size: 18px;
  background: #d4a373;
  color: #3b2d1f;
  border: 1px solid #8c6b4f;
  border-radius: 4px;
  cursor: pointer;
  z-index: 1000;
}

#hud-toggle:hover {
  background: #e0ac69;
}

/* Leaderboards button */
#leaderboards-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 10px;
  font-size: 18px;
  background: #d4a373;
  color: #3b2d1f;
  border: 1px solid #8c6b4f;
  border-radius: 8px;
  cursor: pointer;
  z-index: 1000;
}

#leaderboards-button:hover {
  background: #e0ac69;
}

/* Leaderboard modal styles */
.leaderboard-entry {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px;
  border-radius: 4px;
}

.leaderboard-rank {
  font-size: 24px;
  width: 50px;
  text-align: center;
  color: #3b2d1f;
}

.leaderboard-info {
  flex-grow: 1;
  margin-left: 10px;
}

.leaderboard-username {
  font-size: 20px;
  color: #3b2d1f;
}

.leaderboard-followers {
  font-size: 16px;
  color: #3b2d1f;
}

.leaderboard-entry .army-units {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-left: 10px;
}

.leaderboard-entry .army-unit {
  display: flex;
  align-items: center;
  gap: 5px;
}

.leaderboard-entry .army-unit img {
  width: 32px;
  height: 32px;
}

.leaderboard-entry .army-unit span {
  color: #3b2d1f;
  font-size: 14px;
}

/* Enemy armies layout */
.enemy-armies {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 20px;
}

.enemy-army {
  flex: 0 1 300px;
  background: rgba(212, 163, 115, 0.8);
  padding: 20px;
  border-radius: 8px;
  border: 2px solid #8c6b4f;
}

/* Adjust unit display within enemy armies */
.enemy-army .unit-count {
  display: inline-flex;
  align-items: center;
  margin: 5px;
}

.enemy-army .unit-count img {
  width: 32px;  
  height: 32px;  
  margin-right: 5px;
}

.enemy-army .unit-count span {
  color: #3b2d1f;
  font-size: 16px;
}

/* Battle button in enemy selection */
.enemy-army button {
  margin-top: 15px;
  padding: 10px 10px;
  font-size: 22px;
  cursor: pointer;
  background: #d4a373;
  color: #3b2d1f;
  border: 2px solid #8c6b4f;
  border-radius: 8px;
  transition: all 0.2s;
  width: 100%;
}

.enemy-army button:hover {
  background: #e0ac69;
  transform: translateY(-2px);
}

/* Battle phase styles remain unchanged */
#battlefield {
  width: 1200px;
  height: 600px;
  background: #222;
  border: 2px solid #444;
}

/* Add glowing effect to Save Army button */
#save-army-button {
  animation: glowing 2s ease-in-out infinite;
  position: relative;
}

@keyframes glowing {
  0% {
    box-shadow: 0 0 5px #ffd700, 0 0 10px #ffd700, 0 0 15px #ffed4a;
  }
  50% {
    box-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700, 0 0 30px #ffed4a;
  }
  100% {
    box-shadow: 0 0 5px #ffd700, 0 0 10px #ffd700, 0 0 15px #ffed4a;
  }
}

/* Add glowing effect to Army Builder button */
#army-builder-button {
  animation: glowing 2s ease-in-out infinite;
  position: relative;
}

@keyframes glowing {
  0% {
    box-shadow: 0 0 5px #ffd700, 0 0 10px #ffd700, 0 0 15px #ffed4a;
  }
  50% {
    box-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700, 0 0 30px #ffed4a;
  }
  100% {
    box-shadow: 0 0 5px #ffd700, 0 0 10px #ffd700, 0 0 15px #ffed4a;
  }
}

.army-entry button {
  margin-top: 15px;
  font-size: 18px;
}

.volume-control {
  position: fixed;
  top: 50px;
  left: 10px;
  padding: 8px 10px;
  background: #d4a373;
  color: #3b2d1f;
  border: 1px solid #8c6b4f;
  border-radius: 4px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-control input[type="range"] {
  width: 100px;
  cursor: pointer;
}

.volume-control span {
  min-width: 45px;
}

.splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #000;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.splash-overlay img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  animation: fadeIn 20s forwards;
}

@keyframes fadeIn {
  0% {
    opacity: 1;
  }
  5% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
  body {
    padding: 10px;
  }

  .main-title {
    font-size: 36px;
    margin-bottom: 20px;
    margin-top: 60px;
  }

  .menu-buttons {
    max-width: 90%;
    gap: 10px;
  }

  .menu-buttons button {
    font-size: 18px;
    padding: 12px 10px;
  }

  .recruitment-card {
    margin: 8px;
    padding: 8px;
    width: calc(50% - 20px);
    box-sizing: border-box;
  }

  .recruitment-card img {
    width: 48px;
    height: 48px;
  }

  .recruitment-card h3 {
    font-size: 16px;
  }

  .recruitment-buttons button {
    font-size: 18px;
    padding: 5px 8px;
  }

  .enemy-armies {
    flex-direction: column;
    gap: 15px;
    padding: 10px;
  }

  .enemy-army {
    flex: none;
    width: auto;
    padding: 15px;
  }

  /* Adjust fixed position elements */
  #social-feed-wrapper {
    display: none; /* Hide feed on mobile */
  }

  .army-list {
    position: static;
    width: auto;
    margin: 10px auto;
    max-width: 90%;
  }

  .social-lists {
    position: static;
    flex-direction: column;
    margin: 10px auto;
    width: 90%;
  }

  .followers-list, .following-list {
    width: 100%;
  }

  .global-gold {
    position: static;
    margin: 10px auto;
    width: fit-content;
  }

  .volume-control {
    position: static;
    margin: 10px auto;
    width: fit-content;
  }

  #hud-toggle {
    position: static;
    margin: 10px auto;
    display: block;
  }

  #leaderboards-button {
    position: static;
    margin: 10px auto;
    display: block;
  }

  .army-toolbar {
    position: static;
    transform: none;
    margin: 10px auto;
    max-width: 90%;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Modal adjustments */
  .modal-content {
    width: 90%;
    max-width: 400px;
    margin: 0 10px;
  }

  .leaderboard-entry {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .leaderboard-rank {
    width: 100%;
    text-align: left;
  }

  /* Battle canvas adjustment */
  #battlefield {
    width: 100%;
    height: auto;
    aspect-ratio: 2/1;
  }
}

/* Additional tweaks for very small screens */
@media screen and (max-width: 480px) {
  .recruitment-card {
    width: calc(100% - 20px);
  }

  .menu-buttons button {
    font-size: 16px;
    padding: 10px 8px;
  }

  .main-title {
    font-size: 28px;
  }

  .modal-content {
    padding: 10px;
  }

  .volume-control input[type="range"] {
    width: 80px;
  }
}

/* Add styles for centered back button */
.back-button.centered {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  font-size: 22px;
  background: #8c6b4f;
  color: #fff;
  border: 2px solid #3b2d1f;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.back-button.centered:hover {
  background: #a07c5a;
  transform: translateY(-2px);
}

/* Mobile adjustments for back button */
@media screen and (max-width: 768px) {
  .back-button.centered {
    font-size: 18px;
    padding: 8px 16px;
    margin: 15px auto;
  }
}

.notification-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 300px;
  z-index: 1002;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification {
  background: rgba(212, 163, 115, 0.95);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid #8c6b4f;
  color: #3b2d1f;
  animation: slideUp 0.5s ease-out forwards, slideDown 0.5s ease-in forwards 9.5s;
  pointer-events: auto;
}

.notification-history {
  position: fixed;
  right: 20px;
  bottom: 60px;
  width: 300px;
  max-height: 400px;
  background: rgba(212, 163, 115, 0.95);
  border: 1px solid #8c6b4f;
  border-radius: 8px;
  padding: 15px;
  display: none;
  overflow-y: auto;
  z-index: 1001;
}

.notification-history.expanded {
  display: block;
}

.notification-history-entry {
  padding: 10px;
  border-bottom: 1px solid #8c6b4f;
  color: #3b2d1f;
}

.notification-history-entry:last-child {
  border-bottom: none;
}

#notifications-button {
  position: fixed;
  bottom: 20px;
  right: 160px;
  padding: 10px 10px;
  font-size: 18px;
  background: #d4a373;
  color: #3b2d1f;
  border: 1px solid #8c6b4f;
  border-radius: 4px;
  cursor: pointer;
  z-index: 1000;
}

#notifications-button:hover {
  background: #e0ac69;
}

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

@keyframes slideDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

@media screen and (max-width: 768px) {
  .notification-container {
    width: calc(100% - 40px);
    max-width: 300px;
  }

  .notification-history {
    width: calc(100% - 40px);
    max-width: 300px;
    right: 10px;
  }

  #notifications-button {
    position: static;
    margin: 10px auto;
    display: block;
  }
}

/* Add new gold glow effect animation */
@keyframes goldGlow {
  0% {
    text-shadow: none;
  }
  50% {
    text-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700, 0 0 30px #ffed4a;
  }
  100% {
    text-shadow: none;
  }
}

.gold-value-changed {
  animation: goldGlow 1s ease-out;
}

#clear-army-button {background-color: #cd6358 !important}
#clear-army-button:hover  {background-color: #ed796d !important}

/* Add hero stat card styles */
.hero-stats {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 18px;
  background: rgba(212, 163, 115, 0.8);
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 1001;
  color: #3b2d1f;
  width: 200px;
}

.hero-stats .username {
  font-weight: bold;
  font-size: 20px;
  text-align: center;
  margin-bottom: 5px;
}

.hero-stats .level {
  text-align: center;
  margin-bottom: 5px;
}

.hero-stats .talent-points {
  text-align: center;
  margin-bottom: 5px;
  color: #8B008B;
}

.experience-bar {
  height: 20px;
  background: #3b2d1f;
  border-radius: 10px;
  margin: 5px 0;
  overflow: hidden;
}

.experience-fill {
  height: 100%;
  background: #8B008B;
  width: 0%;
  transition: width 0.5s ease-out;
}

/* Adjust for mobile */
@media screen and (max-width: 768px) {
  .hero-stats {
    position: static;
    margin: 10px auto;
    width: fit-content;
  }
  
  /* Since we moved hero stats, also adjust timerDisplay position */
  .timer-display {
    top: 180px !important;
  }
}

/* Add dynamic positioning for right-side panels */
@media screen and (min-width: 769px) {
  /* When hero stats is hidden, move gold display up */
  .hero-stats.hidden + .global-gold {
    top: 20px;
  }
  
  /* When hero stats is hidden and gold is visible, move army list up */
  .hero-stats.hidden + .global-gold + .army-list {
    top: 120px;
  }
  
  /* When hero stats is visible but gold is hidden, move army list up */
  .hero-stats:not(.hidden) + .global-gold.hidden + .army-list {
    top: 170px;  
  }
  
  /* When both hero stats and gold are hidden, move army list to top */
  .hero-stats.hidden + .global-gold.hidden + .army-list {
    top: 20px;
  }
}

.hero-stats .talents-button {
  display: block;
  margin: 10px auto 5px;
  padding: 5px 15px;
  background: #d4a373;
  color: #3b2d1f;
  border: 1px solid #8c6b4f;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

.hero-stats .talents-button:hover {
  background: #e0ac69;
}

/* Talent modal styles */
.talents-modal {
  width: 500px;
  max-width: 90vw;
}

.talent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 15px 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.talent-name {
  font-weight: bold;
  width: 30%;
}

.talent-description {
  flex-grow: 1;
  font-size: 14px;
  padding: 0 10px;
}

.talent-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.talent-value {
  font-size: 20px;
  font-weight: bold;
  width: 20px;
  text-align: center;
}

.talent-minus, .talent-plus {
  width: 30px;
  height: 30px;
  font-size: 20px;
  line-height: 1;
  padding: 0;
}

.talent-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.talent-buttons button {
  padding: 10px 15px;
}

/* Battle talents display */
.battle-talents-display {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(212, 163, 115, 0.9);
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 1000;
  color: #3b2d1f;
  display: flex;
  gap: 10px;
  border: 2px solid #8c6b4f;
}

.battle-talents-container {
  display: flex;
  gap: 30px;
}

.player-talents, .opponent-talents {
  display: flex;
  flex-direction: column;
}

.talent-header {
  font-weight: bold;
  margin-bottom: 5px;
}

.talent-list {
  display: flex;
  gap: 10px;
}

.talent-item {
  background: rgba(255, 255, 255, 0.5);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 14px;
}

/* For mobile */
@media screen and (max-width: 768px) {
  .battle-talents-display {
    width: 90%;
    font-size: 12px;
    padding: 5px 10px;
  }
  
  .battle-talents-container {
    gap: 15px;
  }
  
  .talent-item {
    font-size: 12px;
    padding: 2px 5px;
  }
}

.loading-popup {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(212, 163, 115, 0.95);
  border: 2px solid #8c6b4f;
  border-radius: 8px;
  padding: 15px;
  width: 300px;
  z-index: 10000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: opacity 1s ease;
}

.loading-content h3 {
  color: #3b2d1f;
  margin-top: 0;
  margin-bottom: 10px;
  text-align: center;
}

.progress-container {
  background: rgba(255, 255, 255, 0.3);
  height: 20px;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: #3b2d1f;
  width: 0%;
  transition: width 0.3s ease;
}

.loading-details {
  color: #3b2d1f;
  font-size: 14px;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loading-stats {
  color: #3b2d1f;
  font-size: 14px;
  text-align: right;
}

.fade-out {
  opacity: 0;
}

@media screen and (max-width: 768px) {
  .loading-popup {
    width: 250px;
    bottom: 10px;
    right: 10px;
    padding: 10px;
  }
}

.image-preloader {
  position: fixed;
  bottom: 10px;
  left: 10px;
  opacity: 0.01;
  z-index: 1000;
  pointer-events: none;
  transition: opacity 1s ease;
  display: flex;
  flex-wrap: wrap;
  max-width: 200px;
  max-height: 200px;
  overflow: hidden;
}

.image-preloader img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.image-preloader.hidden {
  opacity: 0;
}