/* =========================================
   11. TUTORIAL / MODAL SYSTEMS (COMMON)
   ========================================= */

/* Overlay */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Toggle classes for visibility */
/* Toggle classes for visibility */
.tutorial-overlay.active,
.tutorial-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tutorial-overlay.hidden {
    display: flex !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Base Tutorial Card */
.tutorial-content {
    /* Alias for backward compatibility */
    margin: auto;
    /* Fallback centering */
    background: linear-gradient(135deg, #3e2723, #4e342e);
    border: 3px solid #ffb300;
    padding: 35px 25px;
    width: 100%;
    max-width: 600px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9), 0 0 60px rgba(255, 179, 0, 0.15);
    position: relative;
    max-height: 90vh;
    color: #fff8e1;
    font-family: 'Roboto', sans-serif;
    overflow-y: auto;
}

/* Custom Scrollbar for Tutorial */
.tutorial-content::-webkit-scrollbar {
    width: 8px;
}

.tutorial-content::-webkit-scrollbar-track {
    background: rgba(62, 39, 35, 0.5);
    border-radius: 0 12px 12px 0;
}

.tutorial-content::-webkit-scrollbar-thumb {
    background: #ffb300;
    border-radius: 4px;
}

.tutorial-content h2 {
    font-family: 'Pirata One', cursive;
    color: #ffca28;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 #3e2723;
    line-height: 1.1;
}

.tutorial-content p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 15px;
    color: #fff8e1;
}

.tutorial-content .new-day-desc {
    margin-bottom: 30px;
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Close Button */
.btn-close-tutorial {
    position: absolute;
    top: 10px;
    right: 15px;
    background: transparent;
    border: none;
    color: #ffb300;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    transition: transform 0.2s;
    font-family: Arial, sans-serif;
    padding: 0;
}

.btn-close-tutorial:hover {
    color: #ffca28;
    transform: scale(1.1);
}

/* Help Button in Header */
.btn-help {
    background: #3e2723;
    color: #ffb300;
    border: 2px solid #ffb300;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-family: 'Pirata One', cursive;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: transform 0.2s;
    padding: 0;
    flex-shrink: 0;
    line-height: 1;

    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto 0;
}

/* Tutorial Title Generic */
.tutorial-title {
    font-family: 'Pirata One', cursive;
    font-size: 2.2rem;
    color: #ffca28;
    margin: 0 0 25px;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    line-height: 1;
}

/* Tutorial Steps (2×2 grid for 4 steps) */
.tutorial-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 25px;

    /* Wrapper box similar to wordle.css .tutorial-examples */
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(141, 110, 99, 0.5);
}

.tutorial-steps .step-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tutorial-steps .anim-box {
    background: rgba(255, 248, 225, 0.15);
    border: 2px solid #8d6e63;
    border-radius: 8px;
    padding: 0;
    height: 70px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tutorial-steps .step-emoji {
    font-size: 2.2rem;
    line-height: 1;
}

.tutorial-steps .step-card h3 {
    font-family: 'Pirata One', cursive;
    color: #ffca28;
    margin: 12px 0 6px;
    font-size: 1.1rem;
    text-shadow: 1px 1px 0 #3e2723;
}

.tutorial-steps .step-card p {
    font-size: 0.85rem;
    color: #d7ccc8;
    line-height: 1.3;
    margin: 0;
    padding: 0 5px;
}

/* Play Button (Tutorial) */
.btn-play {
    margin-top: 10px;
    background: #ffb300;
    color: #3e2723;
    border: 3px solid #3e2723;
    padding: 10px 40px;
    font-family: 'Pirata One', cursive;
    font-size: 1.6rem;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 5px 0 #3e2723;
    text-transform: uppercase;
    width: 100%;
    max-width: 250px;
}

.btn-play:hover {
    background: #ffca28;
}

.btn-play:active {
    transform: translateY(5px);
    box-shadow: none;
}

/* Tutorial Options (Difficulty Buttons container) */
.tutorial-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* Tutorial Level Button */
.btn-tutorial-level {
    background: #fff8e1;
    color: #3e2723;
    border: 3px solid #8d6e63;
    padding: 12px 25px;
    font-size: 1.2rem;
    font-family: 'Pirata One', cursive;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 5px 0 #5d4037;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-tutorial-level:hover {
    transform: translateY(-2px);
    background: #ffffff;
    border-color: #ffb300;
    color: #ffb300;
    box-shadow: 0 7px 0 #5d4037;
}

.btn-tutorial-level:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #5d4037;
}

