/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f1e8;
    color: #2c2c2c;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

/* Pull-to-refresh Wrapper */
.pull-wrapper {
    position: relative;
    min-height: 100vh;
}

/* Pull-to-refresh Indicator */
.pull-refresh {
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f1e8;
    z-index: 1;
    border-bottom: 1px solid rgba(44, 44, 44, 0.1);
}

.pull-refresh-text {
    color: #2c2c2c;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
}

.pull-refresh-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(44, 44, 44, 0.2);
    border-top-color: #2c2c2c;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 10px;
    display: none;
}

.pull-refresh.refreshing .pull-refresh-spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
    position: relative;
    transition: transform 0.3s ease-out;
    will-change: transform;
    background: #f5f1e8;
}

.container.pulling {
    transition: none;
}

/* Header */
header {
    background: transparent;
    padding: 0 0 60px 0;
    margin-bottom: 60px;
    border-bottom: 1px solid rgba(44, 44, 44, 0.1);
}

h1 {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #2c2c2c;
    margin: 0;
    font-size: 4em;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.subtitle {
    color: #2c2c2c;
    font-size: 0.9em;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 10px;
    opacity: 0.7;
}

/* Stats */
.stats {
    background: transparent;
    padding: 0 0 40px 0;
    margin-bottom: 40px;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(44, 44, 44, 0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: #2c2c2c;
    font-size: 0.75em;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
}

.stat-value {
    color: #2c2c2c;
    font-size: 2em;
    font-weight: 300;
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
    padding: 0;
}

/* Event Card */
.event-card {
    background: transparent;
    border: 1px solid rgba(44, 44, 44, 0.1);
    border-radius: 0;
    padding: 30px;
    transition: all 0.3s;
    cursor: pointer;
}

.event-card:hover {
    border-color: rgba(44, 44, 44, 0.3);
    background: rgba(255, 255, 255, 0.3);
}

.event-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #2c2c2c;
    font-size: 1.5em;
    font-weight: 400;
    margin-bottom: 20px;
    line-height: 1.3;
}

.event-date {
    color: #2c2c2c;
    font-size: 0.85em;
    font-weight: 400;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.event-description {
    color: #2c2c2c;
    font-size: 0.95em;
    line-height: 1.7;
    margin-bottom: 20px;
    opacity: 0.8;
}

.event-location {
    color: #2c2c2c;
    font-size: 0.85em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
}

.event-link {
    color: #2c2c2c;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(44, 44, 44, 0.2);
    padding-bottom: 2px;
}

.event-link:hover {
    opacity: 0.6;
    border-bottom-color: rgba(44, 44, 44, 0.4);
}

/* States */
.loading {
    text-align: center;
    padding: 100px 50px;
    color: #2c2c2c;
    font-size: 1em;
    opacity: 0.6;
}

.error {
    background: transparent;
    color: #2c2c2c;
    padding: 30px;
    border: 1px solid rgba(44, 44, 44, 0.2);
    margin-bottom: 40px;
}

.empty {
    text-align: center;
    padding: 100px 50px;
    color: #2c2c2c;
    font-size: 1em;
    opacity: 0.6;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }

    header {
        padding: 0 0 40px 0;
        margin-bottom: 40px;
    }

    h1 {
        font-size: 2.5em;
    }

    .subtitle {
        font-size: 0.8em;
    }

    .stats {
        padding: 0 0 30px 0;
        margin-bottom: 30px;
        gap: 20px;
    }

    .stat-value {
        font-size: 1.5em;
    }

    .events-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .event-card {
        padding: 20px;
    }

    .event-title {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }

    header {
        padding: 0 0 30px 0;
        margin-bottom: 30px;
    }

    h1 {
        font-size: 2em;
    }

    .stats {
        padding: 0 0 20px 0;
        margin-bottom: 20px;
        gap: 15px;
    }

    .events-grid {
        gap: 20px;
    }

    .event-card {
        padding: 15px;
    }
}
