@font-face {
  font-family: 'TagMarker';
  src: url('tagmarker.woff2') format('woff2');
  src: url('tagmarker.woff') format('woff');
  src: url('tagmarker.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
    font-family: 'ExcelsiorSans';
    src: url('ExcelsiorSans.woff2') format(woff2);
    src: url('ExcelsiorSans.woff') format(woff);
    src: url('ExcelsiorSans.ttf') format(truetype);
    font-weight: normal;
    font-style: normal;
}

:root {
    --gold: #e6b830;
    --red: #600c07;
    --main_grid: #5bffde;
    --secondary_grid: white;
    --text_grid: #1E1E1E;
    --text_grid_alt: #FDFDF9;
    font-size: 16px;
    --card_background: #5bffde;
    --card_cell: white;
    --card_cell_text: #1E1E1E;
    --card_title: #e6b830;
    --card_season: #e6b830;
    --card_info: #1E1E1E;
    --card_date: #e6b830;
    --card_name: #e6b830;
}

body {
    background-color: var(--red);
}

h1 {
    font-family: 'TagMarker', sans-serif;
    color: var(--gold);
    font-weight: normal;
    letter-spacing: 1px;
    font-size: clamp(2.5rem, 5vw, 6rem);
    text-align: center;
    margin-top: 1vw;
    margin-bottom: 1vw;
}

#currentDate {
    color: var(--card_date);
}

#currentName {
    color: var(--card_name);
}

.title, .season {
    font-weight: normal;
    letter-spacing: 1px;
    font-size: clamp(1.5rem, 5vw, 4rem);
    padding: 0;
}

.title {
    font-family: 'TagMarker', sans-serif;
    float: left;
    margin-left: 1vw;
    color: var(--card_title);
}

.season {
    font-family: 'ExcelsiorSans', sans-serif;
    float: right;
    margin-right: 1vw;
    color: var(--card_season);
}

#header {
    margin-bottom: 1vw;
    line-height: 1;
}

#bingus {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 0.5vw;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin: auto;
}

.cell {
    font-family: 'ExcelsiorSans', sans-serif;
    background: var(--card_cell);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    text-align: center;
    padding: 0.5vw;
    margin: 0;
    color: var(--card_cell_text);
    aspect-ratio: 1 / 1;
    background-image: url(texture.png);
    background-repeat: repeat;
    line-height: 0.9;
}

#bingus > #bonus {
    background-image: url('honglu.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#bingus > #bonus.bg-stretch {
  background-size: 100% 100%; /* forzato solo dopo il caricamento */
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5vw;
    justify-content: center;
    background-color: var(--gold);
    width: 40%;
    margin: 1vw auto;
    padding: 0.5vw;
    border-radius: 0.5rem;
    align-items: center;
}

.buttons > hr {
    border: none;
    background-color: var(--red);
    height: 0.2vw;
    margin: 0.5rem 0;
    align-self: normal;
}

.buttons > span {
    font-size: clamp(2rem, 3vw, 3rem);
    font-family: 'ExcelsiorSans', sans-serif;
    color: var(--red);
    font-weight: bold;
}

.loadImg {
    font-family: 'ExcelsiorSans', sans-serif;
    display: flex;
    flex-direction: column;
    width: fit-content;
    align-items: center;
}

.loadImg > label {
    font-size: clamp(0.8rem, 1.4vw, 1.5rem);
    color: var(--red);
    width: fit-content;
}

.loadImg > input {
    font-size: clamp(0.8rem, 1vw, 1.8rem);
    width: fit-content;
}

#fitBtn {
    font-family: 'ExcelsiorSans', sans-serif;
    width: fit-content;
    padding: 0.5vw;
    font-size: clamp(1rem, 1.5vw, 1.6rem);
    background-color: var(--red);
    color: var(--gold);
    border-radius: 0.5rem;
    border: none;
    font-weight: bold;
}

.btn {
    font-family: 'ExcelsiorSans', sans-serif;
    width: fit-content;
    padding: 0.5vw;
    font-size: clamp(1.5rem, 2vw, 2rem);
    background-color: var(--red);
    color: var(--gold);
    padding: 0.5vw;
    border-radius: 0.5rem;
    font-weight: bold;
    border: none;
}

#font-editor, #options{
    top: 1vw;
    padding: 0.5vw;
    border-radius: 6px;
    width: fit-content;
}

#font-editor {
    display: none;
    position: fixed;
    flex-direction: column;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    background-color: var(--gold);
    color: var(--red);
    border: 3px solid var(--red);
}

#options {
    margin: auto;
    background-color: var(--red);
    color: var(--gold);
}

#card {
    display: flex;
    flex-direction: column;
    width: 90vw;
    max-width: 1000px;
    background-color: var(--card_background);
    background-image: url(texture.png);
    background-repeat: repeat;
    margin: auto;
    padding: 1vw;
}

#info {
    display: flex;
    flex-direction: column;
    gap: 0.5vw;
    margin-top: 1vw;
    text-align: center;
    color: var(--card_info);
    font-size: clamp(0.8rem, 2vw, 2rem);
    font-family: 'ExcelsiorSans', sans-serif;
}

#info > i {
    flex: 2;
}

#info > b {
    flex: 1;
}

#autoSize {
    font-size: clamp(1.5rem, 2vw, 2rem);
    color: var(--red);
}

#autoSize > input {
    accent-color: var(--red);
    width: clamp(1.5rem, 2vw, 2rem);
    height: clamp(1.5rem, 2vw, 2rem);
}

.colorPickers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1vw;
  padding: 1vw;
  background-color: var(--red);
  border-radius: 0.5rem;
  width: fit-content;
}

.colorPickers label {
    display: block;
    font-weight: bold;
    font-size: clamp(0.8rem, 1vw, 1.5rem);
    color: var(--gold);
}

.colorPickers input[type="color"] {
  width: 100%;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
}


@media (max-width: 1000px) {
    .buttons {
        width: 80%;
    }
}