/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    min-height: 100vh;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease-in-out;
    padding: 10px 0;
}

.header.hidden {
    transform: translateY(-100%);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.logo-section {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-section #club-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.title-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* Allow text to shrink */
    flex-grow: 1;
}

.title-section h1 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-section p {
    font-size: 0.8rem;
    color: #7f8c8d;
    font-weight: 400;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Filter section in header */
.filter-section-header {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.filter-section-header .filter-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .header-content {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .filter-section-header {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    
    .filter-section-header .filter-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 15px;
        gap: 12px;
    }
    
    .logo-section #club-logo {
        width: 40px;
        height: 40px;
    }
    
    .title-section h1 {
        font-size: 1.2rem;
    }
    
    .title-section p {
        font-size: 0.75rem;
    }
    
    .filter-section-header .filter-buttons {
        gap: 6px;
    }
}

/* Sticky logo */
.sticky-logo {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 200;
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

.sticky-logo.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.sticky-logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 5px;
    border: 2px solid #dc2626;
}



/* Sticky logo */
.sticky-logo {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 200;
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

.sticky-logo.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.sticky-logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 5px;
    border: 2px solid #dc2626;
}

/* Main content */
.main {
    padding: 40px 0 60px;
}

.calendar-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.section-header {
    padding: 20px 30px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Loading spinner */
.loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ecf0f1;
    border-top: 2px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Calendar container */
.calendar-container {
    padding: 20px 30px 30px;
}

/* Event cards */
.event-card {
    background: #ffffff;
    border: 1px solid #ecf0f1;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-color: #dc2626;
}

.event-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #dc2626;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.event-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.event-date {
    background: #dc2626;
    color: white;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.event-time {
    background: #444;
    color: white;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
    margin-bottom: 8px;
}

.event-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    background: #f8f9fa;
    border-left: 3px solid #dee2e6;
    padding: 12px 15px;
    margin: 12px 0;
    border-radius: 0 4px 4px 0;
    font-style: italic;
}

.event-location {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.event-location::before {
    content: '📍';
}

.location-link {
    color: #e74c3c;
    text-decoration: none;
    transition: color 0.3s ease;
}

.location-link:hover {
    color: #c0392b;
    text-decoration: underline;
}

/* Error message */
.error-message {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.error-message p {
    margin-bottom: 20px;
    font-size: 1rem;
}

.retry-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.retry-btn:hover {
    background: #b91c1c;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #95a5a6;
}

.empty-state p {
    font-size: 0.95rem;
}

.filter-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #6c757d;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #e9ecef;
    border-color: #dc2626;
    color: #495057;
}

.filter-btn.active {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.filter-btn.active:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* Load more indicator */
.load-more-indicator {
    text-align: center;
    padding: 30px 20px;
    margin-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.load-more-text {
    color: #7f8c8d;
}

.remaining-count {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: #5a67d8;
    margin-bottom: 5px;
}

.scroll-hint {
    font-size: 0.9rem;
    color: #95a5a6;
}

.load-more-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.load-more-spinner .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ecf0f1;
    border-top: 2px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: rgba(255, 255, 255, 1);
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .logo-container {
        flex-direction: column;
        gap: 15px;
    }
    
    #club-logo {
        max-height: 60px;
        max-width: 60px;
    }
    
    .sticky-logo {
        top: 15px;
        right: 15px;
    }
    
    .sticky-logo img {
        width: 40px;
        height: 40px;
    }
    
    .team-info h1, .logo h1 {
        font-size: 1.5rem;
    }
    
    .section-header {
        padding: 15px 20px 10px;
        flex-direction: column;
        align-items: center;
    }
    
    .filter-section {
        padding: 15px 20px 30px;
    }
    
    .filter-buttons {
        gap: 8px;
        justify-content: flex-start;
    }
    
    .filter-btn {
        font-size: 0.85rem;
        padding: 6px 12px;
        min-width: 70px;
    }
    
    .calendar-container {
        padding: 15px 20px 20px;
    }
    
    .event-card {
        padding: 16px;
    }
    
    .event-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-title {
        min-width: auto;
        margin-bottom: 8px;
    }
}
