/* Reset global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background-color: transparent;
    font-family: 'RetailDemo', Arial, sans-serif;
    overflow: hidden;
}

#root {
    width: 100vw;
    height: 100vh;
    background-color: transparent;
}/* Fontes */
@font-face {
    font-family: 'RetailDemo';
    src: url('./retaildemo-regular-BPfGZfN5.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'RetailDemo';
    src: url('./retaildemo-bold-CB-YEwcJ.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'RetailDemo';
    src: url('./retaildemo-medium-C0b4yiPj.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'RetailDemo';
    src: url('./retaildemo-semibold-bpeWg-3H.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

.video-overlay {
    margin: 0;
    background-color: transparent;
    font-family: 'RetailDemo', Arial, sans-serif;
}

.overlay-teams-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    color: #ffefd7;
    font-family: 'RetailDemo', Arial, sans-serif;
    padding: 0;
    margin: 0;
}

.overlay-team-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100vh;
    justify-content: center;
    align-items: flex-start;
}

.overlay-team-amber {
    align-items: flex-start;
    padding-left: 16px;
}

.overlay-team-sapphire {
    align-items: flex-end;
    padding-right: 16px;
}

.overlay-header {
    display: grid;
    grid-template-columns: 32px 150px 70px 28px 28px 28px 90px 90px 90px 1fr;
    gap: 6px;
    align-items: end;
    margin-bottom: 8px;
    opacity: 0.85;
    font-size: 15px;
    font-weight: 800;
}

.overlay-header-cell {
    text-transform: none;
    letter-spacing: 0.02em;
}

.overlay-row {
    display: grid;
    grid-template-columns: 32px 80px 56px 26px 26px 26px 82px 82px 82px auto;
    gap: 4px;
    align-items: center;
    padding: 8px 8px;
    margin-bottom: 6px;
    pointer-events: auto;
    background: transparent;
    border: none;
    backdrop-filter: none;
    transition: grid-template-columns 0.3s ease, background 0.2s ease, border-color 0.2s ease;
    width: 100%;
}

.overlay-row:not(.expanded) {
    grid-template-columns: 32px 0 0 0 0 0 0 0 0 0;
    width: 44px;
    padding-right: 6px;
    pointer-events: none;
}

.overlay-row:not(.expanded) > *:not(.overlay-hero) {
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.overlay-row.expanded > *:not(.overlay-hero) {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease 0.1s;
}

.overlay-row.amber {
    background: transparent;
}

.overlay-row.sapphire {
    background: transparent;
}

.overlay-row.amber.expanded {
    background-image: url('../orange_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #d4870c;
    border: 1px solid #d4870c;
    backdrop-filter: blur(5px);
    box-shadow:
        inset 0 0 10px rgba(0, 0, 0, 0.28),
        0 0 8px rgba(212, 135, 12, 0.45);
}

.overlay-row.sapphire.expanded {
    background-image: url('../blue_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #4e76c4;
    border: 1px solid #4e76c4;
    backdrop-filter: blur(5px);
    box-shadow:
        inset 0 0 10px rgba(0, 0, 0, 0.28),
        0 0 8px rgba(78, 118, 196, 0.45);
}

.overlay-row.disabled {
    opacity: 0;
    pointer-events: none;
}

.overlay-row.sapphire.has-spacer {
    margin-top: 60px;
}

.overlay-hero {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.overlay-hero-img {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #0b0b0b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: none;
}

.overlay-hero-img-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
}

.overlay-row.amber .overlay-hero-img {
    border: 2px solid #d4870c;
    background-image: url('../orange_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #d4870c;
}

.overlay-row.sapphire .overlay-hero-img {
    border: 2px solid #4e76c4;
    background-image: url('../blue_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #4e76c4;
}


.overlay-names {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: 2px;
}

.overlay-player-name {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overlay-hero-name {
    font-size: 15px;
    font-weight: 700;
    opacity: 0.85;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overlay-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.overlay-stat-label {
    font-size: 13px;
    opacity: 0.75;
    line-height: 1;
}

.overlay-stat-value {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.05;
}

.overlay-kda .overlay-stat-label {
    text-align: center;
}

.overlay-kda .overlay-stat-value {
    text-align: center;
}

.overlay-items {
    display: grid;
    grid-template-columns: repeat(12, 30px);
    gap: 6px;
    align-items: center;
    justify-content: start;
}

.overlay-item {
    width: 30px;
    height: 30px;
    border-radius: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: none;
}

.overlay-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.overlay-item.empty {
    background: rgba(255, 255, 255, 0.05);
    border: none;
}


/* Layout mais compacto em telas menores (player menor) */
@media (max-width: 900px) {
    .overlay-teams-container {
        width: 100vw;
        height: 100vh;
    }

    .overlay-team-amber {
        padding-left: 8px;
    }

    .overlay-team-sapphire {
        padding-right: 8px;
    }

    .overlay-row {
        grid-template-columns: 30px 70px 50px 24px 24px 24px 72px 72px 72px auto;
        gap: 3px;
        padding: 6px 6px;
    }

    .overlay-row:not(.expanded) {
        width: 40px;
    }

    .overlay-hero {
        width: 34px;
        height: 34px;
    }

    .overlay-hero-img {
        width: 30px;
        height: 30px;
    }

    .overlay-player-name {
        font-size: 16px;
    }

    .overlay-hero-name {
        font-size: 13px;
    }

    .overlay-stat-label {
        font-size: 12px;
    }

    .overlay-stat-value {
        font-size: 15px;
    }

    .overlay-items {
        grid-template-columns: repeat(12, 26px);
        gap: 4px;
    }

    .overlay-item {
        width: 26px;
        height: 26px;
    }
}

.container {
    width: 100%;
    height: 120px;
    /* Altura suficiente para os portraits de 94px + margem */
    position: relative;
    overflow: hidden;
    background-color: transparent;
    transition: opacity 0.5s ease-in-out;
    opacity: 0;
    /* Inicialmente invisível */
}

/* Componente Portrait - Base */
.portrait {
    position: absolute;
    width: 80px;
    height: 94px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'RetailDemo', Arial, sans-serif;
    font-weight: bold;
    font-size: 4px;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
    pointer-events: auto;
    /* Inicialmente invisível */
}

/* Gradiente de fundo - Amber */
.portrait.amber .gradient-background {
    position: absolute;
    left: 5%;
    right: 5%;
    top: 16.67%;
    bottom: 6.25%;
    background: #423D1F;
    width: 90%;
    height: 77.08%;
    border-radius: 50%;
}

/* Gradiente de fundo - Sapphire */
.portrait.sapphire .gradient-background {
    position: absolute;
    left: 5%;
    right: 5%;
    top: 16.67%;
    bottom: 6.25%;
    background: #24326F;
    width: 90%;
    height: 77.08%;
    border-radius: 50%;
}

/* Container do herói com SVG */
.hero {
    position: absolute;
    left: 2.5%;
    right: 2.5%;
    top: 0%;
    bottom: 5.21%;
    width: 95%;
    height: 94.79%;
}

/* Container da imagem do herói */
.image-container {
    position: absolute;
    left: 2.5%;
    right: 2.5%;
    top: 0%;
    bottom: 5.21%;
    width: 95%;
    height: 94.79%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border-radius: 50%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

/* Estados ativos */
.portrait.active {
    cursor: pointer;
    opacity: 1;
}

.portrait.disabled {
    pointer-events: none !important;
    cursor: default !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    opacity: 0;
}

/* Posicionamento dos portraits - Team Amber nas laterais */
.portrait:nth-child(1) {
    left: 20px;
    top: 50px;
}

.portrait:nth-child(2) {
    left: 20px;
    top: 150px;
}

.portrait:nth-child(3) {
    left: 20px;
    top: 250px;
}

.portrait:nth-child(4) {
    left: 20px;
    top: 350px;
}

.portrait:nth-child(5) {
    left: 20px;
    top: 450px;
}

.portrait:nth-child(6) {
    left: 20px;
    top: 550px;
}

/* Team Sapphire - lateral direita */
.portrait:nth-child(7) {
    right: 20px;
    top: 50px;
}

.portrait:nth-child(8) {
    right: 20px;
    top: 150px;
}

.portrait:nth-child(9) {
    right: 20px;
    top: 250px;
}

.portrait:nth-child(10) {
    right: 20px;
    top: 350px;
}

.portrait:nth-child(11) {
    right: 20px;
    top: 450px;
}

.portrait:nth-child(12) {
    right: 20px;
    top: 550px;
}





/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Indicador de carregamento */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #FFEED9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Container para os portraits - sem interferir com o conteúdo */
.container {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    pointer-events: none;
    z-index: 1000;
    transition: opacity 0.5s ease-in-out;
}