.event-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    margin-bottom: 18px;
    position: relative;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.event-card:hover {
    border-color: rgba(79, 195, 247, 0.45);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
.event-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 20px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px 18px 0 0;
}
.event-title-section {
    flex: 1;
    min-width: 0;
}
.event-title {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 1px 1px rgba(0, 0, 0, 0.3);
}
.event-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(76, 175, 80, 0.35);
    background: rgba(76, 175, 80, 0.16);
    color: #4caf50;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.event-status-badge.urgent {
    border-color: rgba(244, 67, 54, 0.45);
    background: rgba(244, 67, 54, 0.16);
    color: #f44336;
}
.event-card-body {
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.event-page-description {
    margin: 0;
    padding: 12px 14px;
    color: #ddd;
    font-size: 14px;
    line-height: 1.55;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}
.event-card-footer {
    padding: 12px 20px 14px;
    background: rgba(0, 0, 0, 0.18);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.event-start-time {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #aaa;
}
.event-timer {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #4fc3f7;
    font-weight: 700;
    text-shadow: 1px 1px rgba(0, 0, 0, 0.3);
}
.event-timer.urgent {
    color: #f44336;
}
.event-timer.urgent::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f44336;
    animation: urgent-pulse 2s infinite;
}
@keyframes urgent-pulse {
    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}
.event-page-discount {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    margin-left: 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.14);
    border: 1px solid rgba(255, 215, 0, 0.32);
    text-shadow: none;
}
.event-page-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.event-detail-item {
    font-size: 12px;
    font-weight: 600;
    color: #ddd;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.event-detail-item strong {
    color: #fff;
    margin-right: 5px;
    font-weight: 700;
}
.event-item-image {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.event-item-image:hover {
    transform: scale(1.08);
    border-color: rgba(79, 195, 247, 0.4);
}
.event-item-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    max-width: 240px;
    padding: 9px 11px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    color: #fff;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.event-item-wrapper:hover .event-item-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}
.tooltip-description {
    display: block;
    margin-top: 4px;
    color: #ffe066;
    font-size: 11px;
    line-height: 1.35;
}
.event-item-tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid #1a1a1a;
}
.event-page-category-section {
    margin: 10px 0;
}
.event-page-category-block {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.events-page-category-title-inline {
    color: #aaa;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
.event-page-items-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.events-page-separator {
    height: 1px;
    margin: 14px 0;
    border-radius: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}
.events-page-store-link {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(79, 195, 247, 0.3);
    background: rgba(79, 195, 247, 0.1);
}
.store-link-left,
.store-link-right {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fffacd;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}
.store-link-left:hover,
.store-link-right:hover {
    color: #ffe066;
    text-shadow: 0 0 8px rgba(255, 224, 102, 0.5);
}
.store-link-separator {
    color: #aaa;
    font-size: 12px;
    font-weight: 600;
}
.store-link-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
}
@media (max-width: 900px) {
    .event-card-header,
    .event-card-body,
    .event-card-footer {
        padding-left: 14px;
        padding-right: 14px;
    }
    .event-title {
        font-size: 16px;
    }
    .event-page-description {
        font-size: 13px;
    }
    .event-item-image {
        width: 38px;
        height: 38px;
    }
}
@media (max-width: 768px) {
    .event-card {
        border-radius: 0;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        margin-bottom: 0;
        background: transparent;
        box-shadow: none;
    }
    .event-card:hover {
        transform: none;
        box-shadow: none;
        border-color: rgba(255, 255, 255, 0.08);
    }
    .event-card-header,
    .event-card-body,
    .event-card-footer {
        padding-left: 18px;
        padding-right: 18px;
    }
    .event-title {
        font-size: 15px;
        text-shadow: none;
    }
    .event-status-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    .event-page-description {
        font-size: 13px;
    }
    .event-timer,
    .event-start-time,
    .event-detail-item,
    .events-page-category-title-inline,
    .store-link-left,
    .store-link-right,
    .store-link-separator {
        text-shadow: none !important;
    }
    .event-item-tooltip {
        max-width: 200px;
        font-size: 11px;
    }
}
@media (max-width: 480px) {
    .event-card-header,
    .event-card-body,
    .event-card-footer {
        padding-left: 14px;
        padding-right: 14px;
    }
    .event-title {
        font-size: 14px;
    }
    .event-item-image {
        width: 34px;
        height: 34px;
    }
    .event-detail-item {
        font-size: 11px;
        padding: 4px 8px;
    }
    .store-link-left,
    .store-link-right,
    .store-link-separator {
        font-size: 12px;
    }
    .store-link-icon {
        width: 18px;
        height: 18px;
    }
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-content {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 18px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}
.modal-header-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.modal-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.modal-header-row h3 {
    margin: 0;
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}
.modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 1px 1px rgba(0, 0, 0, 0.3);
}
.modal-close {
    color: #ccc;
    font-size: 25px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    user-select: none;
}
.modal-close:hover {
    color: #fff;
}
.modal-body {
    padding: 18px;
    overflow-y: auto;
}
.search-btn {
    padding: 6px 12px;
    background: rgba(0, 168, 255, 0.15);
    border: 1px solid rgba(0, 168, 255, 0.3);
    border-radius: 10px;
    color: #00a8ff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.search-btn:hover {
    background: rgba(0, 168, 255, 0.25);
    border-color: rgba(0, 168, 255, 0.5);
    color: #00b8ff;
}
.disabled-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    cursor: default !important;
    pointer-events: none;
}
.event-item-wrapper[data-filename] {
    cursor: pointer;
}
.event-item-wrapper[data-filename]:hover .event-item-image {
    border-color: rgba(0, 168, 255, 0.5);
    transform: scale(1.08);
}
.event-item-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
    min-height: 18px;
}
.event-item-badge {
    width: 20px;
    height: 20px;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.7));
}
