body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(300deg, #f5f3ff, #eef2ff, #fde2e4);
    background-size: 180% 180%;
    animation: dreamy-gradient-animation 18s ease infinite;
    color: #334155;
    margin: 0;
    padding: 6rem 2rem 2rem 2rem;
}
@keyframes dreamy-gradient-animation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 1.5rem;
}
.events-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.event-card-container {
    position: relative;
}

/* Responsive adjustments for the grid */
@media (max-width: 1023px) {
    .events-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 639px) {
    .events-container {
        grid-template-columns: repeat(1, 1fr);
    }
}

.event-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
    height: 300px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
}
.event-card:hover {
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.3);
    transform: translateY(-5px);
}
.event-card * {
    position: relative;
    z-index: 10;
}
.event-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.event-details {
    font-size: 1rem;
    color: #d1d5db;
    margin: 0.2rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal Styles - CSS Only */
.modal-toggle {
    display: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-toggle:checked + .modal-overlay {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 600px;
    width: 90%;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-toggle:checked + .modal-overlay .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
    transition: color 0.2s;
}
.modal-close-btn:hover {
    color: #4b5563;
}
.modal-content .event-title {
    color: #7c3aed;
    margin-bottom: 1rem;
    white-space: normal;
}
.modal-content .event-details {
    color: #4b5563;
    white-space: normal;
}

.search-bar {
    width: 100%;
    max-width: 600px;
    padding: 1rem 1.5rem 1rem 3rem;
    border: 2px solid #7c3aed;
    border-radius: 25px;
    font-size: 1.125rem;
    outline: none;
    transition: border-color 0.3s ease;
}
.search-bar:focus {
    border-color: #6d28d9;
}
.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
}
.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
}
