:root {
    --main-bg-color: #120000;
    --main-bg-color-fade-5: rgba(18, 0, 0, 0.51);
/*     --primary-color: #ff213c; */
    --primary-color: #7F7F7F;
	--primary-shade-color: #d41c32;
    --secundary-color: #57417a;

}


/* SOLO per la tabella Giocato Con */
#giocatoTable {
  border-collapse: collapse;
  width: 100%;
  text-align: center;
}

#giocatoTable th, #giocatoTable td {
  border: 1px solid #333;
  padding: 5px;
}

/* Intestazioni speciali */
#giocatoTable .header-special { background-color: black; color: white; }
#giocatoTable .header-normal { background-color: #555; color: white; }

/* Celle valori */
#giocatoTable .value-x { background-color: white; }
#giocatoTable .value-0 { background-color: #b2dfff; }       /* celestino */
#giocatoTable .value-1-9 { background-color: #c7f0c7; }     /* verdolino chiaro */
#giocatoTable .value-5-10 { background-color: #ffd8a6; }    /* arancione chiaro */
#giocatoTable .value-11plus { background-color: #ff9999; }  /* rosso chiaro */
#giocatoTable .value-21plus { background-color: #8B0000; color: white;}  /* dark red */


/* Prima cella vuota e intestazioni ruotate */
#giocatoTable th {
  writing-mode: vertical-rl; /* scrive verticale dal basso verso l'alto */
  transform: rotate(180deg);  /* per ruotare verso il basso */
  padding: 5px;
  white-space: nowrap;
}

#giocatoTable .vertical-text {
  writing-mode: vertical-rl;
  transform: rotate(0deg);
  white-space: nowrap;
}

/* SOLO per la tabella Giocato Contro */
#giocatoCONTROTable {
  border-collapse: collapse;
  width: 100%;
  text-align: center;
}

#giocatoCONTROTable th, #giocatoCONTROTable td {
  border: 1px solid #333;
  padding: 5px;
}


/* Intestazioni speciali */
#giocatoCONTROTable .header-special { background-color: black; color: white; }
#giocatoCONTROTable .header-normal { background-color: #555; color: white; }

/* Celle valori */
#giocatoCONTROTable .value-x { background-color: white; }
#giocatoCONTROTable .value-0 { background-color: #b2dfff; }       /* celestino */
#giocatoCONTROTable .value-1-9 { background-color: #c7f0c7; }     /* verdolino chiaro */
#giocatoCONTROTable .value-5-10 { background-color: #ffd8a6; }    /* arancione chiaro */
#giocatoCONTROTable .value-11plus { background-color: #ff9999; }  /* rosso chiaro */
#giocatoCONTROTable .value-21plus { background-color: #FF0000; color: white;}  /* dark red */


/* Prima cella vuota e intestazioni ruotate */
#giocatoCONTROTable th {
  writing-mode: vertical-rl; /* scrive verticale dal basso verso l'alto */
  transform: rotate(180deg);  /* per ruotare verso il basso */
  padding: 5px;
  white-space: nowrap;
}

#giocatoCONTROTable .vertical-text {
  writing-mode: vertical-rl;
  transform: rotate(0deg);
  white-space: nowrap;
}


/* ===== TABLE ACCESSO ===== */
.guild-table {
    border-collapse: collapse;
    width: 100%;
    font-family: Arial, sans-serif;
    font-size: 14px;
    text-align: center;
	background:white;
	color:black;
}

.guild-table th,
.guild-table td {
    border: 1px solid #999;
    padding: 4px;
}

.guild-table tr td:nth-child(9) {
    border-right: 2px solid black;
}

.guild-table tr td:nth-child(13) {
    border-right: 2px solid black;
}

/* ===== HEADERS ===== */
guild-table .top-title {
    background: #228B22;
    font-weight: bold;
    color: black;
}

.guild-table .sub-header {
    background: #D3D3D3;
    font-weight: bold;
}


