.popFrozenCaseCont {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(147, 51, 234, 0.2) 0%,
            rgba(168, 85, 247, 0.15) 15%,
            rgba(14, 34, 69, 0.9) 40%);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 999999;
}

.is-ios .popFrozenCaseCont {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.popFrozenCaseCont.open,
.popFrozenCaseCont.closing {
    display: flex;
}

.popFrozenCaseCont.open {
    opacity: 1;
    visibility: visible;
    display: flex;
    pointer-events: auto;
}

.popFrozenCaseCont.closing {
    visibility: visible;
    pointer-events: none;
}

.popFrozenCaseCont .poper {
    width: 450px;
    max-width: 95%;
    background: linear-gradient(139deg,
            rgba(38, 35, 78, 0.95),
            rgba(23, 19, 61, 0.98));
    border: 1px solid rgba(147, 51, 234, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(126, 34, 206, 0.5) inset;
    padding: 0;
    /* Let segments handle padding */
}

.popFrozenCaseCont.open .poper {
    transform: translateY(0);
    opacity: 1;
}

.popFrozenCaseCont .poper::before,
.popFrozenCaseCont .poper::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right,
            transparent,
            rgba(147, 51, 234, 0.7),
            rgba(168, 85, 247, 0.8),
            rgba(147, 51, 234, 0.7),
            transparent);
    z-index: 1;
}

.popFrozenCaseCont .poper::before {
    top: 0;
}

.popFrozenCaseCont .poper::after {
    bottom: 0;
}

.popFrozenCaseCont .top {
    width: 100%;
    text-align: center;
    padding: 25px 20px 15px;
    border-bottom: 1px solid rgba(147, 51, 234, 0.2);
    margin-bottom: 0;
}

.popFrozenCaseCont .top h2 {
    color: white;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.popFrozenCaseCont .top small {
    color: rgb(172, 169, 211);
    font-weight: 500;
    font-size: 14px;
}

.popFrozenCaseCont .main {
    padding: 20px;
    text-align: center;
}

.popFrozenCaseCont .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.popFrozenCaseCont .icon {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(126, 34, 206, 0.2);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(126, 34, 206, 0.2);
}

.popFrozenCaseCont .icon img {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

.popFrozenCaseCont .message h3 {
    color: white;
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.popFrozenCaseCont .message p {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.5;
}

.popFrozenCaseCont .message .support-email {
    margin-top: 8px;
}

.popFrozenCaseCont .message .support-email a {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(126, 34, 206, 0.15);
    color: #fbbf24;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.popFrozenCaseCont .message .support-email a:hover {
    background: rgba(126, 34, 206, 0.3);
    box-shadow: 0 0 8px rgba(126, 34, 206, 0.6);
}

.popFrozenCaseCont .actions {
    width: 100%;
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

.popFrozenCaseCont .topup-btn {
    background: linear-gradient(45deg, #6b21a8, #7e22ce);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    padding: 0 40px;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    height: 44px;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 2px 8px rgba(126, 34, 206, 0.2);
}

.popFrozenCaseCont .topup-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(126, 34, 206, 0.5);
}

/* Grey out main "Open" button when case is frozen */
.case_container.frozen #open-case-button {
    background: #555 !important;
    color: #ddd !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

.case_container.frozen #open-case-button span {
    color: #ddd !important;
}

.case_container.frozen #open-case-button::before {
    background: #555 !important;
    opacity: 0 !important;
    animation: none !important;
}

.case_container.frozen #open-case-button:hover {
    background: #555 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Frozen case muted appearance */
.case-frozen {
    position: relative;
    filter: grayscale(0.8) brightness(0.6);
    pointer-events: none;
    opacity: 0.7;
}

.case-frozen::after {
    content: 'FROZEN';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
}

/* Hide private cases by default */
.case-card[data-is-private="true"] {
    display: none;
}

.case-frozen .action-btn {
    background: #666 !important;
    cursor: not-allowed !important;
}

.case-frozen .action-btn:hover {
    background: #666 !important;
    transform: none !important;
}

/* Case container frozen state */
.case-container.frozen {
    filter: grayscale(0.8) brightness(0.6);
    opacity: 0.7;
}

.case-container.frozen .case_display {
    position: relative;
}

.case-container.frozen .case_display::after {
    content: 'FROZEN';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
}

.case_container.frozen .case-image-wrapper #case-image,
.case_container.frozen .case-main-img {
    -webkit-filter: blur(6px);
    filter: blur(6px);
    transition: filter 0.3s ease;
}

@media (max-width: 1024px) {
    .case_container.frozen .case-image-wrapper #case-image,
    .case_container.frozen .case-main-img {
        -webkit-filter: blur(6px) !important;
        filter: blur(6px) !important;
    }
}
