.random-steam-event-body .event-page {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 60px);
    background: transparent;
    color: #f8fafc;
    font-family: "Inter", "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.event-shell {
    width: min(100% - 32px, 1340px);
    margin: 0 auto;
    padding: 0 0 64px;
}

.event-shell .epic-home-subnav {
    margin-bottom: 18px;
}

.event-feedback {
    margin: 0 0 18px;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid rgba(38, 187, 255, 0.35);
    background: rgba(14, 34, 54, 0.86);
    color: #e0f4ff;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.45;
}

.event-feedback.is-error {
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(74, 20, 26, 0.86);
    color: #fee2e2;
}

/* 5-Chest Showcase */
.event-chest-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.event-chest-card {
    --tier-accent: #cbd5e1;
    --tier-glow: #94a3b8;
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 18px 16px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(21, 23, 35, 0.92) 0%, rgba(14, 15, 24, 0.95) 100%);
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.event-chest-card:hover {
    border-color: color-mix(in srgb, var(--tier-accent) 44%, rgba(255, 255, 255, 0.16));
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
}

.event-chest-art {
    position: relative;
    display: grid;
    place-items: center;
    height: 142px;
    margin-bottom: 16px;
}

.event-chest-art::before {
    position: absolute;
    left: 16%;
    right: 16%;
    bottom: 6px;
    height: 28px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, color-mix(in srgb, var(--tier-glow) 46%, transparent) 0%, transparent 72%);
    filter: blur(10px);
    content: "";
    pointer-events: none;
}

.event-chest-art img {
    position: relative;
    z-index: 1;
    width: 128px;
    height: 128px;
    object-fit: contain;
    filter:
        drop-shadow(0 12px 18px rgba(0, 0, 0, 0.56))
        drop-shadow(0 0 14px color-mix(in srgb, var(--tier-glow) 42%, transparent));
    transition: transform 200ms ease, filter 200ms ease;
}

.event-chest-card:hover .event-chest-art img {
    transform: translateY(-3px);
    filter:
        drop-shadow(0 15px 20px rgba(0, 0, 0, 0.6))
        drop-shadow(0 0 18px color-mix(in srgb, var(--tier-glow) 58%, transparent));
}

.event-chest-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 8px;
    row-gap: 4px;
    margin-bottom: 14px;
}

.event-chest-name {
    margin: 0;
    color: var(--tier-accent);
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-chest-count {
    color: #8f98ab;
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.event-chest-subtitle {
    margin: 0;
    color: #7d879b;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-chest-price {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

/* Shared Buttons (Matched to Home) */
.event-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.event-btn--full {
    width: 100%;
    margin-top: auto;
}

.event-btn--compact {
    min-height: 38px;
    padding: 0 16px;
    font-size: 13px;
}

.event-btn--dark {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #242632;
    color: #f8fafc;
}

.event-btn--dark:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.24);
    background: #2f3242;
    color: #ffffff;
}

.event-btn--cyan {
    border: 1px solid #4cc9ff;
    background: #26bbff;
    color: #090b10;
    font-weight: 700;
}

.event-btn--cyan:hover:not(:disabled) {
    background: #48c7ff;
    color: #090b10;
    box-shadow: 0 8px 20px rgba(38, 187, 255, 0.28);
}

.event-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.event-btn:focus-visible,
.event-utility-btn:focus-visible,
.event-pool-tab:focus-visible,
.event-pool-card:focus-visible,
.event-modal-close:focus-visible {
    outline: 2px solid #26bbff;
    outline-offset: 2px;
}

/* Section Headers */
.event-plays-section,
.event-pool-section {
    margin-top: 32px;
}

.event-section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.event-section-row h2 {
    margin: 0;
    color: #ffffff;
    font-family: "Inter Tight", "Inter", "Be Vietnam Pro", "Segoe UI", sans-serif;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.015em;
}

/* Your Plays Grid */
.event-plays-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.event-play-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(17, 18, 28, 0.88);
    transition: border-color 160ms ease;
}

.event-play-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.event-play-thumb {
    display: block;
    border-radius: 8px;
    background: #0d0f18;
}

.event-play-thumb--chest {
    width: 54px;
    height: 54px;
    padding: 3px;
    object-fit: contain;
}