@media (max-width: 600px) {
    .tutorial-options {
        margin-top: 15px;
        width: 100%;
        gap: 10px;
    }

    .btn-tutorial-level {
        padding: 10px 15px;
        font-size: 1rem;
        border-radius: 20px;
        flex: 1 1 auto;
        min-width: 80px;
    }

    #newDayModal .btn-play {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .tutorial-content {
        padding: 20px 18px;
    }

    .tutorial-steps {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 10px;
        margin-bottom: 12px;
    }

    .tutorial-steps .step-card {
        width: 100%;
        max-width: none;
    }

    .tutorial-steps .anim-box {
        height: 44px;
    }

    .tutorial-steps .step-emoji {
        font-size: 1.4rem;
    }

    .tutorial-steps .step-card h3 {
        margin: 4px 0 3px;
        font-size: 1rem;
    }

    .tutorial-steps .step-card p {
        font-size: 0.78rem;
        padding: 0 2px;
    }

    .tutorial-title {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }
}

/* Utility: Blur Background */
.blur-background {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

/* =========================================
   12. HOW TO PLAY STEPS (GENERIC)
   ========================================= */
.info-steps-visual {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;

    /* Wrapper box similar to wordle.css .tutorial-examples */
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(141, 110, 99, 0.5);
}

.static-step {
    flex: 1;
    min-width: 140px;
    max-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.static-step .anim-box {
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #a1887f;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 2.2rem;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.static-text {
    text-align: center;
}

.static-text strong {
    display: block;
    font-family: 'Pirata One', cursive;
    color: #ffca28;
    font-size: 1.25rem;
    margin-bottom: 6px;
    line-height: 1.1;
    text-shadow: 1px 1px 0 #000;
}

.static-text span {
    font-size: 0.9rem;
    color: #d7ccc8;
    display: block;
    line-height: 1.3;
}

.note-game {
    margin-top: 25px;
    font-style: italic;
    font-size: 0.95rem;
    color: #bcaaa4;
    border-top: 1px solid rgba(255, 202, 40, 0.3);
    padding-top: 15px;
    opacity: 0.9;
}

@media (max-width: 500px) {
    .info-steps-visual {
        flex-direction: column;
        align-items: center;
        gap: 35px;
    }

    .static-step {
        width: 100%;
        max-width: 280px;
    }

    .static-step .anim-box {
        width: 70px;
        height: 70px;
        margin-bottom: 10px;
        border-radius: 12px;
    }
}


/* =========================================
   10. MODAL ESTÁTICO (Rendición/Confirmación)
   ========================================= */

/* Overlay que cubre toda la pantalla y desenfoca el fondo */
.modal-static-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    /* Por encima de todo */
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    /* Efecto borroso */
    display: none;
    /* Oculto por defecto */
    justify-content: center;
    align-items: center;
}

.modal-static-overlay.active {
    display: flex;
    /* Flex para centrar el contenido */
}

/* Caja del modal centrada */
.modal-static-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 90%;
    max-width: 500px;
    padding: 30px;

    background: linear-gradient(to bottom, #3e2723, #2d201c);
    /* Fondo oscuro noble */
    color: #ffca28;
    /* Dorado */
    border: 2px solid #000000;
    /* Borde negro solicitado */
    border-radius: 12px;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
    text-align: center;
}

.modal-static-title {
    font-family: 'Pirata One', cursive;
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0 #000;
}

.modal-static-desc {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #fff8e1;
    /* Texto blanco hueso para lectura */
}

.modal-static-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Botones del modal */
.btn-modal-action {
    padding: 10px 20px;
    border-radius: 6px;
    font-family: 'Pirata One', cursive;
    font-size: 1.2rem;
    cursor: pointer;
    border: 2px solid #000;
    transition: transform 0.1s;
}

.btn-modal-action:active {
    transform: translateY(2px);
}

.btn-modal-cancel {
    background: #757575;
    color: #fff;
    border-color: #424242;
}

.btn-modal-cancel:hover {
    background: #616161;
}

.btn-modal-confirm {
    background: #c62828;
    /* Rojo peligro */
    color: #fff;
    border-color: #b71c1c;
}

.btn-modal-confirm:hover {
    background: #d32f2f;
}

.btn-modal-success {
    background: #f9a825;
    color: #1a1a1a;
    border-color: #f57f17;
}

.btn-modal-success:hover {
    background: #ffb300;
}

.modal-static-game-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
}

