/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #009639 0%, #FFDF00 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Utilitários */
.hidden {
    display: none !important;
}

/* Header */
.header {
    background: linear-gradient(135deg, #002776 0%, #009639 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 2rem;
    color: #FFDF00;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 1rem;
}

/* Botões */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-admin {
    background: #FFDF00;
    color: #002776;
}

.btn-admin:hover {
    background: #e6c600;
}

.btn-public {
    background: #009639;
    color: white;
}

.btn-public:hover {
    background: #007a2e;
}

.btn-primary {
    background: #002776;
    color: white;
    font-size: 1rem;
    padding: 1rem 2rem;
}

.btn-primary:hover {
    background: #001a5c;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-edit {
    background: #ffc107;
    color: #212529;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-edit:hover {
    background: #e0a800;
}

/* Seções */
.admin-section, .public-section {
    background: white;
    margin: 2rem 0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.admin-section {
    padding: 2rem;
}

.public-section {
    padding: 2rem;
}

/* Formulário */
.jogo-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #002776;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #009639;
    box-shadow: 0 0 0 3px rgba(0, 150, 57, 0.1);
}

/* Grid de jogos */
.jogos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.jogo-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #009639;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.jogo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.jogo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.jogo-times {
    font-size: 1.1rem;
    font-weight: 700;
    color: #002776;
    text-align: center;
}

.vs {
    color: #009639;
    font-weight: 400;
    margin: 0 0.5rem;
}

.jogo-horario {
    background: #FFDF00;
    color: #002776;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.jogo-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.jogo-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.jogo-info-item i {
    color: #009639;
    width: 16px;
}

.campeonato-badge {
    background: #002776;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    align-self: flex-start;
    margin-top: 0.5rem;
}

/* Admin jogos list */
.admin-jogos {
    margin-top: 2rem;
}

.admin-jogos h3 {
    color: #002776;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-jogo-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-jogo-info {
    flex: 1;
    min-width: 200px;
}

.admin-jogo-times {
    font-weight: 600;
    color: #002776;
    margin-bottom: 0.25rem;
}

.admin-jogo-details {
    font-size: 0.9rem;
    color: #666;
}

.admin-jogo-actions {
    display: flex;
    gap: 0.5rem;
}

/* Public header */
.public-header {
    text-align: center;
    margin-bottom: 2rem;
}

.public-header h2 {
    color: #002776;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.public-header p {
    color: #666;
    font-size: 1.1rem;
}

/* No jogos */
.no-jogos {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-jogos i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.no-jogos h3 {
    margin-bottom: 0.5rem;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #009639;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #009639;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

.toast.error {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .nav {
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .jogos-grid {
        grid-template-columns: 1fr;
    }

    .admin-jogo-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-jogo-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .public-header h2 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.25rem;
    }

    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.4rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .jogo-card {
        padding: 1rem;
    }

    .jogo-times {
        font-size: 1rem;
    }
}



/* Seção de Campeonatos */
.campeonatos-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: calc(100vh - 80px);
    padding: 2rem 0;
}

.campeonato-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.campeonato-form .form-group {
    margin-bottom: 1.5rem;
}

.campeonato-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.campeonato-form .form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.campeonato-form .form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.admin-campeonato-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-campeonato-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.admin-campeonato-info {
    flex: 1;
}

.admin-campeonato-nome {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.admin-campeonato-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Responsividade adicional para campeonatos */
@media (max-width: 768px) {
    .admin-campeonato-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .admin-campeonato-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

