html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
.container {
  top: 20vh;    
  left: 15vw;   
  width: 60vw;  
  height: auto; 
}


.main-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 60px); 
  padding: 20px;
  box-sizing: border-box;
}

.table-container {
  width: 100%;
  max-width: 900px;
  background: rgba(255,255,255,0.95);
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  overflow-x: auto;
}
:disabled{
  color:black;
}
.DigiDetails{
        display: none;
        position: fixed;
        top: 15%;
        left: 50%;
        margin-top: 18%;
        transform: translate(-50%, -50%);
        border: 1px solid #ccc;
        background-color: white;
        padding: 25px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        z-index: 9999;
        min-width: 300px;
                vertical-align: baseline;
}
.horizontal{
      width:100%;
  display: flex;
  justify-content: center;
  gap: 50px;

}
table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  font-size: 15px;
}


th, td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
}


th {
  background-color: #4CAF50;
  color: white;
}
th .th-text {
  display: inline-block;
  margin-left: 20px;
}
th .th-textSpec {
  display: inline-block;
  margin-left: 10px;
}
table th {
  text-align: center;
  padding-left: 0;
}


tr:nth-child(even) {
  background-color: #f9f9f9;
}
td:nth-child(2), th:nth-child(2) {
  white-space: normal;
  word-break: break-word;
  max-width: 150px;
}

.row-number {
  position: absolute;
  left: 5px;        
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  color: black;
}
td img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

#addDigimon,
#DigiList,
.battle-button,
#userTable,
#digimon-select-container,
.bar,
.register-container,
.message,
.forgot-container,
.reset-container,
.shopT,
.bagT {
  display: none;
}

.disabled-btn {
  pointer-events: none;
  opacity: 0.6;
}



.battle-wrapper {
  width: 100%;
  display: flex;
  justify-content: center; 
  margin: 0;
}

