body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    font-size: 18px;
}

header {
    padding: 20px;
}

h1 {
    font-size: 32px;
}

h2 {
    font-size: 22px;
    margin-bottom: 20px;
}

section {
    padding: 25px;
    margin: 40px auto;
    width: 90%;
    max-width: 850px;
    border-radius: 10px;
    overflow: visible;
    padding-bottom: 120px;
}


.p3 {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    align-items: start;
    padding: 40px;
    grid-auto-rows: auto;
    background-color: #1269CC;
}

.content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
    grid-auto-rows: auto;
}

.info {
    grid-column: 1 / 3;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.4;
    max-width: 300px;
    text-align: center;
    margin: 0 auto;
}

.info p {
    max-width: 300px;
    margin-bottom: 100px;
    font-size: 20px;
    margin: 50px auto;
    width: fit-content;
    place-items: center;
}

.extra {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    gap: 100px;
    row-gap: 60px;
    margin-top: -10px;
    justify-content: center;
    align-items: center;
    column-gap: 300px;
}

.extra figure,
.mini-card {
    text-align: center;
    width: 140px;
    justify-self: center;
}

.extra figure {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.extra img {
   width: 250px;
   height: auto;
   border-radius: 10px;
}

.extra img:hover {
    transform: scale(1.05);
    transition: 0.3s;
}

.extra figcaption {
    margin-top: 8px;
    font-size: 30px;
    text-align: center;
}

.character {
    text-align: center;
    transform: translateX(-20px);
}

.character img {
    width: 400px;
}

.character figcaption {
    font-size: 25px;
    margin-top: 30px;
    text-align: center;
}

.mini-card {
    width: 140px;
    height: 140px;
    perspective: 1000px;
    cursor: pointer;
    grid-row: 1 / 1;
    grid-column: 1/2;

}

.mini-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.mini-card.flipped .mini-card-inner {
    transform: rotateY(180deg);
}

.mini-card-front,
.mini-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
}

.mini-card-back {
    background: #0d1b2a;
    color: #51eefc;
    transform: rotateY(180deg);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 10px;
}

.mini-card-back p {
    text-align: center;
    font-size: 19px;
    margin: auto;
}

.persona {
    text-align: center;
    grid-column: 2 / 3;
    justify-self: start;
}

.persona img {
    width: 140px;
    height: auto;
    margin-bottom: 10px;
}

.persona figure {
    display: grid;
    justify-content: center;
}

.persona figcaption {
    max-width: 140px;
    font-size: 20px;
    text-align: center;
    margin-left: 20px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(2, 200px);
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
    grid-column: 1 / -1;
    justify-self: center;
    position: relative;
    margin-top: -80px;
    grid-row: auto;
    gap: 200px;
}

.card {
    width: 220px;
    min-height: 445px;
    transition: 0.3s;
    cursor: pointer;
    perspective: 1000px;
    position: relative;
    overflow: visible;
    background: transparent;
    align-items: start;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card.flipped .card-back h4 {
    opacity: 1;
}

.card-front {
   position: absolute;
   width: 100%;
   height: 100%;
   background: linear-gradient(to bottom, #ffffff, #eaeaea);
   border-radius: 10px;
   text-align: center;
   display: grid;
   place-items: center;
   line-height: normal;
   font-weight: bold;
   backface-visibility: hidden;
   top: 0;
   left: 0;
   grid-template-columns: repeat(2, 1fr);
   gap: 10px;
   padding: 10px;
}

.card-front img {
    width: 150px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.card-front h3 {
    margin: 0;
}

.card-front p {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 5px;
}

.card:hover .card-front img {
    transform: scale(1.1);
}

 .card-back {
   position: absolute;
   width: 100%;
   height: 100%;
   background: white;
   border-radius: 10px;
   text-align: center;
   display: grid;
   line-height: normal;
   font-weight: bold;
   grid-template-columns: repeat(2, minmax(80px, 100px));
   grid-auto-rows: auto;
   gap: 20px;
   padding: 20px;
   overflow: hidden;
   justify-content: center;
   align-content: start;
   backface-visibility: hidden;
   transform: rotateY(180deg) translateY(-40px);
 }

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card:hover {
    transform: scale(1.05);
}

.card-back h4 {
    width: 80%;
    margin: 0 auto;
    font-size: 10px;
    line-height: 1.4;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
    margin-left: 70px;
}

.card-front  h5 {
    font-size: x-large;
    margin-left: 99px;
}

 .persona img, .card {
    box-shadow: 4px 12px rgba(0, 0, 0, 0.15);
}

.portrait {
    width: 105px;
    height: 105px;
    aspect-ratio: 1/1;
    max-width: 120px;
    overflow: hidden;
    border-radius: 10px;
    transition: 0.3s;
    cursor: pointer;
    position: relative;
    margin: 0;
}

.portrait p {
   margin: 0;
}


.portrait img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.portrait:hover {
    transform: scale(1.3);
    z-index: 10;
    opacity: 0.8;
    background: black;
    box-shadow: 0 0 10px rgba(81, 238, 252, 9.6);
}

.portrait:hover img {
    transform: scale(1.2);
}

.portrait figcaption{
    position: absolute;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-top: 10px;
    padding-left: 5px;
    padding-right: 5px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    opacity: 0;
    display: grid;
    align-items:center;
    text-align: center;
    font-size: 9px;
    transition: 0.3s ease;
}

.portrait:hover figcaption {
    opacity: 1;
}

.name {
    top: 20%;
    font-weight: bold;
}

.arcana {
    top: 45%;
}

.persona {
    top: 60%;
}

.p3 .portrait:last-child {
    grid-column: span 2;
    justify-self: center;
}



