/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #fff;
  overflow-x: hidden;
  position: relative;
}

/* Coin Counter */
.coin-counter {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  font-size: 1.1rem;
  font-weight: 700;
}

.coin-icon {
  font-size: 1.3rem;
}

#coinCounterValue {
  color: #fbbf24;
  min-width: 40px;
  text-align: right;
}

/* Screen Management */
.screen {
  display: none;
  min-height: 100vh;
  padding: 2rem;
  position: relative;
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Game Screen Background Overlay - Dawncaster Style */
#gameScreen {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image 0.5s ease-in-out;
  filter: brightness(0.75) contrast(1.1) saturate(0.95);
}

#gameScreen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

#gameScreen > * {
  position: relative;
  z-index: 1;
}

/* Battle Screen Background Overlay - Dawncaster Style */
#battleScreen {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image 0.5s ease-in-out;
  filter: brightness(0.7) contrast(1.15) saturate(0.9);
}

#battleScreen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

#battleScreen > * {
  position: relative;
  z-index: 1;
}

/* Menu Container */
.menu-container {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 3rem;
  max-width: 600px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.3);
  z-index: 10;
  position: relative;
}

.game-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  background: linear-gradient(45deg, #fff, #e0e0e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

/* Player Stats */
.player-stats {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.stats-header h3 {
  margin-bottom: 1rem;
  color: #fbbf24;
  text-align: center;
  font-size: 1.3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 0.95rem;
}

.stat-item .stat-label {
  opacity: 0.9;
  font-weight: 600;
}

.stat-item .stat-value {
  font-weight: 700;
  color: #4ade80;
  margin-left: auto;
  margin-right: 0.5rem;
}

.stat-item .stat-upgrade {
  font-size: 0.85rem;
  color: #fbbf24;
  opacity: 0.8;
}

/* Buttons */
.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

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

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Shop Screen */
.shop-coins {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.shop-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
  max-height: 400px;
  overflow-y: auto;
}

.shop-item {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.shop-item-info {
  flex: 1;
}

.shop-item-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.shop-item-description {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.shop-item-level {
  font-size: 0.85rem;
  color: #fbbf24;
}

.shop-item-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fbbf24;
  margin-right: 1rem;
}

.shop-item-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  min-width: 120px;
}

.shop-item-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.shop-item-btn.buy {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.shop-item-btn.buy:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.shop-item-btn.maxed {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
}

.shop-items::-webkit-scrollbar {
  width: 8px;
}

.shop-items::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.shop-items::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

/* Encyclopedia Screen */
.encyclopedia-content {
  max-height: 500px;
  overflow-y: auto;
  margin: 2rem 0;
}

.encyclopedia-stats {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.stat-summary h3 {
  margin-bottom: 1rem;
  color: #fbbf24;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-name {
  font-weight: 600;
  opacity: 0.9;
}

.enemies-list h3 {
  margin-bottom: 1rem;
  color: #fbbf24;
}

.enemies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.enemy-card {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1rem;
  transition: all 0.3s ease;
}

.enemy-card:hover {
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.enemy-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-align: center;
  color: #fbbf24;
}

.enemy-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.enemy-stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.enemy-stat .stat-label {
  opacity: 0.8;
}

.enemy-stat .stat-value {
  font-weight: 600;
  color: #4ade80;
}

.encyclopedia-content::-webkit-scrollbar {
  width: 8px;
}

.encyclopedia-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.encyclopedia-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.encyclopedia-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Worlds Screen */
.worlds-content {
  max-height: 500px;
  overflow-y: auto;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.world-card {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.world-card:hover {
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.world-number {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 0.5rem;
}

.world-title-card {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #fff;
}

.world-description {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.9;
}

.worlds-content::-webkit-scrollbar {
  width: 8px;
}

.worlds-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.worlds-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.worlds-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Instructions */
.instructions {
  text-align: left;
  margin: 2rem 0;
  line-height: 1.8;
  max-height: 500px;
  overflow-y: auto;
}

.instructions h3 {
  color: #fbbf24;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.instructions h3:first-child {
  margin-top: 0;
}

.instructions p {
  margin-bottom: 1rem;
}

.instructions ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.instructions li {
  margin-bottom: 0.5rem;
}

.instructions strong {
  color: #fbbf24;
  font-weight: 700;
}

.instructions::-webkit-scrollbar {
  width: 8px;
}

.instructions::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.instructions::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.instructions::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Game UI */
#game-ui {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.ui-top {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0.75rem 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Game Content */
.game-content {
  margin-top: 120px;
  max-width: 800px;
  width: 100%;
  padding: 2rem;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.world-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.5s ease;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 10;
  position: relative;
}

.story-text {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: fadeIn 0.5s ease;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 10;
  position: relative;
}

/* Choices */
.choices-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fadeIn 0.5s ease 0.2s both;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.choices-container::-webkit-scrollbar {
  width: 8px;
}

.choices-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.choices-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.choices-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.choice-btn {
  padding: 1.2rem 1.5rem;
  font-size: 1rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  position: relative;
  overflow: visible;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.choice-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.choice-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(10px);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.choice-btn:hover::before {
  left: 100%;
}

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

.choice-btn.dangerous {
  background: rgba(220, 38, 38, 0.3);
  border-color: rgba(220, 38, 38, 0.6);
  animation: pulse-danger 2s ease-in-out infinite;
}

.choice-btn.dangerous:hover {
  background: rgba(220, 38, 38, 0.4);
  border-color: rgba(220, 38, 38, 0.8);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.choice-btn.dangerous::before {
  background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.4), transparent);
}

@keyframes pulse-danger {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
  }
}

.choice-number {
  display: inline-block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  margin-right: 1rem;
  font-weight: 700;
}

.choice-btn.dangerous .choice-number {
  background: rgba(220, 38, 38, 0.5);
}

.choice-btn.rest-choice {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
}

.choice-btn.rest-choice:hover {
  background: rgba(34, 197, 94, 0.3);
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.choice-btn.rest-choice .choice-number {
  background: rgba(34, 197, 94, 0.5);
}

.choice-btn.damage-choice {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
}

.choice-btn.damage-choice:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.choice-btn.damage-choice .choice-number {
  background: rgba(239, 68, 68, 0.5);
}

.choice-text {
  flex: 1;
}

.chance-indicators {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.choice-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chance-battle {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-weight: 600;
}

.chance-death {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-weight: 600;
}

.chance-rest {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-weight: 600;
}

.chance-damage {
  color: #f97316;
  background: rgba(249, 115, 22, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-weight: 600;
}

.choice-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Game Over Screen */
.game-over {
  max-width: 700px;
  background: rgba(220, 38, 38, 0.1);
  border: 2px solid rgba(220, 38, 38, 0.3);
}

.game-over-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: #ff4444;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: shake 0.5s ease-in-out;
}

.game-over-text {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  opacity: 0.9;
  color: #ffcccc;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* Ending Screen */
.ending {
  max-width: 700px;
}

.ending-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.ending-text {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.stats-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
}

.final-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 1.1rem;
}

.final-stat .label {
  opacity: 0.8;
}

.final-stat .value {
  font-weight: 700;
  font-size: 1.3rem;
}

/* Battle Screen */
.battle-content {
  margin-top: 80px;
  max-width: 800px;
  width: 100%;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.battle-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.5s ease;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(15px);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 10;
  position: relative;
  width: 100%;
}

.battle-enemy {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(15px);
  border-radius: 10px;
  padding: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 10;
  position: relative;
}

.enemy-name {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.enemy-hp-bar-container {
  position: relative;
  width: 100%;
  height: 30px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.enemy-hp-bar {
  height: 100%;
  background: #4ade80;
  transition: width 0.5s ease, background-color 0.3s ease;
  border-radius: 20px;
}

.enemy-hp-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  font-size: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 1;
}

.enemy-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: rgba(59, 130, 246, 0.2);
  border: 2px solid rgba(59, 130, 246, 0.5);
  border-radius: 6px;
  font-size: 0.85rem;
}

.block-label {
  font-weight: 600;
}

.block-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: #60a5fa;
}

.battle-player {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(15px);
  border-radius: 10px;
  padding: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 10;
  position: relative;
}

.player-name {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.player-hp-bar-container {
  position: relative;
  width: 100%;
  height: 30px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.player-hp-bar {
  height: 100%;
  background: #4ade80;
  transition: width 0.5s ease, background-color 0.3s ease;
  border-radius: 20px;
}

.player-hp-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  font-size: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 1;
}

.battle-log {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(15px);
  border-radius: 10px;
  padding: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-size: 0.95rem;
  text-align: center;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 10;
  position: relative;
}

.battle-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-start;
  width: 100%;
  position: relative;
}

.battle-btn {
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  min-width: 150px;
  flex: 1;
}

#attackBtn {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 200;
  flex: 0 0 auto;
  min-width: 150px;
}

.battle-btn:hover {
  transform: scale(1.05);
}

.battle-btn:active {
  transform: scale(0.95);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .game-title {
    font-size: 2rem;
  }
  
  .world-title {
    font-size: 1.5rem;
  }
  
  .story-text {
    font-size: 1rem;
    padding: 1.5rem;
  }
  
  .choice-btn {
    padding: 1.2rem;
    font-size: 1rem;
  }
  
  .ui-top {
    gap: 1rem;
    padding: 1rem;
  }
  
  .stat-value {
    font-size: 1.2rem;
  }
  
  .coin-counter {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
  }
  
  .coin-icon {
    font-size: 1.1rem;
  }
  
  .battle-content {
    margin-top: 90px;
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .battle-title {
    font-size: 1.2rem;
    padding: 0.4rem 0.8rem;
  }
  
  .battle-enemy,
  .battle-player {
    padding: 0.75rem;
  }
  
  .enemy-name,
  .player-name {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  
  .enemy-hp-bar-container,
  .player-hp-bar-container {
    height: 25px;
  }
  
  .battle-log {
    padding: 0.5rem;
    font-size: 0.85rem;
    min-height: 40px;
  }
  
  .battle-actions {
    gap: 0.5rem;
  }
  
  #attackBtn {
    bottom: 0.75rem;
    right: 0.75rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    min-width: 120px;
  }
  
  .battle-btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    min-width: 120px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

