.esc-404-luxury-404 {
    background: linear-gradient(135deg, #fff9f9 0%, #ffffff 100%);
    min-height: 100vh;
    padding: 60px 20px;
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.esc-404-error-hero {
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
} 


.esc-fun-fact {
    background: #fff;
    border: 1px solid #ffe5e5;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 40px;
    font-size: 14px;
    color: #a91313;
    box-shadow: 0 2px 6px rgba(169, 19, 19, 0.07);
    margin: 30px auto 40px;
    animation: slideFadeIn 0.6s ease forwards;
    opacity: 0;
}

.esc-fun-icon {
    font-size: 18px;
}

.esc-fun-label {
    font-weight: 600;
}

.esc-fun-text {
    font-style: italic;
    color: #444;
}

@keyframes slideFadeIn {
    from { transform: translateY(10px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}




.esc-404-error-code {
    font-size: 120px;
    font-weight: 800;
    color: rgba(169, 19, 19, 0.1);
    line-height: 1;
    margin-bottom: -30px;
}

.esc-404-error-headline {
    font-size: 2.5rem;
    color: #a91313;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.esc-404-error-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.esc-404-game-section {
    background: white;
    border-radius: 25px;
    padding: 40px 30px;
    max-width: 800px;
    margin: 0 auto 40px;
    box-shadow: 0 10px 30px rgba(169, 19, 19, 0.08);
    position: relative;
    z-index: 2;
    border: 1px solid rgba(169, 19, 19, 0.1);
}

.esc-404-game-intro h2 {
    color: #a91313;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.esc-404-game-intro p {
    color: #888;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.esc-404-score-display {
    background: #f8f0f0;
    color: #a91313;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.esc-404-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 0 auto;
    max-width: 600px;
}

.card {
    height: 100px;
    background: linear-gradient(135deg, #a91313 0%, #5e0404ff 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    perspective: 1000px;
    box-shadow: 0 5px 15px rgba(169, 19, 19, 0.2);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    border-radius: 15px;
}

.card span {
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: scale(0.8);
}

.card.flipped {
    background: white;
    transform: rotateY(180deg);
    box-shadow: 0 3px 10px rgba(169, 19, 19, 0.1);
}

.card.flipped span {
    opacity: 1;
    transform: scale(1);
    color: #a91313;
    display: block;
}

.card.matched {
    background: linear-gradient(135deg, #027705ff 0%, #024d06ff 100%);
    cursor: default;
    transform: rotateY(180deg);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

.card.matched span {
    opacity: 1;
    color: white;
}

#restartGame {
    margin-top: 25px;
    padding: 12px 25px;
    background: #a91313;
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(169, 19, 19, 0.2);
    transition: background 0.3s ease;
}

#restartGame:hover {
    background: #8e1010;
}

@keyframes fall {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(300px); opacity: 0; }
}

.esc-404-navigation-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.esc-404-nav-button {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.esc-404-home-button {
    background: #a91313;
    color: white;
}

.esc-404-directory-button {
    background: white;
    color: #a91313;
    border: 2px solid #a91313;
}

.esc-404-contact-button {
    background: #333;
    color: white;
}

.esc-404-nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.esc-404-nav-button .esc-404-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.esc-404-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.esc-404-diamond {
    position: absolute;
    background: rgba(169, 19, 19, 0.03);
    width: 300px;
    height: 300px;
    transform: rotate(45deg);
}

.esc-404-diamond:nth-child(1) {
    top: -150px;
    right: -150px;
}

.esc-404-diamond:nth-child(2) {
    bottom: -100px;
    left: -100px;
}

.esc-404-diamond:nth-child(3) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 500px;
    height: 500px;
}

@media (max-width: 768px) {
    .esc-fun-fact {
        display: block;
        background: #fff7f7;
        border-left: 5px solid #a91313;
        border-radius: 12px;
        padding: 12px 15px;
        font-size: 13px;
        margin: 25px auto 35px;
        text-align: left;
        box-shadow: none;
        max-width: 90%;
        animation: slideFadeIn 0.6s ease forwards;
    }

    .esc-fun-icon {
        display: inline-block;
        font-size: 16px;
        margin-right: 8px;
    }

    .esc-fun-label {
        display: inline-block;
        font-weight: 700;
        color: #a91313;
        margin-right: 5px;
    }

    .esc-fun-text {
        display: block;
        margin-top: 5px;
        font-style: normal;
        font-weight: 500;
        color: #444;
    }
}


@media (max-width: 768px) {
    .esc-404-error-code {
        font-size: 80px;
    }

    .esc-404-error-headline {
        font-size: 2rem;
    }

    .esc-404-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .card {
        height: 80px;
        font-size: 24px;
    }

    .esc-404-navigation-options {
        flex-direction: column;
        align-items: center;
    }

    .esc-404-nav-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}