/* css/pilotos.css */

/* Garantir que o body tenha transição suave de cor */
body {
    transition: background-color 0.5s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.pilotos-wrapper {
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    position: relative;
    padding-top: 140px;
}

/* Barra de Busca */
.search-container {
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 100%;
    max-width: 400px;
    padding: 0 20px;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border-radius: 30px;
    border: none;
    font-size: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    outline: none;
    transition: box-shadow 0.3s;
}

.search-input:focus {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.search-input::placeholder {
    color: #999;
}

/* 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ão Voltar para Home - Pilotos */
.btn-back-pilotos {
    position: fixed;
    top: 120px;
    left: 20px;
    z-index: 101;
    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-pilotos:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateX(-3px);
}

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

/* Botão Adicionar */
.top-actions {
    position: fixed;
    top: 120px;
    right: 20px;
    z-index: 101;
}

.btn-add-pilot {
    background: #4a148c;
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(74, 20, 140, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.btn-add-pilot:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 20, 140, 0.5);
}

/* Card Principal do Piloto */
.pilot-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    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);
    margin-top: 60px;
}

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

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

/* Foto Vertical (Retrato) */
.pilot-photo {
    width: 100%;
    max-width: 394px;
    height: 506px;
    object-fit: contain;
    margin: 0 auto 20px;
    display: block;
    border-radius: 12px;
    background: #f5f5f5;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.pilot-name {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: #1a1a1a;
}

.pilot-nickname {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

.pilot-info {
    text-align: left;
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #666;
}

.info-value {
    color: #333;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.badge-team {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-category {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Botão Editar Flutuante no Card */
.btn-edit-pilot {
    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-pilot:hover {
    opacity: 1;
}

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

/* File Upload */
.file-upload-container {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
    margin-top: 10px;
}

.file-upload-container:hover {
    border-color: #667eea;
}

.file-upload-container input[type="file"] {
    display: none;
}

.file-upload-label {
    cursor: pointer;
    color: #666;
    font-size: 14px;
}

.file-preview {
    margin-top: 10px;
}

.file-preview img {
    max-width: 150px;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
}

/* Responsivo */
@media (max-width: 768px) {
    .pilot-card {
        padding: 20px;
        margin: 60px 50px 0;
    }

    .pilot-name {
        font-size: 1.5rem;
    }

    .pilot-photo {
        width: 150px;
        height: 210px;
    }

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

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }

    .search-container {
        max-width: 280px;
    }

    .top-actions {
        right: 10px;
    }

    .btn-add-pilot {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
}