@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Creepster&family=Nosifer&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cinzel', serif;
    background: linear-gradient(135deg, #000000 0%, #1a0033 50%, #000066 100%);
    color: #9370db;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(147, 112, 219, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(75, 0, 130, 0.05) 0%, transparent 35%);
    pointer-events: none;
    z-index: 1;
}

.underworld-realm {
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

/* Header Styles */
.guardian-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(26, 0, 51, 0.95));
    backdrop-filter: blur(15px);
    border-bottom: 3px solid #9370db;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(147, 112, 219, 0.3);
}

.header-sanctum {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.soul-return {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #9370db;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.8rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 10px;
    background: rgba(147, 112, 219, 0.1);
}

.soul-return:hover {
    color: #dda0dd;
    border-color: #9370db;
    background: rgba(147, 112, 219, 0.2);
    transform: translateX(-5px);
    box-shadow: 0 0 20px rgba(147, 112, 219, 0.4);
}

.return-portal {
    font-size: 1.5rem;
    font-weight: bold;
    animation: portalPulse 2s ease-in-out infinite;
}

@keyframes portalPulse {
    0%, 100% { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(-3px); opacity: 0.7; }
}

.anubis-throne {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.guardian-head, .weighing-scale {
    font-size: 2.5rem;
    color: #9370db;
    animation: guardianGlow 3s ease-in-out infinite alternate;
}

.weighing-scale {
    animation-delay: 1.5s;
}

@keyframes guardianGlow {
    0% {
        text-shadow: 0 0 10px rgba(147, 112, 219, 0.5);
        transform: scale(1);
    }
    100% {
        text-shadow: 0 0 30px rgba(147, 112, 219, 1), 0 0 40px rgba(138, 43, 226, 0.8);
        transform: scale(1.1);
    }
}

.anubis-throne h1 {
    font-family: 'Nosifer', cursive;
    font-size: 2.8rem;
    font-weight: 700;
    color: #9370db;
    text-shadow:
        3px 3px 0px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(147, 112, 219, 0.8),
        0 0 40px rgba(138, 43, 226, 0.6);
    letter-spacing: 2px;
}

.underworld-status {
    display: flex;
    gap: 2rem;
}

.status-relic {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.2), rgba(75, 0, 130, 0.1));
    padding: 1rem 1.5rem;
    border-radius: 15px;
    border: 2px solid rgba(147, 112, 219, 0.5);
    font-size: 1.2rem;
    font-weight: 600;
}

.relic-icon {
    font-size: 1.5rem;
    animation: relicFloat 2s ease-in-out infinite;
}

@keyframes relicFloat {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(5deg); }
}

/* Main Judgment Hall */
.judgment-hall {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.anubis-table {
    background: linear-gradient(135deg, #1a0033 0%, #000066 50%, #000000 100%);
    border-radius: 25px;
    padding: 3rem;
    border: 5px solid #9370db;
    box-shadow:
        0 0 50px rgba(147, 112, 219, 0.4),
        inset 0 0 30px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
}

.anubis-table::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(147, 112, 219, 0.05), transparent);
    animation: underworldRotate 25s linear infinite;
    pointer-events: none;
}

@keyframes underworldRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.underworld-decorations {
    position: absolute;
    top: -2rem;
    left: -2rem;
    right: -2rem;
    bottom: -2rem;
    pointer-events: none;
    color: #9370db;
    font-size: 1.5rem;
    opacity: 0.8;
}

.deco-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    animation: decoFloat 4s ease-in-out infinite;
}

.deco-sides {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
}

.side-guardian {
    font-size: 2.5rem;
    animation: guardianWatch 4s ease-in-out infinite alternate;
}

.side-guardian:last-child {
    animation-delay: 2s;
}

.deco-bottom {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    animation: decoFloat 4s ease-in-out infinite reverse;
}

@keyframes decoFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes guardianWatch {
    0% {
        text-shadow: 0 0 10px rgba(147, 112, 219, 0.5);
        transform: scale(1);
    }
    100% {
        text-shadow: 0 0 30px rgba(147, 112, 219, 1), 0 0 40px rgba(138, 43, 226, 0.8);
        transform: scale(1.1);
    }
}

