﻿html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Arial, sans-serif;
  background: linear-gradient(to top, #000000, #ffffff);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: 100% 100%;
  color: #ffffff;
}

a {
  color: white;
  text-decoration: none;
}

button {
  background-color: #000000;
  color: #ffffff;
  border: 2px solid #ffffff;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 15px;
  transition: all 0.3s ease;
  border-radius: 12px;
}

button:hover {
  background-color: #ffffff;
  color: #000000;
  transform: scale(1.05);
}

button:hover a {
  color: #000000;
}

.button-text {
  display: block;
  text-align: center;
  font-size: 36px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 20px;
}

.button-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 60px;
  flex-wrap: wrap;
  padding: 30px 20px;
}

.button-container .fade-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-width: 240px;
  max-width: 320px;
}

.ellenfelek {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
}

.ellenfelek a,
.ellenfelek button {
  width: 180px;
}

.title-animation {
  text-align: center;
  color: black;
  margin-top: 10%;
}

.Logo {
  display: block;
  margin: 20px auto;
  width: 150px;
  height: auto;
  animation: logoBounce 1.5s ease infinite;
}

@keyframes logoBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.game-page {
  position: relative;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
  color: #000000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.game-page.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.game-page.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.countdown-overlay,
.game-over-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  background: rgba(255, 255, 255, 0.95);
  z-index: 1001;
  text-align: center;
  padding: 24px;
  color: #000000;
}

.countdown-overlay.hidden,
.game-over-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.countdown-overlay.visible,
.game-over-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.countdown-number {
  font-size: 6rem;
  font-weight: 900;
  animation: countdownPop 0.8s ease infinite;
}

.countdown-label {
  font-size: 1.2rem;
  font-weight: 600;
}

.game-over-message {
  font-size: 3rem;
  font-weight: 900;
  color: #d80000;
  text-shadow: 0 0 24px rgba(216, 0, 0, 0.45);
}

#new-game-button {
  background: #d80000;
  border-color: #a00000;
  color: white;
  padding: 14px 28px;
  font-size: 1rem;
}

@keyframes countdownPop {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.25);
  }
}

.game-page a {
  color: #000000;
}

.game-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 280px minmax(220px, 1fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 30px;
}

.status-card {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #000000;
}

.status-card h1 {
  margin: 0;
  font-size: 1.8rem;
}

.round-card,
.side-card {
  color: #000000;
}

.health-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.health-label {
  font-size: 0.95rem;
  opacity: 0.8;
}

.health-track {
  flex: 1;
  min-width: 180px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.health-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #00ff88, #22cfe8);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.health-fill.robot {
  background: linear-gradient(90deg, #ff4f8b, #f5d15a);
}

.health-value {
  min-width: 70px;
  text-align: right;
  font-weight: bold;
}

.status-label {
  font-size: 0.95rem;
  color: #000000;
}

.round-card {
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  min-height: 220px;
  text-align: center;
}

.round-number {
  font-size: 2rem;
  font-weight: 700;
}

.battle-message {
  font-size: 1rem;
  line-height: 1.5;
  min-height: 56px;
}

.game-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.game-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 540px;
}

.game-side h2 {
  margin-bottom: 16px;
}

.side-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 24px;
  box-sizing: border-box;
  text-align: center;
}

.placeholderimg,
.robotimg {
  width: 320px;
  max-width: 320px;
  height: auto;
  object-fit: contain;
  margin-bottom: 18px;
}

.kezjelek {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.vs-label {
  font-size: 3rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 40px;
  color: #000000;
  text-shadow: none;
}

.hotbar {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.hotbar-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 90px;
  min-height: 52px;
  padding: 10px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  color: #000000;
}

.hotbar-slot img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.hotbar-slot.empty {
  opacity: 0.45;
}

.robot-note {
  margin-top: 16px;
  font-size: 0.95rem;
  opacity: 0.85;
}

.chest-panel {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) scale(0.95);
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-radius: 24px;
  padding: 22px 24px;
  width: min(640px, calc(100% - 40px));
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  color: #000000;
  z-index: 999;
}

.chest-panel.visible {
  animation: chestFadeIn 0.6s ease forwards, chestShake 1s 0.1s ease-in-out;
}

.chest-panel.fade-out {
  animation: chestFadeOut 0.5s ease forwards;
}

.chest-panel.hidden {
  opacity: 0;
}

.chest-img {
  width: 96px;
  height: auto;
}

@keyframes chestFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes chestFadeOut {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(20px) scale(0.95);
  }
}

.chest-text {
  font-size: 1.1rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.chest-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.96rem;
}

.chest-item-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chest-item-label img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

@keyframes chestFade {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes chestShake {
  0%, 100% {
    transform: translateX(-50%) translateY(0) rotate(0deg);
  }
  20% {
    transform: translateX(-50%) translateY(0) rotate(-4deg);
  }
  40% {
    transform: translateX(-50%) translateY(0) rotate(4deg);
  }
  60% {
    transform: translateX(-50%) translateY(0) rotate(-3deg);
  }
  80% {
    transform: translateX(-50%) translateY(0) rotate(3deg);
  }
}

@media (max-width: 1024px) {
  .game-header {
    grid-template-columns: 1fr;
  }

  .vs-label {
    margin-top: 0;
    margin-bottom: 24px;
  }
}

@media (max-width: 760px) {
  .game-container {
    flex-direction: column;
    align-items: center;
  }

  .game-side {
    max-width: 100%;
  }

  .placeholderimg,
  .robotimg {
    width: 100%;
    max-width: 260px;
    height: auto;
  }

  .button-container {
    flex-direction: column;
    gap: 24px;
    align-items: center;
  }

  .chest-panel {
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .game-header {
    gap: 14px;
  }

  .status-card,
  .round-card,
  .side-card {
    padding: 16px;
  }

  .health-track {
    min-width: 120px;
  }

  .hotbar-slot {
    min-width: 70px;
    padding: 8px;
    font-size: 14px;
  }

  .vs-label {
    font-size: 2.2rem;
    margin-top: 24px;
    margin-bottom: 24px;
  }

  .button-text,
  .round-number {
    font-size: 1.8rem;
  }

  .battle-message {
    font-size: 0.95rem;
  }

  .chest-panel {
    padding: 16px;
  }
}