/* ===== GUILD COLORS ===== */
.ad { background:#9c27b0;}
.aq { background:#3f51b5;}
.b  { background:#964b00;}
.c  { background:#8bc34a;}
.p  { background:#e53935}
.s  { background:#ff9800;}
.vk { background:#26a69a;}
.va { background:#fdd835;}

/* ===== STATUS CELLS ===== */
.ok { background:#c8e6c9; font-weight:bold; }
.na { background:white; }
.guild-table .highlight { background:#fff3cd; }

/* ===== PLAYER COLORS (examples – extend as needed) ===== */
.baudo { background:#3f51b5; color:white; }
.colt { background:#2e7d32; color:white; }
.copter { background:#8d6e00; color:white; }
.drius { background:#4dd0e1; color:white; }
.karmic { background:#ff9800; color:white; }
.noble { background:#ffc107; color:white; }
.puffo { background:#f44336; color:white; }
.swine { background:#673ab7; color:white; }

.mercenario { background:#555; color:white; }
.leader { background:black; color:white; }


.trimrex { background:black; color:red; }
.socrem { background:#555; color:red; }
.deadrick { background:black; color:red; }
.bibobio { background:#555; color:red; }


.value-yellow {
    background-color: #fff3cd;
}

.value-green {
    background-color: #c8e6c9;
}

/* ========== */

.mobile-nav {
    display: none;
}

.mb-1 {
    margin: 0;
    margin-bottom: 0.9em;
}

body, html {
    font-family: arial, sans-serif;
    background-color: var(--main-bg-color);
    color: #fff;
    margin: 0;

}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

h1 {
    font-size: 4em;
}

h2 {
    font-size: 3.5em;
}

h3 {
    font-size: 2.8em;
}

h4 {
    font-size: 2.4em;
}

h5 {
    font-size: 1.9em;
}

h6 {
    font-size: 1.5em;
}

button {
    background-color: var(--primary-shade-color);
    border-color: var(--primary-color);
    color: #fff;
    padding: 10px;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.margin-2 {
    margin: 0.4em 0;
}

.margin-3 {
    margin: 0.8em 0;
}

.container {
    width: 100%;
    max-width: 980px; /* or 980px depending on your design */
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.container-fluid {
    width: 100%;
    min-width: 100%;
}

.hidden {
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* navigation */
#main-header, #main-header * {
    transition: all 0.2s;
    -o-transition: all 0.2s;
    -moz-transition: all 0.2s;
    -webkit-transition: all 0.2s;
}

#main-header {
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 3;
}

#main-header.scrolled {
    position: fixed;
    background-color: #0d0a12;
}


header > nav > ul {
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
    justify-content: center;
}

header > nav > ul > li {
    margin: 0 2% ;
    position: relative;
}

header > nav > ul > li.brand {
    max-width: 9%;
    margin: 0;
}

header > nav > ul > li.brand >img {
    width: 100%;
}

header > nav > ul > li.brand > a {
    padding: 0;
}

header > nav > ul > li > a {
    position: relative;
    text-decoration: none;
    font-size: 1.2em;
    color: #fff;
    display: block;
    padding: 20px;
}

header > nav > ul > li > a:before{
    content: '';
    height: 4px;
    width: 100%;
    position: absolute;
    background-color: #7F7F7F;
    bottom: 0;
    left: 0;
    transform: scale3d(0, 1, 1);
    transition: transform 0.1s;
}


header > nav > ul >li:hover > a{
    color:#7F7F7F;
}

header > nav .active > a::before {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
    -webkit-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-transition-duration: 0.3s;
    transition-duration: 0.4s;
}


/* slider */

.slider > figure {
    margin: 0;
}

.slider > figure > img {
    width: 100%;
    max-height: 100vh;
}

.slider > .slide-caption {
    background-color: var(--main-bg-color);
    border-left: 5px solid var(--primary-color);
    color: #fff;

    position: absolute;
    top: 15%;
    left: 4%;

    width: 25%;
    padding: 25px;
}

.slider > .slide-caption h1 {
    color: var(--primary-color);
    font-size: 4em;
    margin: 0;
}

.slider > .slide > .slide-caption h1 {
    color: var(--primary-color);
    font-size: 4em;
    margin: 0;
}

.slider > .slide > .slide-caption p {

}


/* home */

/* episode */
.episodes {
    position: relative;
    width: 100%;
    height: 60vh;            /* responsive height: 60% of viewport height */
    max-height: 500px;       /* optional: limit height on large screens */
    min-height: 250px;       /* optional: maintain some minimum */
    background-color: #222;  /* background for empty space */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.episode {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.episode.active {
  opacity: 1;
  z-index: 2; /* make sure visible episode is on top */
}

.episode > img {
    max-width: 100%;        /* never exceed container width */
    max-height: 100%;       /* never exceed container height */
    object-fit: contain;    /* maintain aspect ratio, fully visible */
    display: block;
    background-color: transparent;
}

.episode > figcaption {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.6); /* semi-transparent to see image behind */
    color: #fff;
    text-align: center;
    font-size: 1em;
}

/* season */
.season > h2, .season p{
    margin: 0.8em 0;
}

.season > h2,
.season > h1{
    font-size: 1.8em;
}

.season > .episodes {
    position: relative;
    height: 450px;
    overflow: hidden;
}

#episode-number {
    position: absolute;
    right: 0;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
    z-index: 2;
}

.season > .episodes,
.season > .episodes > .episode {
    transition: opacity 0.2s;
    -o-transition: opacity 0.2s;
    -moz-transition: opacity 0.2s;
    -webkit-transition: opacity 0.2s;
    margin: 0;
    width: 100%;
}


.season > .episodes > .episode {
    position: absolute;
    height: 450px;
    z-index: 0;
}

/* .season > .episodes > .episode > img {
    width: 100%;
    margin-top: -7%;
	height: auto;

} */

.season > .episodes > .episode > img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* keeps aspect ratio, shows full image */
    background-color: transparent; /* optional, container handles background */
}

.season > .episodes > .episode figcaption {
    position: absolute;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.season > .episodes > .episode > img {
    transition: transform 0.5s;
    -o-transition: transform 0.5s;
    -moz-transition: transform 0.5s;
    -webkit-transition: transform 0.5s;
}


.season > .episodes > .episode > img:hover {
    transform: scale(1.1);
    -o-transform: scale(1.1);
    -moz-transform: scale(1.1);
    -webkit-transform: scale(1.1);
}

.controls {
    position: absolute;
    width: 100%;
    bottom: 50%;
}


.controls > button {
    background: #fff;
    padding: 0.8em;
    border: none;
    cursor: pointer;
    transition: all 0.1s ease-in-out;
    font-weight: bold;
    font-size: 16px;
    width: 35px;
    color: #000;

}

.controls > button:hover {
    color: #7F7F7F;
}

.controls .next {
    position: absolute;
    right: 0;
}


#episodes-group > .controls {
    z-index: 3;
}

#episodes-group > .episode {
    position: absolute;
    top: 0;
    opacity: 0;
    transition: opacity 0.5s;
}

#episodes-group > .episode:first-of-type {
    z-index: 2;
    opacity: 1;
}


/* characters */
#character-profile > .character {
    position: relative;
    margin-bottom: 250px;
}

#character-profile > .character > figure {
    overflow: hidden;
    height: 450px;
    margin: 0;

}

#character-profile > .character > figure > img {
    width: 100%;
    transition: transform 0.5s;
    -o-transition: transform 0.5s;
    -moz-transition: transform 0.5s;
    -webkit-transition: transform 0.5s;
}

#character-profile > .character > figure > img:hover {
    transform: scale(1.2);
    -o-transform: scale(1.2);
    -moz-transform: scale(1.2);
    -webkit-transform: scale(1.2);
}

#character-profile > .character > .character-bio {
    position: absolute;
    right: -50px;
    top: 45%;
    height: 250px;

    background-color: #0d0a12;
    padding: 25px;
    width: 25%;

    border-top: 10px solid var(--primary-color);
}

#character-profile > .character > .character-bio > h1 {
    font-size: 1.5em;
}

    /* shop */
#webshop > .shop {
    display: flex;
    flex-wrap: wrap;
}

.shop > .shop-item {
    position: relative;
    width: 27%;
    background-color: #0d0a12;
    margin: 2% 1%;
    padding: 2%;
}

.shop > .shop-item > .price-tag {
    background-color: var(--secundary-color);
    position: absolute;
    right: 10px;
    top: -40px;
    z-index: 2;

    height: 60px;
    width: 48px;
    padding: 10px;
}

.shop > .shop-item > .price-tag > .amount {
    position: absolute;
    bottom: 10px;
}

.shop > .shop-item figure {
    max-width: 250px;
    margin: 0 auto;
    transition: transform 0.2s;
    -o-transition: transform 0.2s;
    -moz-transition: transform 0.2s;
    -webkit-transition: transform 0.2s;
    z-index: 1;
    cursor: pointer;
}

.shop > .shop-item figure:hover {
    transform: scale(1.2);
    -o-transform: scale(1.2);
    -moz-transform: scale(1.2);
    -webkit-transform: scale(1.2);
}

.shop > .shop-item > figure > img {
    width: 100%;
}

.shop > .shop-item > .description {
    position: relative;
    font-style: italic;
    text-align: center;
    margin-top: 20px;
    min-height: 75px;
    z-index: 2;
}

.shop > .selected-shop-item {
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 4;
    transition: all 0.2s;
}

.shop > .selected-shop-item > .content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 75%;
    max-height: 60vh;
    margin: 20vh auto;
    background-color: #f3f3f3;
    padding: 20px;
    box-sizing: border-box;
    color: #000;
    position: relative;
}

.shop > .selected-shop-item > .content > .exit-button {
    position: absolute;
    right: 0px;
    cursor: pointer;
    background-color: #232323;
    text-align: center;
    padding: 10px;
    width: 40px;
    margin: 0;
    border: none;
}

.shop > .selected-shop-item > .content > figure {
    margin: 0 auto;
}
.shop > .selected-shop-item > .content > figure > img{
    width: 350px;
}


.shop > .selected-shop-item > .content > .details {
    display: grid;
    grid-template-rows: 1.4fr 1fr;
}

.shop > .selected-shop-item > .content > .details .item-name {
    margin: 0.2em 0;
}

.shop > .selected-shop-item > .content > .details input {
    padding: 2%;
    width: 100%;
    border: 1px solid darkgray;
    font-size: 1.4em;
    display: block;
    margin-top: 10%;
    box-sizing: border-box;
    margin-bottom: 2em;
}

.order-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 50px;
}

.order-form article ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.order-form article ul li:before {
    content: '\2714';
    color: var(--primary-color);
    margin-right: 1em;
}

.order-form > form .field {
    display: block;
    margin: 10px 0;
}

.order-form > form label {
    display: block;
    margin: 0.8em 0;
}

.order-form > form input {
    width: 100%;
    padding: 20px 10px;
    border-radius: 5px;
    border: 2px solid var(--secundary-color);
    box-sizing: border-box;
}

footer {
    text-align: center;
    margin: 50px 0 20px;
    font-size: 0.8em;
    color: darkgray;
}

/* /* BEGIN OF CODE TO REMOVE IMAGE ANIMATION */
.season > .episodes > .episode > img:hover,
#character-profile > .character > figure > img:hover,
.shop > .shop-item figure:hover {
    transform: none !important;
    transition: none !important; /* optional, removes smooth animation */
}
/* END OF CODE TO REMOVE IMAGE ANIMATION */
 */

/* General Adjustment */
@media (max-width: 1024px) { /* tablet */
    .episodes {
        height: 50vh;
    }
}

@media (max-width: 600px) { /* mobile */
    .episodes {
        height: 40vh;
    }

    .episode > img {
        max-height: 100%;
    }
}

@media (max-width: 1024px) {
    .episode > figcaption {
        font-size: 0.9em;
        padding: 8px;
    }
}

@media (max-width: 600px) {
    .episode > figcaption {
        font-size: 0.8em;
        padding: 6px;
    }
}

@media (min-width: 761px) {
    #main-header {
        position: sticky;   /* sticks to top while scrolling */
        top: 0;             /* distance from top */
        z-index: 1000;
        background-color: rgba(0, 0, 0, 0.9); /* optional, semi-transparent */
        transition: background-color 0.2s;
    }

    #main-header.scrolled {
        background-color: #0d0a12; /* darkens when scrolling */
    }
}

@media (hover: hover) {
    .season > .episodes > .episode > img:hover,
    #character-profile > .character > figure > img:hover,
    .shop > .shop-item figure:hover {
        transform: none !important;
        transition: none !important;
    }
}
