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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1b1b 100%);
    color: #ffffff;
    min-height: 100vh;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(139, 0, 0, 0.3);
    margin-bottom: 30px;
    position: relative;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

header h1 i {
    margin-right: 15px;
    color: #FFD700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

/* Language Flags */
.language-flags {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.flag-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 50px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flag-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.flag-btn.active {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    transform: scale(1.1);
}

.flag-btn:active {
    transform: scale(0.95);
}

/* Controls */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.view-toggle {
    display: flex;
    background: rgba(139, 0, 0, 0.2);
    border-radius: 10px;
    padding: 5px;
}

.view-toggle button {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.view-toggle button.active {
    background: #DC143C;
    box-shadow: 0 2px 10px rgba(220, 20, 60, 0.4);
}

.view-toggle button:hover:not(.active) {
    background: rgba(220, 20, 60, 0.3);
}

.filter-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-controls select {
    background: rgba(139, 0, 0, 0.2);
    border: 2px solid #DC143C;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    min-width: 150px;
}

.filter-controls select:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.filter-controls select option {
    background: #2d1b1b;
    color: #ffffff;
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Calendar */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: rgba(139, 0, 0, 0.2);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #DC143C;
}

.calendar-header h2 {
    font-size: 1.8rem;
    color: #FFD700;
}

.calendar-header button {
    background: #DC143C;
    border: none;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.calendar-header button:hover {
    background: #8B0000;
    transform: scale(1.05);
}

.calendar {
    background: rgba(139, 0, 0, 0.1);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #DC143C;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.calendar-weekdays div {
    text-align: center;
    font-weight: 600;
    color: #FFD700;
    padding: 10px;
    font-size: 14px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(220, 20, 60, 0.3);
    border-radius: 8px;
    padding: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.calendar-day:hover {
    background: rgba(220, 20, 60, 0.2);
    transform: scale(1.02);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day.today {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
}

.calendar-day-number {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-item {
    background: rgba(220, 20, 60, 0.8);
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.event-item:hover {
    background: rgba(255, 215, 0, 0.8);
    color: #000;
}

.event-flag {
    width: 12px;
    height: 8px;
    border-radius: 1px;
    flex-shrink: 0;
}

.event-track-img {
    width: 12px;
    height: 8px;
    border-radius: 1px;
    background: #333;
    flex-shrink: 0;
}

/* Map */
.map-container {
    background: rgba(139, 0, 0, 0.1);
    border: 2px solid #DC143C;
    border-radius: 15px;
    height: 600px;
    position: relative;
    overflow: hidden;
}

/* Custom Red Markers */
.custom-marker {
    background: transparent !important;
    border: none !important;
}

.marker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #DC143C 0%, #8B0000 100%);
    border: 2px solid #FFD700;
    border-radius: 8px;
    padding: 4px 8px;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.6);
    transition: all 0.3s ease;
    min-width: 100px;
    max-width: 150px;
}

.marker-container:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.8);
}

.marker-title {
    font-size: 10px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    margin-bottom: 2px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.marker-pin {
    font-size: 16px;
    color: #FFD700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Leaflet Map Customization */
.leaflet-container {
    background: #1a1a1a !important;
}

.leaflet-popup-content-wrapper {
    background: linear-gradient(135deg, #2d1b1b 0%, #1a1a1a 100%) !important;
    border: 2px solid #DC143C !important;
    border-radius: 10px !important;
    color: #ffffff !important;
}

.leaflet-popup-tip {
    background: #2d1b1b !important;
    border: 2px solid #DC143C !important;
}

.leaflet-popup-content {
    color: #ffffff !important;
    margin: 10px !important;
}

.leaflet-popup-content h3 {
    color: #FFD700 !important;
    margin-bottom: 10px !important;
    font-size: 16px !important;
}

.leaflet-popup-content p {
    margin: 5px 0 !important;
    font-size: 14px !important;
}

.leaflet-popup-content a {
    color: #DC143C !important;
    text-decoration: none !important;
    font-weight: bold !important;
}

.leaflet-popup-content a:hover {
    color: #FFD700 !important;
}

.leaflet-control-attribution {
    background: rgba(139, 0, 0, 0.8) !important;
    color: #ffffff !important;
}

.leaflet-control-attribution a {
    color: #FFD700 !important;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #2d1b1b 0%, #1a1a1a 100%);
    margin: 5% auto;
    padding: 30px;
    border: 2px solid #DC143C;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #DC143C;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #FFD700;
}

.event-detail {
    margin-top: 20px;
}

.event-detail h3 {
    color: #FFD700;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.event-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.event-info-item {
    background: rgba(139, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #DC143C;
}

.event-info-item strong {
    color: #FFD700;
    display: block;
    margin-bottom: 5px;
}

.event-description {
    background: rgba(139, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #DC143C;
    margin-bottom: 20px;
}

.event-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.event-links a {
    background: #DC143C;
    color: #ffffff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-links a:hover {
    background: #8B0000;
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    padding: 20px 0;
    margin-top: 50px;
    text-align: center;
}

/* --- Кастомный Multiselect --- */
.custom-multiselect {
    position: relative;
    display: inline-block;
    min-width: 220px;
    margin-right: 16px;
    vertical-align: middle;
}
.custom-multiselect .select-box {
    background: rgba(255,255,255,0.08);
    border: 2px solid #DC143C;
    border-radius: 16px;
    padding: 10px 40px 10px 16px;
    color: #fff;
    cursor: pointer;
    min-width: 200px;
    font-size: 1rem;
    transition: border 0.2s;
    position: relative;
}
.custom-multiselect .select-box:after {
    content: '\25BC';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #DC143C;
    font-size: 1.1em;
    pointer-events: none;
}
.custom-multiselect .options {
    display: none;
    position: absolute;
    left: 0;
    top: 110%;
    background: #2d1b1b;
    border: 2px solid #DC143C;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(220,20,60,0.15);
    z-index: 9999;
    min-width: 220px;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px 0;
}
.custom-multiselect.open .options {
    display: block;
}
.custom-multiselect .option {
    padding: 8px 18px 8px 36px;
    cursor: pointer;
    font-size: 1rem;
    color: #fff;
    position: relative;
    transition: background 0.15s;
    user-select: none;
}
.custom-multiselect .option input[type="checkbox"] {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    accent-color: #DC143C;
}
.custom-multiselect .option:hover {
    background: rgba(220,20,60,0.12);
}
.custom-multiselect .option.selected {
    background: rgba(220,20,60,0.18);
    font-weight: 500;
}
.custom-multiselect .placeholder {
    color: #bbb;
    font-style: italic;
}

/* --- Таблица мероприятий --- */
.event-list-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 32px auto 0 auto;
    background: rgba(255,255,255,0.03);
    border: 3px solid #DC143C;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(220,20,60,0.10);
    font-size: 1.08rem;
    table-layout: auto;
}
.event-list-table thead tr {
    background: linear-gradient(90deg, #8B0000 0%, #DC143C 100%);
}
.event-list-table th, .event-list-table td {
    padding: 18px 20px;
    text-align: left;
}
.event-list-table th {
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-bottom: 2px solid #DC143C;
}
.event-list-table tbody tr {
    transition: background 0.18s;
}
.event-list-table tbody tr:hover {
    background: rgba(220,20,60,0.10);
}
.event-list-table td {
    color: #fff;
    border-bottom: 1px solid rgba(220,20,60,0.13);
}
.event-list-table tr:last-child td {
    border-bottom: none;
}
.event-list-table a {
    color: #DC143C;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.footer a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.header a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.event-list-table a:hover {
    color: #FFD700;
}
@media (max-width: 900px) {
    .event-list-table th, .event-list-table td {
        padding: 10px 8px;
        font-size: 0.98rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .language-flags {
        position: static;
        justify-content: center;
        margin-top: 15px;
        gap: 6px;
    }
    
    .flag-btn {
        font-size: 18px;
        min-width: 45px;
        height: 35px;
        padding: 6px 10px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-toggle {
        justify-content: center;
    }
    
    .filter-controls {
        justify-content: center;
    }
    
    .filter-controls select {
        min-width: 120px;
    }
    
    .calendar-header {
        gap: 15px;
        text-align: center;
    }
    
    .calendar-weekdays div {
        font-size: 12px;
        padding: 8px 5px;
    }
    
    .calendar-day {
        padding: 3px;
    }
    
    .calendar-day-number {
        font-size: 12px;
    }
    
    .event-item {
        font-size: 9px;
        padding: 1px 3px;
    }
    
    .event-flag,
    .event-track-img {
        width: 10px;
        height: 6px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .event-info {
        grid-template-columns: 1fr;
    }
    
    .event-links {
        flex-direction: column;
    }
    
    .map-container {
        height: 400px;
    }
    
    .marker-container {
        min-width: 80px;
        max-width: 120px;
        padding: 3px 6px;
    }
    
    .marker-title {
        font-size: 9px;
        max-width: 100px;
    }
    
    .marker-pin {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .language-flags {
        gap: 4px;
    }
    
    .flag-btn {
        font-size: 16px;
        min-width: 40px;
        height: 30px;
        padding: 4px 8px;
    }
    
    .calendar-weekdays div {
        font-size: 11px;
        padding: 6px 3px;
    }
    
    .calendar-day-number {
        font-size: 11px;
    }
    
    .event-item {
        font-size: 8px;
    }
    
    .map-container {
        height: 350px;
    }
    
    .marker-container {
        min-width: 70px;
        max-width: 100px;
        padding: 2px 4px;
    }
    
    .marker-title {
        font-size: 8px;
        max-width: 80px;
    }
    
    .marker-pin {
        font-size: 12px;
    }
} 