/**
 * TEMA PLANETA ÁGUA - GameJam IFSP 2025
 * Identidade Visual Aquática e Sustentável
 */

/* ========================================
   VARIÁVEIS GLOBAIS - PALETA AQUÁTICA
   ======================================== */
:root {
    /* Cores Principais */
    --agua-profunda: #0A4D68;
    --agua-media: #088395;
    --agua-clara: #05BFDB;
    --agua-cristalina: #00D9FF;
    
    /* Verdes Aquáticos */
    --verde-agua: #7DE5ED;
    --verde-marinho: #3BACB6;
    --verde-alga: #20C997;
    
    /* Complementares */
    --areia: #F4E4C1;
    --espuma: #F0F8FF;
    --coral: #FF6B9D;
    --sol: #FFD93D;
    
    /* Neutros */
    --branco-puro: #FFFFFF;
    --cinza-claro: #E8F4F8;
    --cinza-medio: #B8D4E0;
    --texto-escuro: #1A3A52;
    
    /* Gradientes */
    --gradiente-agua: linear-gradient(135deg, #0A4D68 0%, #088395 50%, #05BFDB 100%);
    --gradiente-onda: linear-gradient(to right, #7DE5ED, #00D9FF, #088395);
    --gradiente-profundo: linear-gradient(180deg, #05BFDB 0%, #0A4D68 100%);
    --gradiente-superfície: linear-gradient(to bottom, rgba(125, 229, 237, 0.3), rgba(8, 131, 149, 0.1));
    
    /* Sombras Aquáticas */
    --sombra-suave: 0 4px 20px rgba(5, 191, 219, 0.15);
    --sombra-media: 0 8px 30px rgba(8, 131, 149, 0.25);
    --sombra-profunda: 0 12px 40px rgba(10, 77, 104, 0.35);
    --sombra-flutuante: 0 6px 25px rgba(0, 217, 255, 0.2);
    
    /* Tipografia */
    --fonte-principal: 'Poppins', 'Segoe UI', -apple-system, sans-serif;
    --fonte-titulo: 'Montserrat', 'Arial', sans-serif;
    --fonte-fluida: 'Quicksand', 'Helvetica', sans-serif;
}

/* ========================================
   RESET E BASE GLOBAL
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--fonte-principal);
    color: var(--texto-escuro);
    background: linear-gradient(180deg, var(--espuma) 0%, var(--cinza-claro) 100%);
    line-height: 1.6;
    overflow-x: hidden;
}


/* ========================================
   TIPOGRAFIA FLUIDA
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--fonte-titulo);
    font-weight: 700;
    color: var(--agua-profunda);
    line-height: 1.3;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: var(--agua-media);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--agua-media);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--verde-marinho);
}

h4 {
    font-size: clamp(1.3rem, 2vw, 1.5rem);
    color: var(--verde-marinho);
}

p {
    font-family: var(--fonte-fluida);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--texto-escuro);
}

/* ========================================
   CONTAINERS E WRAPPERS
   ======================================== */
.ig-manage-container,
.ig-public-results-wrapper,
.ig-panel-wrapper,
.ig-ifsp-eval-container,
.wrap {
    background: var(--branco-puro);
    border-radius: 25px;
    padding: 2.5rem;
    margin: 2rem auto;
    max-width: 1200px;
    border: 2px solid rgba(5, 191, 219, 0.2);
    position: relative;
    overflow: hidden;
}



/* ========================================
   BOTÕES AQUÁTICOS
   ======================================== */
button,
.button,
.init-button,
.ig-control-button,
input[type="submit"],
.button-primary {
    font-family: var(--fonte-principal);
    font-weight: 600;
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 50px;
    background: var(--agua-media);
    color: var(--branco-puro);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
}




button:active,
.button:active {
    transform: translateY(0) scale(0.98);
}

/* Botões Secundários */
.button-secondary,
button.cancel-edit-btn {
    background: var(--cinza-claro);
    color: var(--agua-profunda);
    border: 2px solid var(--agua-clara);
}



.ig-button-encerrar {
    background: var(--agua-media);
}

.ig-button-reabrir {
    background: var(--agua-media);
}

/* ========================================
   FORMULÁRIOS AQUÁTICOS
   ======================================== */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--cinza-medio);
    border-radius: 15px;
    font-family: var(--fonte-fluida);
    font-size: 1rem;
    background: var(--espuma);
    color: var(--texto-escuro);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--agua-clara);
    background: var(--branco-puro);
}