.battle-button {
  padding: 10px 20px;
  background-color: crimson;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.message {
  position: fixed; 
  width: 800px;
  height: 80px;
  margin-top: 10%;
  margin-left: 30%;
  padding: 10px;
  border: 5px solid gray;
  background-color: white;
  text-align: center;
}
.progress-wrapper {
  width: 100%;
  height: 15px;
  background-color: #ddd;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: #4caf50; 
  transition: width 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: bold;
  background-color: skyblue !important;
}


.progress-text {
  padding: 0 4px;
}



.digimon-warning {
  color: red;    
  margin: 5px 0;
}

.center-text {
  text-align: center;  
  width: 100%;
  display: block;
}

.menu{
  position: absolute;
  right: 0;  
}

.dropdown-menu {
  display: flex;
  flex-direction: column;
  padding: 0; 
}

.dropdown-item {
  width: 100%;
  text-align: left;
}
.pagination-wrapper {
  display: flex;
  justify-content: flex-start;  
  margin: 10px 20px;
}



.pagination li a {
  padding: 6px 12px;
  text-decoration: none;
  color: black;
  border: 1px solid black;
  border-radius: 5px;
  transition: background-color 0.2s;
}


/* LoginPage */

.login-container {
  width: 260px;
  padding: 20px;
  margin: 50px auto;
  background: #f5f5f5;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  font-family: Arial, sans-serif;
}

.login-form {
  display: flex;
  flex-direction: column;
}

.login-form label {
  margin: 10px 0 5px;
  font-weight: bold;
  color: #888;
}

.login-form input {
  margin: 0.5vw;
  border-radius: 4px;
  margin-left: -2px;
}
.login-btn {
  margin: 20px 0 10px;
  height: 40px;
  border: none;
  border-radius: 4px;
  background: linear-gradient(to bottom, #fbdc70 0%, #f8b500 100%);
  color: black;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 0 #d49900;
}

.login-btn:hover {
  background: linear-gradient(to bottom, #ffe08a 0%, #ffbd2b 100%);
  color: white;
  text-decoration: none;
}

.register-btn {
  margin: 10px 0;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background: linear-gradient(to bottom, #a8e063 0%, #56ab2f 100%);
  color: black;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  box-shadow: 0 2px 0 #3d7a1f;
  display: block;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.register-btn:hover {
  background: linear-gradient(to bottom, #bff199 0%, #6fcf3b 100%);
  text-decoration: none;
  color: white;
}



.forgot-password {
  text-align: center;
  color: #333;
  text-decoration: none;
  display: block;
  margin-top: 10px;
}
 .forgot-password:hover {
  text-decoration: underline;
}

/* register */
.register-container {
  width: 300px;
  margin: 50px auto;
  padding: 25px;
  background-color: #f5f5f5;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
  font-family: Arial, sans-serif;
}

.register-container h2 {
  text-align: center;
  color: #888;
  margin-bottom: 20px;
  font-size: 20px;
}

.highlight {
  color: #00aaff;
  font-weight: bold;
}

.register-form {
  display: flex;
  flex-direction: column;
}

.register-form label {
  margin: 10px 0 5px;
  font-weight: bold;
  color: #666;
}

.register-form input {
  height: 35px;
  padding: 5px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  transition: border 0.2s ease;
}

.register-form input:focus {
  border-color: #00aaff;
  outline: none;
}

.create-btn {
  margin-top: 20px;
  height: 40px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(to bottom, #00c6ff 0%, #0072ff 100%);
  color: black;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 2px 0 #005bbf;
  transition: background 0.3s ease;
}

.create-btn:hover {
    background: linear-gradient(to bottom, #00c6ff 0%, #0072ff 100%);
  text-decoration: none;
  color: white;
}


/* NavBar */
.navbar {
  background-color: #333;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.navbar a {
  font-size: 16px;
  color: white;
  text-decoration: none;
  padding: 14px 16px;
}

.navbar .logout-btn {
  margin-left: auto; 
}
.money-display {
    margin-left: auto;        
    margin-right: 12%;        
    color: yellow;           
    font-weight: bold;        
    font-size: 20px;
}


/* BattleSystem */
.battle-container {
   display: none;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  gap: 20px;
}
body {
  background-image: url("/assets/photos/Digimonbackground.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  margin: 0;
  font-family: Arial, sans-serif;
}

.display-screen {
  background-image: url("/assets/photos/Digimonbeach.jpg");
  background-color: white;
  border: 3px solid #000;
  width: 600px;
  height: 250px;
  position: relative; 
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.battle-screen {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background-color: #dbeeff;
  border: 2px solid #333;
  padding: 20px;
  width: 600px;
  height: 200px;
  font-family: 'Verdana', sans-serif;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.text-box {
  width: 60%;
  background-color: white;
  border: 2px solid #000;
  padding: 15px;
  font-size: 16px;
  height: 100%;
  box-sizing: border-box;
}

.options-box {
  width: 35%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  height: 100%;
}

.battle-btn {
  background: linear-gradient(to bottom, #fbdc70, #f8b500);
  border: 2px solid #a67600;
  border-radius: 6px;
  padding: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.battle-btn:hover {
  background: linear-gradient(to bottom, #ffe08a, #ffbd2b);
}

.battle-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.progress-wrapper-battle {
  width: 100%;
  height: 20px;
  background-color: #eee;
  border-radius: 10px;
  border: 2px black;
  overflow: hidden;
  position: relative;
}

.opponent-health-bar{
  margin-right: 340px;
  margin-top: 5px;
  
  width: 250px;
  height: 40px;
  border: 2px solid #fff;
  border-radius: 20px;
  
  padding: 7px;

  background: gray;

}

.opponent-percentage{
  width: 99%;
  margin: 0 auto;
  background: red;
  
  color: #333;
  font-weight: 700;
  text-align: center;
  border-radius: 15px;
}

.opponent-digimon-img {
  width: 30%;
  height: 170px;
  image-rendering: pixelated;
  position: absolute;
  top: 0%;
  right: 7%;
}
#opponent-battleName {
  white-space: nowrap;
}

.your-percentage{
  width: 99%;
  margin: 0 auto;
  background: red;
  
  color: #333;
  font-weight: 700;
  text-align: center;
  border-radius: 15px;
}

.your-health-bar{
  margin-top: 26%;
  margin-left: 57.7%;
  width: 250px;
  height: 40px;
  border: 2px solid white;
  border-radius: 20px;
  
  padding: 7px;

  background: grey;

}

.your-digimon-img {
  width: 30%;
  height: 170px;
  image-rendering: pixelated;
  position: absolute;
  bottom: 0%;
  left: 7%;
}
.your-battleName{
   position: absolute;
  bottom: 15%;
  left:59%
}

/* forgetpasspage */



  .forgot-container {
      background: #f5f5f5;
      padding: 20px 30px;
      border-radius: 10px;
      width: 250px;
      margin: 50px auto;
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .forgot-container h2 {
      text-align: center;
      margin-bottom: 20px;
    }

    label {
      display: block;
      margin: 10px 0 5px;
      font-weight: bold;
      color: #777;
    }
    input[type="text"],
    input[type="email"],
    input[type="password"] {
      width: 100%;
      padding: 8px;
      margin-bottom: 10px;
      border: 1px solid #aaa;
      border-radius: 5px;
    }

    .reset-btn {
      background: linear-gradient(to bottom, #fbdc70 0%, red 100%);
      color: black;
      font-weight: bold;
      border: none;
      width: 100%;
      padding: 10px;
      border-radius: 6px;
      box-shadow: 0 2px 0 #d49900;
      cursor: pointer;
    }

    .reset-btn:hover {
      background: linear-gradient(to bottom, #ffe08a 0%, red 100%);
      color: white;
    }

    .back-link {
      display: block;
      text-align: center;
      margin-top: 15px;
      color: #555;
      text-decoration: none;
    }

    .back-link:hover {
      text-decoration: underline;
    }




/* reset password */ 


.reset-container {
  width: 260px;
  padding: 20px;
  margin: 50px auto;
  background: #f5f5f5;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  font-family: Arial, sans-serif;
}

.reset-form {
  display: flex;
  flex-direction: column;
}

.reset-form label {
  margin: 10px 0 5px;
  font-weight: bold;
  color: #888;
}

.reset-form input {
  margin: 0.5vw;
  border-radius: 4px;
  margin-left: -2px;
}
.Creset-btn {
  margin: 20px 0 10px;
  height: 40px;
  border: none;
  border-radius: 4px;
  background: linear-gradient(to bottom, #fbdc70 0%, #f8b500 100%);
  color: black;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 0 #d49900;
}

.Creset-btn:hover {
  background: linear-gradient(to bottom, #ffe08a 0%, #ffbd2b 100%);
  color: white;
  text-decoration: none;
}


/* statistic */
.statistic-container {
  width: 95%;
  max-width: 700px;
  background-color: #f5f5f5;
  border-radius: 8px;
  border: 4px solid #000;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;   
  align-items: flex-start;  
  gap: 40px;                 


.statistic-main {
  flex: 0 0 65%;   
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
}


.statistic-photo {
  width: 140px;
  height: auto;
  margin: 15px 0;
}


.canvas-chart {
  width: 100%;
  max-width: 400px;
}

#winsCanvas,
#losesCanvas {
  margin-top: 15%;
  width: 250px !important;
  height: 140px !important;
}
.statistic-photo:not([src]), 
.statistic-photo[src=""] {
  display: none;
}

/* shop+inventory */

.use-btn {
  background-color: #4CAF50;    
  color: white;                   
  padding: 6px 14px;             
  border: 2px solid black;       
  border-radius: 8px;             
  font-weight: bold;              
  text-transform: uppercase;     
  letter-spacing: 1px;            
  cursor: pointer;
  box-shadow: 2px 2px 0px black;  
}

.use-btn:hover {
  background-color: #388E3C;       
  transform: translateY(-2px);    
  box-shadow: 4px 4px 0px black; 
}




@media (max-width: 768px) {
  .table-container {
    max-width: 100%;
    margin: 0 10px;
    padding: 10px;
  }

  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    margin-bottom: 15px;
    background: white;
    border-radius: 8px;
    padding: 10px;
  }

  td {
    text-align: left;
    padding-left: 50%;
    position: relative;
  }

  td::before {
    content: attr(data-label);
    position: absolute;
    left: 15px;
    font-weight: bold;
  } 
    .statistic-container {
    width: 95%;
    padding: 15px;
  }

  .statistic-photo {
    max-width: 120px;
    max-height: 120px;
  }

  #winsCanvas, #losesCanvas {
    width: 80px !important;
    height: 80px !important;
  }

}
}