.event-play-thumb--game {
    width: 96px;
    height: 54px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.event-play-copy {
    min-width: 0;
}

.event-play-copy h3 {
    margin: 0;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-play-copy p {
    margin: 4px 0 0;
    color: #949eb2;
    font-size: 13px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-play-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-play-status {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 11px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #8f98ab;
    font-size: 12.5px;
    font-weight: 500;
}

/* Pool Preview Section */
.event-pool-tabs {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.event-pool-tab {
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: #8b94a7;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
    transition: color 150ms ease;
}

.event-pool-tab:hover {
    color: #e2e8f0;
}

.event-pool-tab.is-active {
    color: #ffffff;
    font-weight: 700;
}

.event-pool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.event-pool-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.event-pool-media {
    position: relative;
    aspect-ratio: 460 / 215;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #121420;
}

.event-pool-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 240ms ease;
}

.event-pool-card:hover .event-pool-media {
    border-color: rgba(255, 255, 255, 0.22);
}

.event-pool-card:hover .event-pool-media img {
    transform: scale(1.04);
}

.event-pool-title {
    margin: 9px 0 0;
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-pool-version {
    margin: 2px 0 0;
    color: #8892a6;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loading & Empty States */
.event-empty-state,
.event-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(17, 18, 28, 0.72);
    color: #9ba5b8;
    font-size: 14px;
}

.event-empty-state strong {
    color: #ffffff;
    font-weight: 600;
}

/* Modals */
.event-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: grid;
    place-items: center;
    padding: 20px;
}

.event-modal[hidden] {
    display: none !important;
}

.event-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 5, 12, 0.76);
    backdrop-filter: blur(6px);
}

.event-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #121420;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6);
    color: #f8fafc;
}

.event-modal-dialog--reward {
    width: min(460px, 100%);
    text-align: center;
}

.event-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
}

.event-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.event-modal-chest-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 36px;
}

.event-modal-chest-summary img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
}

.event-modal-chest-summary strong {
    display: block;
    color: #ffffff;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
}

.event-modal-price {
    display: block;
    margin-top: 4px;
    color: #26bbff;
    font-size: 17px;
    font-weight: 700;
}

.event-modal-meta {
    display: block;
    margin-top: 2px;
    color: #8f98ab;
    font-size: 12.5px;
}

.event-modal-hint {
    margin: 16px 0 18px;
    color: #9ba5b8;
    font-size: 13.5px;
    line-height: 1.5;
}

.event-modal-actions {
    display: grid;
    gap: 10px;
}

.event-modal-actions--row {
    grid-template-columns: 1fr 1fr;
}

.event-reward-label {
    display: block;
    color: #26bbff;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.event-reward-art {
    margin: 14px auto 16px;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0c0e18;
}

.event-reward-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-modal-dialog--reward h3 {
    margin: 0;
    color: #ffffff;
    font-family: "Inter Tight", "Inter", sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.event-reward-sub {
    margin: 6px 0 0;
    color: #9ba5b8;
    font-size: 13.5px;
}

/* Responsive */
@media (max-width: 1120px) {
    .event-chest-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .event-pool-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .event-plays-grid {
        grid-template-columns: 1fr;
    }

    .event-pool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .event-shell {
        width: calc(100% - 24px);
        padding-bottom: 48px;
    }

    .event-chest-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .event-chest-card {
        padding: 14px 12px 12px;
    }

    .event-chest-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .event-chest-subtitle {
        display: none;
    }

    .event-chest-price {
        grid-column: 1 / -1;
        text-align: left;
    }

    .event-chest-art {
        height: 106px;
        margin-bottom: 10px;
    }

    .event-chest-art img {
        width: 96px;
        height: 96px;
    }

    .event-chest-name,
    .event-chest-price {
        font-size: 14.5px;
    }

    .event-play-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .event-play-actions {
        grid-column: 1 / -1;
    }

    .event-play-actions .event-btn {
        width: 100%;
    }

    .event-pool-tabs {
        gap: 14px;
    }

    .event-pool-grid {
        gap: 12px;
    }
}

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

    .event-chest-card:hover,
    .event-chest-card:hover .event-chest-art img,
    .event-pool-card:hover .event-pool-media img {
        transform: none;
    }
}
