*,
::before,
::after {
    box-sizing: border-box;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    text-decoration: none;  
    color: inherit;         
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
}

body, html {
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
    background: url('./assets/images/signin-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 50px;
    background: rgba(0,0,0,0.6);
    padding: 20px;
    color: white;
}

.menu {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: center;
}

.registration-box,
.welcome-wrapper,
.settings-wrapper,
.character-wrapper,
.character-stats {
    background: rgba(0,0,0,0.6);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    color: white;
}

.registration-box h1 {
    margin-bottom: 30px;
}

.registration-box input {
    padding: 10px;
    width: 250px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: none;
}

button {
    padding: 10px 30px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    background-color: #F39C12;
    color: white;
    transition: 0.3s;
}

button:hover {
    background-color: #E67E22;
}

.welcome-wrapper {
    text-align: center;
}

.welcome-text {
    font-size: 48px;
    margin-bottom: 30px;
}

.welcome-wrapper button {
    margin: 20px;
}

.settings-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.tooltip {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #F39C12;
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 5px;
    opacity: 0;
}

.card-info {
    display: flex;
    flex-direction: column;
    padding: 15px;
    gap: 10px;
    text-align: left;
}

.character-wrapper {
    position: relative;
}

#nextBtn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: gray;
    color: white;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}


#nextBtn.active {
    background: #F39C12;
}


.swiper {
    width: 100%;
    height: 100%;
    padding: 10px 20px;
}

.swiper-slide {
    width: 150px;
    height: 150px;
    position: relative;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 10px;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: transform 0.3s;
}

.swiper-slide:hover {
    transform: scale(1.05);
}

.swiper-slide.selected {
    border-color: yellow;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    border-radius: 7px;
}

.swiper-slide:hover .tooltip{
    opacity: 1;
}

.swiper-container-wrapper {
    position: relative;
    width: 650px;
    height: 190px;
    margin: 50px auto;
    display: flex;
    align-items: center;
}

.swiper-button-prev,
.swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F39C12;
    cursor: pointer;
}

.swiper-button-prev {
    left: -40px;
}

.swiper-button-next {
    right: -40px;
}


.fight-wrapper {
    display: flex;
    flex-direction: column;
}

.fight-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 1000px;
  margin: 0 auto;
}

.fighter {
  text-align: center;
  width: 200px;
}

.fighter img {
  width: 150px;
  height: 150px;
  border: 2px solid #ccc;
  border-radius: 10px;
}

.health-bar {
  width: 100%;
  height: 20px;
  background: #333;
  margin-top: 10px;
  border-radius: 5px;
  position: relative;
}

.health {
  height: 100%;
  background: linear-gradient(90deg, #2ecc71, #27ae60);
  width: 100%;
  border-radius: 5px;
  transition: width 0.3s;
}

.health-text {
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 2px #000;
    position: absolute;
    width: 100%;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    text-align: center;
}

.battle-panel {
  flex: 1;
  text-align: center;
  padding: 0 20px;
}

.zone-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
}

.zone {
  padding: 5px 10px;
  background: #eee;
  border-radius: 5px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: 0.3s;
}

.zone.selected {
  border-color: orange;
  background: #f1c40f;
}

#fightBtn {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 16px;
  background: gray;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
#fightBtn.active {
  background: #e74c3c;
}

.battle-log {
  width: 1000px;
  margin: 20px auto;
  max-height: 200px;
  overflow-y: auto;
  background: #111;
  color: white;
  padding: 10px;
  border-radius: 5px;
  font-family: monospace;
}

.log-attacker {
  color: #f39c12;
  font-weight: bold;
}

.log-defender {
  color: #e74c3c;
  font-weight: bold;
}

.log-zone {
  color: #3498db;
  font-weight: bold;
}

.log-damage {
  color: #2ecc71;
  font-weight: bold;
}

.restart-btn {
  margin: 10px 0;
  padding: 6px 12px;
  background: #27ae60;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

.restart-btn:hover {
  background: #2ecc71;
}

.character-photo img {
  width: 200px;
  height: 200px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.character-photo img:hover {
  transform: scale(1.05);
}

.orange {
  color: #F39C12;
}

.character-info {
  margin-bottom: 30px;
}

.character-info p {
  margin: 8px 0;
}

.character-stats h2 {
  margin-bottom: 20px;
  font-size: 26px;
}

#statsContainer {
  margin-top: 20px;
}

#statsContainer p {
  margin: 6px 0;
}


.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background: rgba(0,0,0,0.85); */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: #111;
  padding: 30px;
  border-radius: 12px;
  max-width: 900px;
  width: 90%;
  color: white;
  position: relative;
}

#closeModal {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
}

#backBtn {
  position: absolute;
  bottom: 20px;
  right: 120px;
}

.modal-content .character-wrapper {
  background: none;
}