.modal-static-game-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 202, 40, 0.15);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: #fff8e1;
}

.modal-static-game-list li:last-child {
    border-bottom: none;
}

.modal-static-game-streak {
    font-weight: 700;
    color: #ffca28;
}

@keyframes popIn {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .modal-static-content {
        padding: 20px;
        width: 95%;
    }

    .modal-static-title {
        font-size: 1.6rem;
    }
}

/* ── Modal hito de racha ── */
.streak-milestone-icon {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 10px;
    animation: milestone-pulse 0.6s ease-out;
}

@keyframes milestone-pulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    70% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ═══════════════════════════════════════════
   Top 5 Ranking Modal (shared across games)
   ═══════════════════════════════════════════ */
.top5-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.top5-modal-overlay.hidden {
    display: none;
}

.top5-modal-content {
    background: rgba(26, 17, 16, 0.85);
    border: 2px solid rgba(255, 179, 0, 0.6);
    border-radius: 16px;
    padding: 40px 30px 30px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(255, 179, 0, 0.15);
    color: #fff8e1;
    font-family: 'Roboto', sans-serif;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    animation: top5ModalEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform: scale(0.9);
    opacity: 0;
}

@keyframes top5ModalEnter {
    0% {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.top5-modal-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.top5-modal-title {
    font-family: 'Pirata One', cursive;
    font-size: 2rem;
    color: #ffca28;
    margin: 0 0 10px;
    text-shadow: 2px 2px 0 #3e2723;
    line-height: 1.1;
}

.top5-modal-desc {
    font-size: 1rem;
    color: #fff8e1;
    margin: 0 0 20px;
    line-height: 1.5;
}

.top5-modal-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 248, 225, 0.7);
    margin-bottom: 10px;
}

.top5-nickname-input {
    width: 100% !important;
    box-sizing: border-box;
    margin-bottom: 6px;
    background: rgba(0, 0, 0, 0.35) !important;
    border: 2px solid rgba(255, 179, 0, 0.5) !important;
    border-radius: 10px !important;
    color: #fff8e1 !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 1rem !important;
    padding: 10px 16px !important;
    text-align: center;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.top5-nickname-input::placeholder {
    color: rgba(255, 248, 225, 0.35) !important;
}

.top5-nickname-input:focus {
    border-color: #ffb300 !important;
    box-shadow: 0 0 10px rgba(255, 179, 0, 0.3) !important;
}

.top5-nick-error {
    font-size: 0.85rem;
    color: #ff6b6b;
    margin: 4px 0 8px;
}

.top5-nick-error.hidden {
    display: none;
}

.top5-modal-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
}

.top5-modal-actions .btn-play {
    font-size: 1.1rem;
    padding: 10px 24px;
}

/* Ranking ⓘ nick-hint button */
.ranking-nick-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 213, 79, 0.12);
    border: 1px solid rgba(255, 213, 79, 0.6);
    border-radius: 50%;
    color: #ffd54f;
    font-size: 0.8rem;
    width: 19px;
    height: 19px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.ranking-nick-info-btn:hover {
    background: rgba(255, 213, 79, 0.25);
    border-color: #ffd54f;
}

/* Ranking nick popover */
.ranking-nick-popover {
    display: none;
    position: fixed;
    width: 220px;
    background: linear-gradient(145deg, #1e1005, #2e1a08);
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.8rem;
    font-family: 'Roboto', sans-serif;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.5;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 215, 0, 0.1);
    white-space: normal;
}

.ranking-nick-popover::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(255, 215, 0, 0.45);
}