/* Judgment Frame */
.judgment-frame {
    position: relative;
    width: 100%;
    height: 600px;
    background: linear-gradient(135deg, #000 0%, #1a0033 50%, #000 100%);
    border: 4px solid #9370db;
    border-radius: 20px;
    margin: 2rem 0;
    overflow: hidden;
    box-shadow:
        inset 0 0 30px rgba(147, 112, 219, 0.2),
        0 0 20px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

.blackjack-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 16px;
}

/* Anubis Wisdom */
.anubis-wisdom {
    position: relative;
    z-index: 2;
    margin-top: 2rem;
}

.wisdom-scroll {
    text-align: center;
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.2), rgba(75, 0, 130, 0.1));
    padding: 2rem;
    border-radius: 20px;
    border: 3px solid #9370db;
    position: relative;
}

.wisdom-scroll::before {
    content: '𓃰';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1a0033, #000066);
    padding: 0 1rem;
    font-size: 2rem;
    color: #9370db;
}

.wisdom-scroll h3 {
    font-family: 'Nosifer', cursive;
    font-size: 2rem;
    color: #9370db;
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(147, 112, 219, 0.8);
}

.wisdom-scroll p {
    font-size: 1.2rem;
    color: #dda0dd;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.underworld-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.dark-feature {
    background: linear-gradient(135deg, #4b0082, #1a0033);
    color: #dda0dd;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid #9370db;
    transition: all 0.3s ease;
    font-family: 'Cinzel', serif;
    box-shadow: 0 0 10px rgba(147, 112, 219, 0.3);
}

.dark-feature:hover {
    background: linear-gradient(135deg, #6a0dad, #2e0052);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(147, 112, 219, 0.5);
    text-shadow: 0 0 10px rgba(221, 160, 221, 0.8);
}

/* Footer */
.underworld-footer {
    background: linear-gradient(135deg, #000000, #1a0033);
    color: #9370db;
    padding: 2rem;
    text-align: center;
    border-top: 3px solid #9370db;
    margin-top: 3rem;
}

.footer-glyphs {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    font-size: 2rem;
    animation: glyphsPhase 6s ease-in-out infinite;
}

@keyframes glyphsPhase {
    0%, 100% { opacity: 1; transform: translateY(0); }
    33% { opacity: 0.7; transform: translateY(-5px); }
    66% { opacity: 0.4; transform: translateY(5px); }
}

.footer-curse {
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #dda0dd;
    text-shadow: 0 0 10px rgba(147, 112, 219, 0.5);
}

.footer-paths {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-paths a {
    color: #9370db;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    border: 1px solid transparent;
}

.footer-paths a:hover {
    color: #dda0dd;
    background: rgba(147, 112, 219, 0.2);
    border-color: #9370db;
    text-shadow: 0 0 10px rgba(147, 112, 219, 0.8);
}

/* Floating Souls */
.floating-souls {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.float-soul {
    position: absolute;
    color: rgba(147, 112, 219, 0.4);
    font-size: 2rem;
    animation: soulFloat 18s linear infinite;
}

.float-soul:nth-child(1) {
    left: 15%;
    animation-delay: 0s;
}

.float-soul:nth-child(2) {
    left: 35%;
    animation-delay: 4s;
    color: rgba(221, 160, 221, 0.3);
}

.float-soul:nth-child(3) {
    left: 65%;
    animation-delay: 8s;
    color: rgba(138, 43, 226, 0.4);
}

.float-soul:nth-child(4) {
    left: 85%;
    animation-delay: 12s;
}

@keyframes soulFloat {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) rotate(180deg) scale(1.2);
        opacity: 0.8;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg) scale(0.8);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .judgment-hall {
        padding: 2rem 1rem;
    }

    .anubis-table {
        padding: 2rem;
    }

    .judgment-frame {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .header-sanctum {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .underworld-status {
        gap: 1rem;
    }

    .anubis-throne h1 {
        font-size: 2rem;
    }

    .anubis-table {
        padding: 1.5rem 1rem;
    }

    .judgment-frame {
        height: 400px;
        margin: 1rem 0;
    }

    .underworld-features {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .dark-feature {
        width: 200px;
        text-align: center;
    }

    .wisdom-scroll h3 {
        font-size: 1.5rem;
    }

    .wisdom-scroll p {
        font-size: 1rem;
    }

    .footer-paths {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .judgment-frame {
        height: 350px;
    }

    .anubis-table {
        padding: 1rem;
    }

    .underworld-decorations {
        font-size: 1.2rem;
    }

    .anubis-throne h1 {
        font-size: 1.5rem;
    }
}
