/* css/equipes.css */

/* Garantir que o body tenha transição suave de cor */
body {
    transition: background-color 0.5s ease;
}

.equipes-wrapper {
    min-height: calc(100vh - 80px);
    /* Descontar header */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    padding-top: 120px;
    /* Espaço pro header fixo */
}

/* Navegação */
.nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    font-size: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* Botões de topo */
.top-actions {
    position: absolute;
    top: 120px;
    right: 20px;
    z-index: 20;
}

/* Botão Voltar para Home - Equipes */
.btn-back-equipes {
    position: fixed;
    top: 120px;
    left: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-back-equipes:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateX(-3px);
}

.btn-back-equipes svg {
    stroke: currentColor;
}

.btn-add-team {
    background: #00e676;
    /* Verde vibrante - Mantido */
    color: white;
    /* Alterado para branco */
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* Circular */
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.btn-add-team:hover {
    transform: translateY(-2px);
}

/* Card Principal da Equipe */
.team-card {
    background: rgba(232, 232, 232, 0.97);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 800px;
    /* Largo para caber pilotos */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    animation: fadeIn 0.5s ease;
    backdrop-filter: blur(10px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.team-logo {
    width: 100%;
    /* Responsivo no mobile */
    max-width: 450px;
    /* ~300% de 150px */
    height: auto;
    /* Manter proporção */
    max-height: 450px;
    /* Limite vertical */
    object-fit: contain;
    margin: 0 auto 20px;
    display: block;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.team-name {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.team-points {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
    display: inline-block;
    background: #f0f0f0;
    padding: 5px 15px;
    border-radius: 20px;
}

.team-pilots-section {
    margin-top: 30px;
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.team-pilots-section h3 {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pilots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.pilot-mini-card {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s;
}

.pilot-mini-card:hover {
    transform: translateY(-2px);
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.pilot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #ddd;
}

.pilot-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

/* Botão Editar Flutuante no Card */
.btn-edit-team {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.btn-edit-team:hover {
    opacity: 1;
}

/* Empty State */
.no-teams {
    color: white;
    text-align: center;
    font-size: 1.5rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .team-card {
        padding: 20px;
        margin: 0 50px;
        /* espaço pras setas */
    }

    .team-name {
        font-size: 1.8rem;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }
}