
  @font-face {
  font-family: myFont; /* set name */
  src: url(font.TTF); /* url of the font */
}
  @font-face {
  font-family: digi; /* set name */
  src: url(DS-DIGI.TTF); /* url of the font */
}
  button{
    font-family: 'myFont', sans-serif
  }

  body {
    margin: 0px;
    font-family: 'myFont', sans-serif;
    background: radial-gradient(circle at center, #003399 0%, #002255 100%);
    color: #eee;
    text-align: center;
    padding: 20px;
    overflow-x: hidden;
  }
  h1, h2, h3, .achievementTitle {
    color: #f3c96a;
    text-shadow: 0 0 6px #000;
  }
  .achievementText{
    font-style:italic
  }
  .achievement_list{
    text-align:left;
  }
  button {
    margin: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #004c4d, darkcyan);
    color: #fff;
    font-weight: bold;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
  }
  button:disabled {
    background: linear-gradient(135deg, grey, darkslategray) !important;
  }
  button:hover {
    background: linear-gradient(135deg, #666, #333);
    transform: scale(1.05);
  }

  .panel { margin: 12px auto; max-width: 1200px; }

  /* 🎬 Fade transition for screens */
  .screen {
    display: none;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .screen.active {
    display: block;
    opacity: 1;
    transform: scale(1);
  }

  .glow {
    box-shadow: 0px 0px 30px 1px #0ff;
  }
.show {
  transition: opacity 400ms;
}
.hide {
  opacity: 0;
}
#popup_container{
  position: fixed;
  bottom: 100px;
  right: 50px;
}

#fixed_popup_container{
  position: fixed;
  top: 20%;
  left: 20%;
}

#explanation_div{
  width: 200px;
  border:solid;
  position: fixed;
  background-color:darkslategray;
  display: none;
}
#health_bar_text {
  width: 300px;
  position: fixed;
  top: 625px;
  height: 20px;
  right: 10px;
  border-radius: 15px;
  padding-top: 10px;
  z-index: 4;
}

#nesCanvas {
    width: 500px;   /* 256 × 3 */
    height: 400px;  /* 240 × 3 */
    image-rendering: pixelated;      /* keeps sharp pixels */
}
#bossName {
  position: fixed;
  top: 570px;
  height: 20px;
  right: 10px;
  width: 300px;
  z-index: 4;
}
#health_bar_depleted{
  width: 0;
  background-color: black;
  border:solid;position: fixed;
  top: 625px;
  height: 20px;
  right: 10px;
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
  padding-top: 10px;
  z-index: 1;
}

#health_bar_full{
  width: 300px;
  background-color:red;
  border:solid;
  position: fixed;
  top: 625px;
  height: 20px;
  right: 10px;
  border-radius: 15px;
  padding-top: 10px;
}

#bossDiv{
  position: fixed;
  right: 500px;
  top: -221px;
  width: 200px;
}
.miniatures {
  position: relative;
  top: 75%;
  font-size: 200%;
  width: 130%;
  opacity: 100%
}
.card:hover .miniatures {
  opacity: 0
}
.miniature{
  background-color: black;
  margin-right: -10px;
  margin-left: -5px;
}
.equipment_box{
  width: 40%;
  display: inline-block !important;
  border: solid;
  border-radius: 15px;
  padding: 6px;
  margin: 6px;
  background: brown;
  opacity: 0
}
.card:hover .equipment_box{
  opacity: 100%
}
.compact .equipment_box{
  width: 70%;
}

.popup_screen{
  display: block;
  border: solid;
  border-radius: 5%;
  width: 400px;
  color:black;
  background: mintcream;
}

.fixed_popup_screen{
  display: block;
  border: solid;
  border-radius: 5%;
  width: 1000px;
  color:black;
  background: mintcream;
}

