/* Estilos para Página de Competição */

/* Seção Hero */
.competition-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #0ea5e9 100%);
    padding: 3rem 1rem;
    text-align: center;
    color: white;
}

.competition-hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.competition-hero p {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* Seção Carrossel */
.competition-carousel-section {
    padding: 3rem 0;
}

.competition-carousel-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

/* Wrapper do Carrossel */
.competition-carousel-wrapper {
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    perspective: 1000px;
}

.competition-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-style: preserve-3d;
}

/* Cards de Competição */
.competition-card {
    flex: 0 0 auto;
    width: 200px;
    height: 200px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 4px solid #1e3a8a;
}

.competition-card:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.competition-card.active {
    transform: scale(1.15);
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.5);
    border-color: #0ea5e9;
}

.competition-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.competition-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Botões de Navegação */
.competition-carousel-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #1e3a8a;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.competition-carousel-btn:hover {
    background: #1e3a8a;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3);
}

.competition-carousel-btn:active {
    transform: scale(0.95);
}

.btn-arrow {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e3a8a;
}

.competition-carousel-btn:hover .btn-arrow {
    color: white;
}

/* Informações da Competição */
.competition-info-section {
    margin-top: 2rem;
}

.competition-info-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.competition-info-card h2 {
    color: #1e3a8a;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.competition-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.competition-detail-item {
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 8px;
}

.competition-detail-item label {
    display: block;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
}

.competition-detail-item span {
    font-size: 1.2rem;
    color: #4b5563;
}

/* Ações da Competição */
.competition-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-view-table,
.btn-view-bracket {
    flex: 1;
    min-width: 150px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-view-table {
    background: #0ea5e9;
    color: white;
}

.btn-view-table:hover {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-view-bracket {
    background: #10b981;
    color: white;
}

.btn-view-bracket:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.3s ease-out;
    margin: 2rem auto;
}

.modal-bracket {
    max-width: 900px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #1f2937;
}

.modal-content h2 {
    color: #1e3a8a;
    margin-bottom: 1.5rem;
}

/* Tabela de Competição */
.table-container {
    overflow-x: auto;
}

.competition-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.competition-table th {
    background: #1e3a8a;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.competition-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.competition-table tbody tr:hover {
    background: #f3f4f6;
}

.competition-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

/* Chaveamento */
.bracket-container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.bracket-round {
    flex: 0 0 auto;
    min-width: 200px;
}

.bracket-round-title {
    text-align: center;
    font-weight: bold;
    color: #1e3a8a;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.bracket-match {
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 1rem;
    background: #f9fafb;
    overflow: hidden;
}

.bracket-team {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
}

.bracket-team:last-child {
    border-bottom: none;
}

.bracket-team-name {
    font-weight: 500;
}

.bracket-team-score {
    font-weight: bold;
    color: #1e3a8a;
}

/* Responsividade */
@media (max-width: 768px) {
    .competition-hero h1 {
        font-size: 2.5rem;
    }

    .competition-carousel-container {
        gap: 1rem;
    }

    .competition-card {
        width: 150px;
        height: 150px;
    }

    .competition-carousel-btn {
        width: 40px;
        height: 40px;
    }

    .competition-details {
        grid-template-columns: 1fr;
    }

    .competition-actions {
        flex-direction: column;
    }

    .btn-view-table,
    .btn-view-bracket {
        width: 100%;
    }

    .bracket-container {
        flex-direction: column;
    }

    .bracket-round {
        min-width: auto;
    }
}

@media (max-width: 600px) {
    .competition-carousel-container {
        flex-direction: column;
        gap: 1rem;
    }

    .competition-carousel-btn {
        width: 35px;
        height: 35px;
    }

    .competition-card {
        width: 120px;
        height: 120px;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .competition-table {
        font-size: 0.85rem;
    }

    .competition-table th,
    .competition-table td {
        padding: 0.5rem;
    }
}
