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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    display: block;
    background: none;
    border-radius: 0;
    padding: 0;
}

/* Fallback para logo que não carrega */
.logo-img:not([src]),
.logo-img[src=""],
.logo-img[src*="undefined"] {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-img:not([src])::after,
.logo-img[src=""]::after,
.logo-img[src*="undefined"]::after {
    content: "BR";
}

.logo-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation */
.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #ffd700;
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffd700;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    transition: all 0.3s ease;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animação do menu toggle quando ativo */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 120px 0 80px;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.btn-inscribe {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    width: 100%;
    margin-top: 1rem;
}

.btn-inscribe:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-disabled {
    background: #ccc;
    color: #666;
    width: 100%;
    margin-top: 1rem;
    cursor: not-allowed;
}

.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Races Section */
.races {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 2px;
}

.races-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.race-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.race-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.race-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.race-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Fallback para imagens que não carregam */
.race-image img:not([src]),
.race-image img[src=""],
.race-image img[src*="undefined"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.race-image img:not([src])::after,
.race-image img[src=""]::after,
.race-image img[src*="undefined"]::after {
    content: "🏃‍♂️";
    font-size: 3rem;
}

.race-card:hover .race-image img {
    transform: scale(1.1);
}

.race-content {
    padding: 1.5rem;
}

.race-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.race-info {
    margin-bottom: 1rem;
}

.race-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.95rem;
}

.race-detail i {
    color: #667eea;
    width: 16px;
}

.race-badge-upcoming {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(90deg, #ffe066, #ffd700);
    color: #333;
    font-weight: bold;
    font-size: 0.95rem;
    padding: 6px 18px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 2;
}

.race-badge-finished {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(90deg, #dc3545, #c82333);
    color: white;
    font-weight: bold;
    font-size: 0.95rem;
    padding: 6px 18px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 2;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: #ffd700;
    font-weight: 600;
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    opacity: 0.7;
}

/* User Authentication Styles */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-weight: 500;
    color: white;
    font-size: 0.9rem;
}

.user-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-profile,
.btn-registrations,
.btn-admin {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 11px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Estilos específicos para botões de ações em tabelas */
table .btn-admin {
    background: #007bff;
    color: white;
    border: 1px solid #0056b3;
    padding: 4px 8px;
    font-size: 12px;
    margin: 0 2px;
}

table .btn-admin:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Botão de editar */
table .btn-admin:first-child {
    background: #28a745;
    border-color: #1e7e34;
}

table .btn-admin:first-child:hover {
    background: #1e7e34;
}

/* Botão de deletar */
table .btn-admin:last-child {
    background: #dc3545;
    border-color: #c82333;
}

table .btn-admin:last-child:hover {
    background: #c82333;
}

.btn-profile:hover,
.btn-registrations:hover,
.btn-admin:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-logout {
    padding: 6px 10px;
    background: rgba(231, 76, 60, 0.8);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(231, 76, 60, 0.5);
}

.btn-logout:hover {
    background: rgba(231, 76, 60, 1);
    transform: translateY(-1px);
}

.logged-in-only,
.logged-out-only {
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .races-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .race-card {
        margin: 0 10px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .races {
        padding: 60px 0;
    }
    
    .race-content {
        padding: 1rem;
    }
    
    .race-title {
        font-size: 1.3rem;
    }
}

/* Menu Mobile */
.nav.active {
    display: block !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

.nav.active .nav-list {
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.nav.active .nav-link {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
}

.nav.active .nav-link:last-child {
    border-bottom: none;
}

.nav.active .user-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav.active .user-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
}

.nav.active .btn-profile,
.nav.active .btn-registrations,
.nav.active .btn-admin,
.nav.active .btn-logout {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    font-size: 0.9rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.race-card {
    animation: fadeInUp 0.6s ease forwards;
}

.race-card:nth-child(1) { animation-delay: 0.1s; }
.race-card:nth-child(2) { animation-delay: 0.2s; }
.race-card:nth-child(3) { animation-delay: 0.3s; }
.race-card:nth-child(4) { animation-delay: 0.4s; }
.race-card:nth-child(5) { animation-delay: 0.5s; }
.race-card:nth-child(6) { animation-delay: 0.6s; }

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Focus states for accessibility */
.btn:focus,
.nav-link:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
} 

/* Modal de status de pagamento */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 9999;
}
.modal-content {
  background: #fff; border-radius: 10px; padding: 2rem 2.5rem; text-align: center; min-width: 320px; max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
#paymentStatusIcon {
  display: block; margin-bottom: 1rem;
}
.btn-modal {
  margin-top: 1.5rem; padding: 0.7rem 2rem; border: none; border-radius: 5px; background: #007bff; color: #fff; font-size: 1rem; cursor: pointer;
  transition: background 0.2s;
}
.btn-modal:hover { background: #0056b3; } 