.crate-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(8px);
    padding: 15px;
}

.crate-modal-overlay.active {
    opacity: 1;
}

.crate-modal-card {
    background: #ffffff;
    border: 2px solid #1e3a8a;
    border-radius: 16px;
    padding: 30px;
    max-width: 550px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(30, 58, 138, 0.15);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #1f2937;
}

.crate-modal-overlay.active .crate-modal-card {
    transform: scale(1);
}

.crate-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.crate-close-btn:hover {
    color: #1f2937;
}

.crate-modal-header h2 {
    font-size: 22px;
    color: #1e3a8a;
    margin-bottom: 10px;
}

.crate-modal-header p {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 30px;
}

/* Crates Interactive Grid Layout */
.crates-grid {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin: 20px 0;
}

.crate-item {
    flex: 1;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.3s;
}

.crate-item:hover {
    transform: translateY(-5px);
}

.crate-box-visual {
    background: #f9fafb;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 25px 15px;
    font-size: 30px;
    color: #1e3a8a;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.crate-item:hover .crate-box-visual {
    border-color: #1e3a8a;
    background: #eff6ff;
    box-shadow: 0 0 15px rgba(30, 58, 138, 0.15);
}

.crate-item span {
    font-size: 12px;
    font-weight: 500;
    color: #4b5563;
}

/* Shaking Animation */
@keyframes violent-shake {
    0%, 100% { transform: rotate(0deg) scale(1); }
    10% { transform: rotate(-8deg) scale(1.1); }
    20% { transform: rotate(8deg) scale(1.1); }
    30% { transform: rotate(-10deg) scale(1.1); }
    40% { transform: rotate(10deg) scale(1.1); }
    50% { transform: rotate(-8deg) scale(1.1); }
    60% { transform: rotate(8deg) scale(1.1); }
    70% { transform: rotate(-5deg) scale(1.1); }
    80% { transform: rotate(5deg) scale(1.1); }
    90% { transform: rotate(-2deg) scale(1.1); }
}

.shake-animation {
    animation: violent-shake 0.8s ease-in-out;
}

.fade-out-item {
    opacity: 0 !important;
    transform: scale(0.6) !important;
    pointer-events: none;
}

/* Reveal Layout Design */
.crate-reveal-container {
    animation: zoomIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.reward-badge {
    font-size: 60px;
    color: #1e3a8a;
    margin-bottom: 15px;
}

.crate-reveal-container h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #1e3a8a;
}

.crate-reveal-container p {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 25px;
}

.promo-box {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 25px;
}

.promo-box small {
    display: block;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: #6b7280;
}

.promo-box strong {
    display: block;
    font-size: 18px;
    color: #1e3a8a;
    margin: 5px 0 12px 0;
}

.promo-code-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px dashed #1e3a8a;
    border-radius: 6px;
    overflow: hidden;
    max-width: 280px;
    margin: 0 auto;
}

.promo-code {
    background: rgba(30, 58, 138, 0.05);
    padding: 8px 15px;
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #1e3a8a;
    flex: 1;
}

.copy-promo-btn {
    background: #1e3a8a;
    color: #ffffff;
    border: none;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-promo-btn:hover {
    background: #2563eb;
}

.btn-continue-shopping {
    background: transparent;
    border: 2px solid #1e3a8a;
    color: #1e3a8a;
    border-radius: 50px;
    padding: 10px 30px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-continue-shopping:hover {
    background: #1e3a8a;
    color: #ffffff;
}

/* Toast Notifications styling */
.promo-toast {
    position: fixed;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e3a8a;
    color: #ffffff;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 100001;
    transition: bottom 0.3s ease-out;
}

.promo-toast.show {
    bottom: 30px;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 500px) {
    .crates-grid {
        gap: 10px;
    }
    .crate-box-visual {
        padding: 15px;
    }
}