.ranking-nick-popover.above::before {
    top: auto;
    bottom: -6px;
    border-bottom: none;
    border-top: 6px solid rgba(255, 215, 0, 0.45);
}

.ranking-nick-popover.open {
    display: block;
}

.ranking-nick-popover-link {
    display: inline-block;
    margin-left: 4px;
    color: #FFD700;
    text-decoration: none;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.4);
}


/* ── Avatar unlock modal ─────────────────────────────────────────────────── */

.op-aum-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10003;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.op-aum-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.op-aum-card {
    background: linear-gradient(160deg, #2d1c18, #1a1110);
    border: 2px solid rgba(255, 179, 0, 0.6);
    border-radius: 24px;
    padding: 2rem 1.75rem 1.75rem;
    width: min(360px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), inset 0 0 30px rgba(255, 179, 0, 0.06);
    transform: scale(0.88);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.op-aum-overlay.active .op-aum-card {
    transform: scale(1);
}

.op-aum-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.25rem;
}

.op-aum-sparkle {
    font-size: 1.4rem;
    animation: aum-sparkle-spin 2s linear infinite;
}

@keyframes aum-sparkle-spin {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: scale(1.3) rotate(180deg);
        opacity: 0.7;
    }
}

.op-aum-title {
    font-family: 'Pirata One', cursive;
    font-size: 1.35rem;
    color: var(--gold-treasure);
    text-shadow: 0 0 18px rgba(255, 179, 0, 0.5);
    letter-spacing: 0.3px;
}

/* ── Avatar image ring with rarity border ── */
.op-aum-img-ring {
    position: relative;
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    border: 3px solid #9e9e9e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.op-aum-img {
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.op-aum-emoji {
    font-size: 4.5rem;
    line-height: 1;
}

.op-aum-img-ring.rarity-rare {
    border-color: #2196f3;
    box-shadow: 0 0 16px rgba(33, 150, 243, 0.5);
}

.op-aum-img-ring.rarity-epic {
    border-color: #9c27b0;
    box-shadow: 0 0 18px rgba(156, 39, 176, 0.55);
}

@keyframes aum-legendary-pulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 179, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 28px rgba(255, 179, 0, 0.75), 0 0 42px rgba(255, 179, 0, 0.2);
    }
}

.op-aum-img-ring.rarity-legendary {
    border-color: var(--gold-treasure);
    animation: aum-legendary-pulse 2.5s ease-in-out infinite;
}

@property --aum-angle {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

@keyframes aum-rainbow-flow {
    to {
        --aum-angle: 360deg;
    }
}

.op-aum-img-ring.rarity-ultralegendary {
    border: none;
    box-shadow: none;
}

.op-aum-img-ring.rarity-ultralegendary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(from var(--aum-angle),
            #ff0066, #ff4400, #ff9900, #ffee00,
            #88ff00, #00ff88, #00ccff, #4466ff,
            #aa00ff, #ff0066);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: aum-rainbow-flow 3s linear infinite;
}

/* ── Rarity badge ── */
.op-aum-rarity-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid currentColor;
}

.op-aum-rarity-badge.rarity-common {
    color: #9e9e9e;
    border-color: rgba(158, 158, 158, 0.4);
    background: rgba(158, 158, 158, 0.08);
}

.op-aum-rarity-badge.rarity-rare {
    color: #64b5f6;
    border-color: rgba(33, 150, 243, 0.4);
    background: rgba(33, 150, 243, 0.08);
}

.op-aum-rarity-badge.rarity-epic {
    color: #ce93d8;
    border-color: rgba(156, 39, 176, 0.4);
    background: rgba(156, 39, 176, 0.08);
}

.op-aum-rarity-badge.rarity-legendary {
    color: var(--gold-treasure);
    border-color: rgba(255, 179, 0, 0.4);
    background: rgba(255, 179, 0, 0.08);
}

