*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 62,5%;
    color: white;
    font-family: 'Roboto', sans-serif;
}

:root{
    --primary-color: #004ea0;
    --secondary-color: #a3ceec;
    --ff-title: 'Poppins', sans-serif;
}

body, html{
    width: 100%;
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
}

body{
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    background: url(src/backgronds/bg2024eurocopa2000.jpg) center/cover no-repeat fixed;
}

body::before, body::after{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

body::before{
    z-index: -2;
}

body::after{
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.idiomas{
    display: flex;
    justify-content: end;
    align-items: center;
    height: 1.8rem;
    width: 100%;
    background-color: #22232b;
}

select.language-select{
    background-color: #22232b;
    color: white;
}

select.edition > option{
    color: black;
}

select{
    margin-right: 0.8rem;
    padding: 0.2rem;
    border-radius: 8px;
    background-color: var(--secondary-color);
    color: black;
    outline: none;
    width: 6rem;
}

.flag{
    width: 18px;
    height: 18px;
    margin-right: 0.8rem;
}

.header-box{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem;
    height: 10.2rem;
}

h1{
    font-size: 2.8rem;
    text-align: center;
    font-family: var(--ff-title);
}

.open-modal:hover{
    cursor: pointer;
    transform: 
    scale(1.1);
}

.modal-header{
    display:flex;
    justify-content: flex-end;
    width: 100%;
}

.close{
    margin: 10px 10px 0 0;
    height: 25px;
    width: 25px;
    cursor: pointer;
}

.close:hover{
    transform: 
    scale(1.3);
}

main{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    font-size: 1.1rem;
}

th.cabecalho-table, thead{
    background-color: var(--primary-color);
}

table{
    width: 85%;
    border-collapse: collapse;
    padding: 1.2rem;
    box-shadow: 0 1rem 2rem -1rem rgba(0, 0, 0, 0.3);
}

th.cabecalho-table{
    text-align: end;
    padding: 0.3rem;
    border-top-left-radius: .4rem;
    border-top-right-radius: .4rem;
}

table tr:nth-child(even){
    background: rgba(0, 78, 160, 0.3);;
}

table tr:nth-child(odd){
    background: rgba(146, 202, 243, 0.3);
}

table td{
    padding: 0.9rem;
    text-align: center;
}

td img.country-icone{
    width: 22px;
    height: 22px;
}

table tbody tr td{
    transition: 0.3s ease;
}

table tbody tr:hover td{
    background: rgba(0, 78, 160, 0.6);
    transform: scale(1.1);
    box-shadow: 0 5px 10px rgba(72, 71, 71, 0.2);
}

tbody tr:hover img.country-icone{
    height: 28px;
    width: 28px;
}

.modal-team-champion{
    background-color: white;
    width: 90%;
    margin: 50px auto;
    height: 40rem;
    overflow-y: auto;
}

dialog{ 
    position: relative;
    overflow: hidden;
    background-image: url(src/img/teameuro2024champions1800.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}

dialog::before, dialog::after{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

dialog::before{
    z-index: -2;
}

dialog::after{
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.divGames{
    width: 90%;
    height: 35rem;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    overflow-y: auto;
}

.divGames > div {
    flex-basis: 260px;
}

.divGames > div:nth-child(n + 5) {
    flex-wrap: nowrap !important;
}

H3{
    color: black;
}

h3, h4, h5{
    text-align: center;
}

h4{
    font-size: 16px;
}

.divGames > div{
    margin-top: 1rem;
    padding: 1.2rem;
    height: 210px;
    background: rgba(146, 202, 243, 0.3);
    border-radius: 5px;
    text-align: center;
}

.match{
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff80;
    border-radius: 12px;
    color: black;
    padding-block: 5px;
    margin-block: 0.8rem;
}

.goals{
    width: 28px;
    height: 28px;
    display: block;
    border-radius: 50%;
    line-height: 28px;
    background-color: #ffffff;
    color: black;
    margin: 0 0.4rem;
}

.penalty{
 margin-top: -0.5rem;
 font-size: 1rem;
}

.flag-modal{
    width: 28px;
    height: 28px;
}

h5{
    margin-top: 1.2rem;
}

@keyframes aparecer-card {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  60% {
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.card-animado {
  animation: aparecer-card 0.5s ease-out forwards;
  
  opacity: 0; 
}

@keyframes girar {
  0% {
    transform: rotateY(0deg);
    opacity: 0;
  }
  100% {
    transform: rotateY(360deg);
    opacity: 1;
  }
}

.card-ultimo {
  animation: girar 0.8s ease forwards;
}

.borda-animada {
  position: absolute;
  height: 6px;
  width: 100%;
  opacity: 0;
  animation: borderGlow 1s ease forwards;
  animation-iteration-count: 1;
}

.borda-topo {
  top: 0;
  left: 0;
  height: 6px;
}

.borda-direita {
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
}

.borda-baixo {
  bottom: 0;
  left: 0;
  height: 6px;
}

.borda-esquerda {
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
}

@keyframes borderGlow {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@media (max-width: 1024px) {

    h1{
        font-size: 2rem;
    }

    table{
        margin-bottom: 2rem;
    }

    dialog::after {
    background-color: rgba(0, 0, 0, 0.7);
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
  }

  .modal-team-champion {
    width: 95%;
    height: auto;
    margin: 30px auto;
  }

  .modal-team-champion > *:last-child {
    margin-bottom: 2rem;
}
  
  .divGames {
    height: auto;
    gap: 0.8rem;
  }
  
  .divGames > div {
    flex-basis: 45%;
    height: auto;
    padding: 1rem;
  }

  h4 {
    font-size: 15px;
  }
  
  .flag-modal, .goals {
    width: 24px;
    height: 24px;
    line-height: 24px;
  }
}

@media (max-width: 768px) {
  .modal-team-champion {
    width: 98%;
    margin: 20px auto;
    height: auto;
  }
  
  .divGames {
    flex-direction: column;
    height: auto;
    gap: 0.5rem;
  }
  
  .divGames > div {
    flex-basis: 100%;
    height: auto;
    padding: 0.8rem;
  }

  h3, h4, h5 {
    font-size: 14px;
  }

  .flag-modal, .goals {
    width: 20px;
    height: 20px;
    line-height: 20px;
  }

  .close {
    height: 25px;
    width: 25px;
  }
}

@media (max-width: 530px) {
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    font-size: 0.85rem;
  }

  thead, tbody, th, td, tr {
    display: block;
    width: 100%;
  }

  .row-edicao th {
    text-align: center !important;
  }

  .label-edicao, #edicao {
    display: inline-block;
    text-align: center;
    margin: 0 auto;
  }

  tr {
    margin-bottom: 1rem;
    background: rgba(0, 78, 160, 0.15);
    border-radius: 6px;
    padding: 0.6rem;
  }

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

  td::before {
    content: attr(data-label);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    text-align: left;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }

  .header-box {
    flex-direction: column;
    gap: 1rem;
    height: auto;
    padding: 0.5rem;
  }

  table {
    width: 100%;
    font-size: 0.9rem;
  }
  
  .divGames > div {
    padding: 0.6rem;
  }

  .close {
    height: 20px;
    width: 20px;
  }
}