input::placeholder {
    color: var(--cinza-medio);
}

/* Labels Fluidos */
label {
    font-family: var(--fonte-principal);
    font-weight: 600;
    color: var(--agua-profunda);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* ========================================
   LISTAS E ITENS
   ======================================== */
.ig-list,
.lista-jogos-publica {
    list-style: none;
    padding: 0;
}

.ig-list li,
.lista-jogos-publica li {
    background: #ededed;
    border: 2px solid rgba(5, 191, 219, 0.2);
    border-radius: 15px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ig-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--gradiente-onda);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}


.ja-avaliado-public,
.ja-avaliado-prof {
    background: linear-gradient(135deg, rgba(125, 229, 237, 0.2), rgba(5, 191, 219, 0.1));
    border-color: var(--verde-agua);
    color: var(--agua-media);
}

/* ========================================
   PÓDIO AQUÁTICO
   ======================================== */
.ig-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1.5rem;
    margin: 3rem 0;
    padding: 2rem 0;
    position: relative;
}



.podium-place {
    width: 30%;
    max-width: 280px;
    padding: 2rem 1.5rem;
    border-radius: 20px 20px 10px 10px;
    background: var(--branco-puro);
    position: relative;
    border: 3px solid #088395;
    overflow: hidden;
}



/* 1º Lugar - Ouro Aquático */
.podium-place.first {
    height: 340px;
    background: #088395;
   
   
}

/* 2º Lugar - Prata Aquática */
.podium-place.second {
    height: 300px;
    background: #088395;
    
   
}

/* 3º Lugar - Bronze Aquático */
.podium-place.third {
    height: 260px;
    background: #088395;
    
    
}


.podium-place h3 {
    font-size: 1.5rem;
    color: var(--branco-puro);
    margin-bottom: 0.8rem;
}

.podium-place .game-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--branco-puro);
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

}

.podium-place .score {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--branco-puro);
    margin-top: 0.5rem;
}

/* ========================================
   AVALIAÇÃO POR ESTRELAS
   ======================================== */
.ig-crit {
    background: var(--gradiente-superfície);
    border: 2px solid rgba(5, 191, 219, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}



.ig-crit strong {
    display: block;
    margin-bottom: 1rem;
    color: var(--agua-profunda);
    font-size: 1.1rem;
}

.ig-stars {
    display: flex;
    gap: 0.5rem;
    cursor: pointer;
    justify-content: center;
}

.ig-stars svg {
    width: 40px;
    height: 40px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}


.star-path-full {
    fill: #FFD93D;
}

.star-path-empty {
    fill: #b1b1b1;
}

/* ========================================
   NOTIFICAÇÕES AQUÁTICAS
   ======================================== */
.ig-notice,
.notice {
    padding: 1.2rem 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    border-left: 5px solid;
    font-family: var(--fonte-fluida);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: deslizar 0.5s ease-out;
}



.ig-notice-success,
.notice-success {
    background: linear-gradient(135deg, rgba(32, 201, 151, 0.1), rgba(14, 159, 110, 0.05));
    border-color: var(--verde-alga);
    color: #0E9F6E;
}

.ig-notice-error,
.notice-error {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(196, 69, 105, 0.05));
    border-color: var(--coral);
    color: #C44569;
}

/* ========================================
   TABELAS AQUÁTICAS
   ======================================== */
table,
.wp-list-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 2rem;
}

thead {
    background: var(--gradiente-agua);
}

thead th {
    color: var(--branco-puro);
    font-weight: 700;
    padding: 1.2rem;
    text-align: left;
    font-size: 1rem;
    border: none;
}

tbody tr {
    background: var(--branco-puro);
    transition: all 0.3s ease;
}

tbody tr:nth-child(even) {
    background: var(--espuma);
}



tbody td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(5, 191, 219, 0.1);
}