.popup_title{
  margin:15px;
  color:darkblue;
  text-shadow:none;
}
.popup-img{
  width:25%;
  display:inline;
}
.fixed-popup-img{
  width:25%;
  display:inline;
  padding:5px;
  margin-right:20px
}
.popup_content{
  display:inline-block;
  width:70%;
  vertical-align:top;
}
.popup_contentcontent{
  display:inline-block;
  vertical-align:middle;
  text-align: left;
  width:60%;
  line-height: 1.2;
}
.popup_contentimage{
  display:inline-block;
  vertical-align:middle;
  width:40%
}
  .row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-left:10px}

  #settingsBtn {
    transform: rotate(5deg);
    position: fixed;
    padding: 0;
    bottom: -225px;
    right: 85px;
    width: 220px;
    background: linear-gradient(135deg, whitesmoke, white) !important;
    color: black;
    text-align: left;
  }
  #extraBtn {
    transform: rotate(5deg);
    position: fixed;
    padding: 0;
    bottom: -305px;
    right: 85px;
    width: 220px;
    background: linear-gradient(135deg, whitesmoke, white) !important;
    color: black;
    text-align: left;
  }
  #scartoffieBtn {
    transform: rotate(5deg);
    position: fixed;
    padding: 0;
    bottom: -145px;
    right: 85px;
    width: 220px;
    background: linear-gradient(135deg, whitesmoke, white) !important;
    color: black;
    text-align: left;
  }
  .falce_martello{
    font-size: 55px;
    display: inline-block;
    width: 20%;
  }
  .cassetto_label{
    margin-left: 20px;
    display: inline-block;
    width: 58%;
  }
  /* 🎴 Card Styling */
  .card {
    background-size: cover !important;
    background-position: center !important;
    height:300px;
    border: 2px solid #555;
    border-radius: 12px;
    padding: 10px;
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
  }
  .cardTitleS{
    background:black;
    border-radius: 10px;
    padding: 5px;
  }

  .card_content{
    display:inline-block;
    background:black;
    opacity:0;
  }

  .card_content:hover{
    display:inline-block;
    opacity:100%;
  }
  .card:hover .card_content{
    display:inline-block;
    opacity:100%;
  }
  .compact{
   width: 170px !important;
    font-size: 13px;
  }
  .minEquip{
    width: 25%!important;
    height: 20%!important;
    position: relative;
    left: 35%;
    bottom: 46%;
    opacity: 100%
  }
  .minEquip:hover{
    opacity: 0;
  }
  .card:hover .minEquip{
    opacity: 0;
  }
  .equipped{
    width: 300px;
  }
  .equipment{
    border: 4px solid gold;
  }
  .equipped .card_content{
    width: 40%
  }
  .compact .card_content{
    width: 100% !important
  }

  .secret {
    border: 4px solid darkmagenta;
  }

  .sofa {
    padding:20px;
    background: linear-gradient(160deg, seagreen, #00005B);
    border: 2px solid #555;
    border-radius: 12px;
    display:inline-block;
    width: 260px;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }
  #login{
    border: solid;
    border-radius: 20px;
    background: border-box;
    color: white;
    font-family: 'myFont', sans-serif;
    height: 15px;
  }
  .obj {
    padding:0px;
    background: linear-gradient(160deg, darkviolet, darkred);
    border: 2px solid #555;
    border-radius: 12px;
    display:inline-block;
    width: 500px;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  .level_description {
    background: linear-gradient(160deg, seagreen, #00005B);
    border: 2px solid #555;
    border-radius: 12px;
    display:inline-block;
    margin-bottom: 30px;
    width: 90%;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }
  .uscita {
    padding:20px;
    background: linear-gradient(160deg, seagreen, #00005B);
    border: 2px solid #555;
    border-radius: 12px;
    display:inline-block;
    width: 200px;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  .card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 18px rgba(0,0,0,0.5);
  }
  .card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #666;
  }
  .card strong {
    font-size: 1.1em;
    color: #f3c96a;
    margin-top: 6px;
  }
  .card .desc {
    font-size: 0.9em;
    color: #ccc;
    margin: 4px 0;
  }
  .card .stat {
    font-size: 0.85em;
    color: #aaa;
  }

  #deck, #hand {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
  }
  .small { font-size: 12px; color: #ccc; }