body {
    font-family: 'Lilita One', sans-serif;
    background: url('https://i.ibb.co/jsV6bxh/2423.png') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
    overflow-x: hidden;
}

.event-card {
    width: 100%;
    max-width: 600px;
    min-height: 350px;
    background: none;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.event-card:before {
    content: "";
    height: 150%;
    width: 150%;
    position: absolute;
    background: linear-gradient(
        #fd004c,
        #fe9000,
        #fff020,
        #3edf4b,
        #3363ff,
        #b102b7,
        #fd004c
    );
    left: -25%;
    top: -25%;
    animation: spin 2.5s infinite linear;
    z-index: -2;
}

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

.event-card:after {
    content: "";
    position: absolute;
    background-color: white;
    height: calc(100% - 8px);
    width: calc(100% - 8px);
    top: 4px;
    left: 4px;
    border-radius: 12px;
    z-index: -1;
}

h1 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
    line-height: 1.2;
    text-shadow: 1px 1px 1px rgba(128, 128, 128, 0.7);
}

.event-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-header {
    width: 100%;
}

.custom-select {
    position: relative;
    width: 100%;
}

.select-selected {
    width: 100%;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 6px;
    border: none;
    font-family: 'Lilita One', sans-serif;
    background: #1d4ed8;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: background-color 0.2s ease;
    box-shadow: inset 0 2px 1px 0 rgba(0, 0, 0, 0.2), 0 2px 0 0 rgba(255, 255, 255, 0.25);
}

.select-selected:hover {
    background: #1e40af;
}

.select-selected:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.select-selected .icon-container {
    width: 24px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.select-selected .icon-container img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.select-selected svg {
    width: 10px;
    height: 10px;
}

.select-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-height: 180px;
    overflow-y: auto;
    z-index: 1000;
    list-style: none;
    padding: 6px 0;
    margin: 4px 0 0 0;
}

.select-items li {
    padding: 6px 12px;
    font-size: 0.85rem;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.select-items li:hover {
    background: #f3f4f6;
}

.select-items li img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.event-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-mode {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#gameModeName {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.map-info {
    color: #666;
    font-size: 0.85rem;
}

.event-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
}

.map-container {
    padding: 8px;
    background: #f5f5f5;
    border-radius: 8px;
    flex-shrink: 0;
}

.map-thumbnail {
    width: 120px;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.map-thumbnail:hover {
    transform: scale(1.1);
}

.brawler-stats {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-grow: 1;
}

.stats-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 48%;
    min-width: 100px; /* Зменшено min-width для компактності */
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-brawler-img-container {
    width: 24px;
    height: 24px;
    padding: 4px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stat-brawler-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 50%;
}

.stat-winrate {
    font-family: 'Lilita One', sans-serif;
    background: #f5f5f5;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid #eee;
}

.event-details-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-item.right-aligned {
    justify-content: flex-end;
}

.detail-content {
    display: flex;
    align-items: center;
    gap: 5px;
}

.label {
    color: #666;
    font-size: 0.85rem;
}

#timeUntilStart,
#eventDate {
    font-size: 0.85rem;
    color: #333;
}

.banner-container {
    padding: 8px;
    background: #f5f5f5;
    border-radius: 8px;
}

.game-mode-banner {
    width: 100%;
    max-height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.timer-icon {
    width: 16px;
    height: 16px;
}

.spike-icon-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5px;
    gap: 8px;
    position: relative;
    margin-top: -20px;
}

.spike-icon {
    width: 60px;
    height: auto;
    object-fit: contain;
    transform: translateY(-8px);
}

.new-icon-container {
    position: absolute;
    top: 15px;
}

.new-icon {
    width: 80px;
    height: auto;
}

.copyright-text {
    font-size: 0.9rem;
    color: #333;
    text-align: center;
    transform: translateY(5px);
}

/* Медіа-запити для адаптивності */
@media screen and (max-width: 600px) {
    .event-card {
        padding: 10px;
        max-width: 100%;
    }

    h1 {
        font-size: 1.2rem;
    }

    .select-selected {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .select-items li {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    #gameModeName {
        font-size: 1rem;
    }

    .map-container {
        padding: 6px;
    }

    .map-thumbnail {
        width: 100px;
    }

    .brawler-stats {
        display: flex; /* Залишаємо горизонтальне розташування */
        justify-content: space-between;
        gap: 6px; /* Зменшено gap для компактності */
        flex-wrap: nowrap; /* Запобігаємо перенесенню */
    }

    .stats-column {
        width: 48%; /* Залишаємо два стовпці */
        min-width: 80px; /* Зменшено для компактності */
    }

    .stat-brawler-img-container {
        width: 20px;
        height: 20px;
        padding: 3px;
    }

    .stat-brawler-img {
        width: 20px;
        height: 20px;
    }

    .stat-winrate {
        font-size: 0.7rem; /* Зменшено розмір шрифту */
        padding: 2px 4px;
    }

    .banner-container {
        padding: 6px;
    }

    .timer-icon {
        width: 14px;
        height: 14px;
    }

    .select-selected .icon-container {
        width: 20px;
        height: 20px;
    }

    .select-selected .icon-container img {
        width: 14px;
        height: 14px;
    }

    .select-selected svg {
        width: 8px;
        height: 8px;
    }

    .spike-icon {
        width: 60px;
        transform: translateY(-6px);
    }

    .new-icon {
        width: 70px;
    }

    .copyright-text {
        font-size: 0.8rem;
        transform: translateY(-8px);
    }

    .spike-icon-container {
        margin-top: -15px;
    }

    .new-icon-container {
        top: 10px;
    }
}

@media screen and (max-width: 400px) {
    .event-row {
        flex-direction: column;
        gap: 5px;
    }

    .map-container {
        padding: 5px;
    }

    .map-thumbnail {
        width: 80px;
    }

    .brawler-stats {
        display: flex; /* Залишаємо горизонтальне розташування */
        justify-content: space-between;
        gap: 4px; /* Ще більше зменшено gap */
        flex-wrap: nowrap;
    }

    .stats-column {
        width: 48%;
        min-width: 70px; /* Зменшено для дуже малих екранів */
    }

    .stat-brawler-img-container {
        width: 18px;
        height: 18px;
        padding: 2px;
    }

    .stat-brawler-img {
        width: 18px;
        height: 18px;
    }

    .stat-winrate {
        font-size: 0.65rem;
        padding: 2px 3px;
    }

    .banner-container {
        padding: 5px;
    }

    .timer-icon {
        width: 12px;
        height: 12px;
    }

    .select-selected .icon-container {
        width: 18px;
        height: 18px;
    }

    .select-selected .icon-container img {
        width: 12px;
        height: 12px;
    }

    .select-selected svg {
        width: 7px;
        height: 7px;
    }

    .spike-icon {
        width: 40px;
        transform: translateY(-5px);
    }

    .new-icon {
        width: 60px;
    }

    .copyright-text {
        font-size: 0.7rem;
        transform: translateY(1px);
    }

    .spike-icon-container {
        margin-top: -12px;
    }

    .new-icon-container {
        top: 8px;
    }
}
