* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0b1020;
    --surface: rgba(255, 255, 255, 0.08);
    --surface-2: rgba(255, 255, 255, 0.12);
    --border: rgba(255, 255, 255, 0.16);
    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.72);
    --muted-2: rgba(255, 255, 255, 0.55);
    --brand: #7c5cff;
    --brand-2: #29d3ff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-2: 0 18px 55px rgba(0, 0, 0, 0.45);
    --radius: 16px;
    --radius-sm: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background:
        radial-gradient(1200px 600px at 10% 10%, rgba(124, 92, 255, 0.35), transparent 60%),
        radial-gradient(900px 520px at 90% 0%, rgba(41, 211, 255, 0.25), transparent 55%),
        radial-gradient(700px 520px at 80% 90%, rgba(124, 92, 255, 0.20), transparent 55%),
        var(--bg);
    min-height: 100vh;
}

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

.header {
    padding: 2.5rem 0 1.5rem;
    text-align: center;
}

.header h1 {
    font-size: 2.6rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--muted);
}

.main {
    padding: 1.25rem 0 2.25rem;
}

.filters {
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
    border: 1px solid var(--border);
    backdrop-filter: blur(14px);
    padding: 1.2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--muted);
}

.filter-group select {
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    min-width: 150px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-group select option,
.filter-group select optgroup {
    color: #111;
    background: #fff;
}

.filter-group select:focus {
    border-color: rgba(41, 211, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(41, 211, 255, 0.15);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 600;
    color: var(--muted);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-2);
}

.has-tooltip {
    position: relative;
}

.has-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    bottom: calc(100% + 12px);
    z-index: 30;
    width: max-content;
    max-width: 360px;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    background: rgba(8, 12, 22, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-2);
    color: rgba(255,255,255,0.92);
    font-size: 0.95rem;
    line-height: 1.4;
    white-space: normal;
    pointer-events: none;
}

.has-tooltip:hover::before {
    content: "";
    position: absolute;
    left: 18px;
    bottom: calc(100% + 6px);
    width: 10px;
    height: 10px;
    background: rgba(8, 12, 22, 0.96);
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    transform: rotate(-45deg);
    pointer-events: none;
}

.btn {
    padding: 0.7rem 1.05rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn:focus-visible {
    outline: 2px solid rgba(41, 211, 255, 0.75);
    outline-offset: 3px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    color: rgba(255,255,255,0.95);
    box-shadow: 0 10px 25px rgba(124, 92, 255, 0.18);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 45px rgba(124, 92, 255, 0.26);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
    border: 1px solid var(--border);
    backdrop-filter: blur(14px);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card h3 {
    font-size: 2rem;
    color: rgba(255,255,255,0.92);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--muted-2);
    font-weight: 600;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.event-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-2);
}

.event-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.85), rgba(41, 211, 255, 0.65));
}

.event-content {
    padding: 1.5rem;
}

.event-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: rgba(255,255,255,0.95);
}

.event-description {
    color: var(--muted);
    margin-bottom: 1rem;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.event-meta-item i {
    width: 16px;
    color: rgba(41, 211, 255, 0.95);
}

.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.event-source {
    background: rgba(41, 211, 255, 0.18);
    border: 1px solid rgba(41, 211, 255, 0.30);
    color: rgba(255,255,255,0.92);
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.event-link {
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    z-index: 2;
    pointer-events: auto;
    transition: color 0.3s ease;
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.event-link:focus-visible {
    outline: 2px solid rgba(41, 211, 255, 0.75);
    outline-offset: 3px;
}

.event-link:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.22);
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--muted);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.footer {
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--muted);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

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

/* Dating Events Section */
.dating-events {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--brand);
}

.section-header p {
    color: var(--muted);
    font-size: 1.1rem;
}

.dating-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.dating-tab {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.dating-tab:hover {
    background: var(--surface-2);
    color: var(--text);
    transform: translateY(-1px);
}

.dating-tab.active {
    background: var(--brand);
    color: white;
    border-color: var(--brand);
}

.dating-content {
    min-height: 300px;
}

.dating-period {
    display: none;
}

.dating-period.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.dating-period h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    text-align: center;
}

.dating-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.no-events {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--muted-2);
}

.no-events i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-events p {
    font-size: 1.1rem;
}

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

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select {
        width: 100%;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .dating-events {
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    .dating-tabs {
        gap: 0.25rem;
    }
    
    .dating-tab {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .dating-events-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
}

.event-category.dating {
    background: linear-gradient(135deg, #ff6b9d, #ee5a6f);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.event-card:hover::before {
    opacity: 1;
}

.event-card:hover {
    transform: translateY(-2px);
    border-color: var(--brand);
    box-shadow: var(--shadow);
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .event-card,
    .event-link {
        transition: none;
    }
}

.version-info {
    font-size: 0.85rem;
    color: var(--muted-1);
    margin-top: 0.5rem;
    font-family: 'Courier New', monospace;
    opacity: 0.8;
}

.version-info span {
    color: var(--accent);
    font-weight: 600;
}

@media (max-width: 768px) {
    .version-info {
        font-size: 0.75rem;
        text-align: center;
    }
}