/* ========================================
   CONTROLES DE VOTAÇÃO
   ======================================== */
.ig-control-wrapper {
    background: var(--branco-puro);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    border: 3px solid var(--agua-clara);
    position: relative;
    overflow: hidden;
}

.ig-status {
    margin: 2rem 0;
    font-size: 1.3rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    display: inline-block;
}

.ig-status-aberta {
    background: linear-gradient(135deg, rgba(32, 201, 151, 0.2), rgba(14, 159, 110, 0.1));
    color: #0E9F6E;
    border: 2px solid var(--verde-alga);
    font-weight: 700;
    animation: pulsar 2s infinite;
}

.ig-status-encerrada {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.2), rgba(196, 69, 105, 0.1));
    color: #C44569;
    border: 2px solid var(--coral);
    font-weight: 700;
}



/* ========================================
   RESPONSIVIDADE FLUIDA
   ======================================== */
@media (max-width: 768px) {
    .ig-manage-container,
    .ig-public-results-wrapper,
    .ig-panel-wrapper {
        padding: 1.5rem;
        margin: 1rem;
        border-radius: 15px;
    }
    
    .ig-podium {
        flex-direction: column;
        align-items: center;
    }
    
    .podium-place {
        width: 90%;
        max-width: 350px;
        height: auto !important;
        margin-bottom: 1.5rem;
    }
    
    .podium-place.first { order: 1; }
    .podium-place.second { order: 2; }
    .podium-place.third { order: 3; }
    
    button,
    .button,
    .init-button {
        width: 100%;
        padding: 1rem;
    }
    
    .ig-stars svg {
        width: 32px;
        height: 32px;
    }
}

/* ========================================
   ANIMAÇÕES DE CARREGAMENTO
   ======================================== */
.loading-agua {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid var(--cinza-claro);
    border-top: 4px solid var(--agua-clara);
    border-radius: 50%;
    animation: girar 1s linear infinite;
}



/* ========================================
   SCROLLBAR AQUÁTICA
   ======================================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--cinza-claro);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--agua-profunda);
    border-radius: 10px;
    border: 2px solid var(--cinza-claro);
}


/* ========================================
   LINKS AQUÁTICOS
   ======================================== */
a {
    color: #444;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--agua-profunda);
    transition: width 0.3s ease;
}



/* ========================================
   SEÇÕES DE FORMULÁRIO
   ======================================== */
.ig-form-section,
.ig-list-section {
    background: #fff;
    border: 2px solid rgba(5, 191, 219, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}



/* ========================================
   ADAPTAÇÕES ESPECÍFICAS DO PLUGIN
   ======================================== */

/* Painel do Avaliador */
#ig-login-wrapper,
#ig-dashboard-wrapper {
    animation: aparecer 0.6s ease-out;
}



/* Navegação do Dashboard */
.ig-dashboard-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--gradiente-onda);
}

/* Outros Ranks */
.ig-other-ranks {
    margin-top: 3rem;
}

.ig-other-ranks ol {
    counter-reset: rank-counter 3;
}

.ig-other-ranks li {
    background: var(--branco-puro);
    border: 2px solid rgba(5, 191, 219, 0.2);
    border-radius: 15px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.ig-other-ranks li::before {
    content: counter(rank-counter) "º";
    counter-increment: rank-counter;
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--agua-profunda);
    margin-right: 1rem;
    min-width: 50px;
}



/* Verificação de Localização */
#ig-location-check-container {
    text-align: center;
    padding: 2rem;
    background: var(--gradiente-superfície);
    border-radius: 20px;
    border: 3px dashed var(--agua-clara);
}

#location-status {
    font-size: 1.2rem;
    color: var(--agua-profunda);
    margin-top: 1rem;
    font-weight: 600;
}

/* Detalhes Expansíveis */
.details-row {
    background: var(--espuma) !important;
    animation: expandir 0.4s ease-out;
}


/* ========================================
   IMPRESSÃO
   ======================================== */
@media print {
    body {
        background: white;
    }
    
    .ig-manage-container,
    .ig-public-results-wrapper {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    button,
    .button {
        display: none;
    }
}