.odos-modal-backdrop,
.odos-progress-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at center, rgba(216,169,77,.18), transparent 28rem),
        rgba(3,5,9,.76);
    backdrop-filter: blur(7px);
}

.odos-modal-backdrop[hidden],
.odos-progress-backdrop[hidden] {
    display: none !important;
}

.odos-modal,
.odos-progress-card {
    position: relative;
    width: min(560px, 100%);
    border: 1px solid rgba(216,169,77,.42);
    border-radius: 24px;
    padding: 28px;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025)),
        radial-gradient(circle at top left, rgba(216,169,77,.22), transparent 18rem),
        rgba(24,27,37,.98);
    box-shadow:
        0 30px 90px rgba(0,0,0,.55),
        inset 0 0 0 1px rgba(255,255,255,.04);
    overflow: hidden;
}

.odos-modal:before,
.odos-progress-card:before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, rgba(216,169,77,.08) 0 1px, transparent 1px),
        linear-gradient(0deg, rgba(216,169,77,.06) 0 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: .45;
}

.odos-modal > *,
.odos-progress-card > * {
    position: relative;
    z-index: 1;
}

.odos-modal__sigil {
    position: absolute;
    top: 22px;
    right: 26px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(216,169,77,.48);
    border-radius: 999px;
    color: var(--accent-light);
    background: rgba(216,169,77,.12);
    font-size: 1.35rem;
    animation: odosSigilPulse 2.4s ease-in-out infinite;
}

.odos-modal h2,
.odos-progress-card h2 {
    margin-bottom: 10px;
    font-size: clamp(1.7rem, 4vw, 2.25rem);
}

.odos-modal p:not(.eyebrow),
.odos-progress-card p:not(.eyebrow),
.odos-progress-card small {
    color: var(--muted);
    line-height: 1.5;
}

.odos-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.arcane-ring {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto 18px;
}

.arcane-ring span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 2px solid transparent;
}

.arcane-ring span:nth-child(1) {
    border-top-color: var(--accent-light);
    border-right-color: rgba(216,169,77,.32);
    animation: odosSpin 1.15s linear infinite;
}

.arcane-ring span:nth-child(2) {
    inset: 13px;
    border-bottom-color: rgba(244,233,207,.85);
    border-left-color: rgba(216,169,77,.25);
    animation: odosSpinReverse 1.8s linear infinite;
}

.arcane-ring span:nth-child(3) {
    inset: 32px;
    background: radial-gradient(circle, var(--accent-light), var(--accent));
    box-shadow: 0 0 32px rgba(216,169,77,.6);
    animation: odosCorePulse 1.4s ease-in-out infinite;
}

.fantasy-progress {
    position: relative;
    height: 18px;
    overflow: hidden;
    border: 1px solid rgba(216,169,77,.38);
    border-radius: 999px;
    margin: 20px 0 12px;
    background:
        linear-gradient(180deg, rgba(0,0,0,.34), rgba(255,255,255,.04)),
        rgba(0,0,0,.26);
}

.fantasy-progress__bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 42%;
    border-radius: 999px;
    background:
        linear-gradient(90deg, #8e5d24, var(--accent), var(--accent-light), var(--accent));
    box-shadow: 0 0 18px rgba(216,169,77,.45);
    animation: odosProgressTravel 1.65s ease-in-out infinite;
}

.fantasy-progress:after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
        110deg,
        transparent 0 30%,
        rgba(255,255,255,.22) 32% 36%,
        transparent 38% 100%
    );
    animation: odosShimmer 1.35s linear infinite;
}

@keyframes odosSpin {
    to { transform: rotate(360deg); }
}

@keyframes odosSpinReverse {
    to { transform: rotate(-360deg); }
}

@keyframes odosCorePulse {
    0%, 100% { transform: scale(.82); opacity: .82; }
    50% { transform: scale(1.05); opacity: 1; }
}

@keyframes odosProgressTravel {
    0% { transform: translateX(-45%); width: 32%; }
    50% { width: 58%; }
    100% { transform: translateX(260%); width: 32%; }
}

@keyframes odosShimmer {
    from { transform: translateX(-80%); }
    to { transform: translateX(120%); }
}

@keyframes odosSigilPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(216,169,77,0);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 0 28px rgba(216,169,77,.25);
    }
}

@media (max-width: 560px) {
    .odos-modal,
    .odos-progress-card {
        padding: 22px;
    }

    .odos-modal__actions {
        flex-direction: column-reverse;
    }

    .odos-modal__actions .button {
        width: 100%;
    }
}