.op-aum-rarity-badge.rarity-ultralegendary {
    background: linear-gradient(90deg, #ff0066, #ff9900, #ffee00, #00ff88, #00ccff, #aa00ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    border-color: rgba(255, 179, 0, 0.3);
    background-size: 200%;
    animation: aum-badge-slide 3s linear infinite;
}

@keyframes aum-badge-slide {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* ── Reason ── */
.op-aum-reason {
    font-size: 0.72rem;
    color: #a1887f;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.3;
    margin-top: -0.2rem;
}

/* ── Name ── */
.op-aum-name {
    font-family: 'Pirata One', cursive;
    font-size: 1.6rem;
    color: #f5e6c8;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

/* ── Action buttons ── */
.op-aum-actions {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.25rem;
}

.op-aum-btn-skip,
.op-aum-btn-equip {
    flex: 1;
    padding: 0.65rem 0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
    letter-spacing: 0.3px;
}

.op-aum-btn-skip:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.op-aum-btn-equip:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.op-aum-btn-equip:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

.op-aum-btn-skip {
    background: rgba(141, 110, 99, 0.18);
    color: #a1887f;
    border: 1.5px solid rgba(141, 110, 99, 0.4);
}

.op-aum-btn-equip {
    background: var(--gold-treasure);
    color: #211512;
}

/* ── Toast ── */
.op-aum-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: #2e7d32;
    color: #fff;
    padding: 0.6rem 1.4rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 10004;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

.op-aum-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Modal: nuevos idiomas ───────────────────────────────────────────────── */
.op-nl-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10010;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.op-nl-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.op-nl-card {
    background: linear-gradient(135deg, #3e2723, #4e342e);
    border: 3px solid #ffb300;
    border-radius: 16px;
    padding: 32px 28px 28px;
    width: 100%;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.9), 0 0 60px rgba(255, 179, 0, 0.12);
    position: relative;
    transform: scale(0.85);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.op-nl-overlay.active .op-nl-card {
    transform: scale(1);
    opacity: 1;
}

.op-nl-icon {
    font-size: 2.4rem;
    line-height: 1;
    margin-bottom: 10px;
}

.op-nl-title {
    font-family: 'Pirata One', cursive;
    color: #ffca28;
    font-size: 1.9rem;
    margin: 0 0 10px;
    text-shadow: 2px 2px 0 #3e2723;
    line-height: 1.2;
}

.op-nl-desc {
    font-family: 'Roboto', sans-serif;
    color: #fff8e1;
    font-size: 1rem;
    margin: 0 0 22px;
    line-height: 1.5;
    opacity: 0.9;
}

.op-nl-flags {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 26px;
}

@media (max-width: 380px) {
    .op-nl-flags {
        grid-template-columns: repeat(2, 1fr);
    }
}

.op-nl-flag-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 179, 0, 0.2);
    transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    cursor: pointer;
}

.op-nl-flag-item:hover {
    background: rgba(255, 179, 0, 0.12);
    border-color: rgba(255, 179, 0, 0.5);
    transform: translateY(-2px);
}

.op-nl-flag-item.selected {
    background: rgba(255, 179, 0, 0.22);
    border-color: #ffb300;
    box-shadow: 0 0 14px rgba(255, 179, 0, 0.35);
    transform: translateY(-2px);
}


.op-nl-flag-img {
    width: 40px;
    height: 27px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}

.op-nl-flag-name {
    font-family: 'Roboto', sans-serif;
    font-size: 0.72rem;
    color: #fff8e1;
    opacity: 0.8;
    letter-spacing: 0.3px;
}

.op-nl-flag-new .op-nl-flag-name {
    opacity: 1;
}

.op-nl-new-badge {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #3e2723;
    background: #ffca28;
    border-radius: 4px;
    padding: 2px 5px;
    text-transform: uppercase;
    line-height: 1;
}

.op-nl-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.op-nl-btn-accept {
    background: #ffb300;
    color: #1a1a1a;
    border: none;
    border-radius: 10px;
    padding: 11px 22px;
    font-family: 'Pirata One', cursive;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.op-nl-btn-accept:hover {
    background: #ffca28;
    transform: translateY(-1px);
}

.op-nl-btn-close {
    background: rgba(255, 255, 255, 0.08);
    color: #fff8e1;
    border: 1.5px solid rgba(255, 248, 225, 0.25);
    border-radius: 10px;
    padding: 11px 22px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.op-nl-btn-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .op-nl-title {
        font-size: 1.55rem;
    }

    .op-nl-flag-item {
        padding: 7px 6px;
    }
}
