/* Barra "Dynamic Island": misma que otw.mx (negra, compacta, el menú se despliega dentro) */
.di-nav {
    position: absolute; top: 24px; left: 50%;
    transform: translateX(-50%);
    width: 264px; height: 56px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 32px;
    overflow: hidden; z-index: 40;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
                height 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
                background 0.35s ease,
                box-shadow 0.35s ease;
    opacity: 0; animation: diFadeUp 0.8s 0.2s ease forwards;
    display: flex; flex-direction: column;
    will-change: width, height, transform, box-shadow;
}

.di-nav.open {
    width: min(360px, calc(100vw - 32px)); height: 330px;
    background: rgba(24, 24, 26, 0.96);
    backdrop-filter: blur(24px) saturate(145%); -webkit-backdrop-filter: blur(24px) saturate(145%);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
    transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                height 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                background 0.4s ease,
                box-shadow 0.4s ease;
}

.di-nav-top {
    display: flex; align-items: center; justify-content: center;
    height: 56px; flex-shrink: 0;
    width: 100%; box-sizing: border-box; position: relative;
}

.di-nav-left {
    position: absolute; left: 20px; right: 20px; height: 100%;
    display: flex; align-items: center;
    pointer-events: none;
}
.di-nav-left > * { pointer-events: auto; }

.di-logo {
    position: absolute; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.di-logo img { height: 32px; width: auto; display: block; object-fit: contain; transform: scale(1.6); }

.di-menu-btn, .di-action-btn, .di-close-btn {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; padding: 0; border: 0; background: transparent;
    color: rgba(255, 255, 255, 0.85); cursor: pointer; text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.di-menu-btn:hover, .di-action-btn:hover, .di-close-btn:hover { color: #fff; }
.di-menu-btn { margin-left: -6px; }
.di-nav-top svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.di-action-btn, .di-close-btn { position: absolute; right: 14px; }
.di-close-btn { opacity: 0; pointer-events: none; transform: scale(0.5) rotate(-90deg); }

.di-nav.open .di-menu-btn { opacity: 0; pointer-events: none; }
.di-nav.open .di-action-btn { opacity: 0; pointer-events: none; transform: scale(0.5) rotate(90deg); }
.di-nav.open .di-close-btn { opacity: 1; pointer-events: auto; transform: none; }

.di-nav-menu {
    display: flex; flex-direction: column; gap: 0px;
    padding: 0px 16px 20px 16px;
    opacity: 0; pointer-events: none; visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}
.di-nav.open .di-nav-menu {
    opacity: 1; pointer-events: auto; visibility: visible;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
}

.di-menu-item {
    text-decoration: none; display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; border-radius: 12px; min-height: 44px;
    color: rgba(255, 255, 255, 0.76); font-size: 15px; font-weight: 500; letter-spacing: -0.2px;
    opacity: 0; transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.di-menu-item-left { display: flex; align-items: center; gap: 15px; }
.di-menu-item-left svg {
    width: 19px; height: 19px; color: rgba(255, 255, 255, 0.48);
    stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
    transition: color 0.2s ease;
}
.di-nav.open .di-menu-item {
    opacity: 1; transform: translateY(0);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s;
}
.di-nav.open .di-menu-item:nth-child(1) { transition-delay: 0.1s; }
.di-nav.open .di-menu-item:nth-child(2) { transition-delay: 0.15s; }
.di-nav.open .di-menu-item:nth-child(3) { transition-delay: 0.2s; }
.di-nav.open .di-menu-item:nth-child(4) { transition-delay: 0.25s; }

.di-menu-item:hover { background: rgba(255, 255, 255, 0.055); color: #f5f5f7; }
.di-menu-item:hover .di-menu-item-left svg { color: rgba(255, 255, 255, 0.86); }
.di-chevron {
    width: 14px; height: 14px; color: rgba(255, 255, 255, 0.38);
    stroke: currentColor; fill: none; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round;
    transition: transform 0.2s ease, color 0.2s ease;
}
.di-menu-item:hover .di-chevron { transform: translateX(2px); color: rgba(255, 255, 255, 0.72); }
.di-menu-item:focus-visible, .di-login-btn:focus-visible,
.di-menu-btn:focus-visible, .di-action-btn:focus-visible, .di-close-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.72); outline-offset: 2px;
}

.di-divider {
    height: 1px; background: rgba(255, 255, 255, 0.1); margin: 10px 12px 12px;
    opacity: 0; transform: translateY(10px); transition: opacity 0.2s ease, transform 0.2s ease;
}
.di-nav.open .di-divider { opacity: 1; transform: none; transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.3s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.3s; }

.di-login-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: rgba(255, 255, 255, 0.055); color: rgba(255, 255, 255, 0.72); text-decoration: none;
    padding: 12px; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 14px;
    margin-top: 4px; font-weight: 500; font-size: 14px; letter-spacing: -0.2px;
    opacity: 0; transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.di-login-btn svg { width: 16px; height: 16px; opacity: 0.8; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.di-nav.open .di-login-btn { opacity: 1; transform: none; transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.35s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.35s, background 0.2s, color 0.2s; }
.di-login-btn:hover { background: rgba(255, 255, 255, 0.095); color: #fff; }

@keyframes diFadeUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .di-nav, .di-nav * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
