@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@400;600;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Oxanium', cursive;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
    min-height: 100vh;
    color: #fff;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Header responsive */
header {
    background-color: #1a202c;
    padding: 1rem;
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

header nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 0;
    margin: 0;
}

header nav li {
    list-style: none;
}

header nav a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

header nav a:hover {
    color: #8b5cf6;
    background-color: rgba(139, 92, 246, 0.1);
}

/* Hero section */
.events-hero {
    padding: 2rem 1rem;
    text-align: center;
}

.events-hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.events-hero p {
    font-size: 1rem;
    max-width: 100%;
    margin: 0 auto 2rem;
}

/* Filtros */
.bg-gray-800 {
    padding: 1.5rem 1rem;
}

.flex-col {
    gap: 1rem;
}

.flex-col > div {
    width: 100%;
}

input, select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

/* Botones de filtro de fecha - Estilo original */
.date-filter-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    background-color: #374151;
    color: #d1d5db;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Oxanium', cursive;
    font-size: 0.9rem;
}

.date-filter-btn:hover, 
.date-filter-btn.active {
    background-color: #8b5cf6;
    color: white;
}

/* Contenedor de botones de fecha */
.flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Media queries para responsividad */
@media (max-width: 640px) {
    .date-filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .flex-wrap {
        gap: 0.25rem;
    }
}

@media (max-width: 400px) {
    .date-filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}

.date-filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Grid de eventos */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem;
}

/* Tarjetas de evento */
.event-card {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #2d3748;
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(113, 26, 217, 0.3);
    border-color: #8b5cf6;
}

.event-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.event-type-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-torneo {
    background-color: #f59e0b;
    color: #000;
}

.badge-especial {
    background-color: #8b5cf6;
    color: white;
}

.badge-colaboracion {
    background-color: #3b82f6;
    color: white;
}

.badge-charity {
    background-color: #10b981;
    color: white;
}

.live-badge {
    position: absolute;
    top: 3.5rem;
    right: 0.75rem;
    background-color: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: pulse 2s infinite;
}

.live-badge span {
    width: 0.5rem;
    height: 0.5rem;
    background-color: white;
    border-radius: 50%;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.event-card > div:last-child {
    padding: 1.25rem;
}

.event-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.event-card p {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.event-card .text-sm {
    font-size: 0.8rem;
}

.view-details-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: #8b5cf6;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.view-details-btn:hover {
    background-color: #7c3aed;
}

/* Modal */
#eventModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 50;
}

#eventModal > div {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background-color: #1a202c;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

#closeModal {
    background: none;
    border: none;
    color: #d1d5db;
    font-size: 1.5rem;
    cursor: pointer;
}

#setReminder, #eventLink {
    display: inline-block;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

#setReminder {
    background-color: #8b5cf6;
}

#eventLink {
    background-color: #3b82f6;
}

/* Footer */
footer {
    padding: 2rem 1rem;
    text-align: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: #d1d5db;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.2);
    color: #8b5cf6;
}

/* Utilidades */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Media Queries */
@media (min-width: 640px) {
    header .container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .events-hero h1 {
        font-size: 2.5rem;
    }
    
    .events-hero p {
        font-size: 1.125rem;
    }
    
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .flex-col {
        flex-direction: row;
    }
    
    .flex-col > div {
        width: auto;
        flex: 1;
    }
}

@media (min-width: 768px) {
    header {
        padding: 1rem 2rem;
    }
    
    .events-hero {
        padding: 3rem 2rem;
    }
    
    .bg-gray-800 {
        padding: 2rem;
    }
    
    .grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 2rem;
    }
    
    .event-card img {
        height: 200px;
    }
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .events-hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 340px) {
    header nav ul {
        gap: 0.5rem;
    }
    
    header nav a {
        font-size: 0.8rem;
        padding: 0.25rem;
    }
    
    .date-filter-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.7rem;
    }
}