/* 
  MTALK Beast-Mode System
  ───────────────────────
  Advanced mobile UX: haptic feedback, fluid typography,
  bottom-sheet modals, card grids.
  Depends on global.css tokens.
*/

/* --- Offscreen Rendering Containment --- */
.reviews-feed,
.movie-grid,
.comments-list {
    content-visibility: auto;
    contain-intrinsic-size: 400px;
}

/* --- Global Haptic Simulation --- */
button, .btn, .nav-item, .clickable {
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
}

button:active, .btn:active, .nav-item:active, .clickable:active {
    transform: scale(0.95);
    opacity: 0.85;
}

/* --- Fluid Typography (Mobile) --- */
@media (max-width: 480px) {
    h1 { font-size: clamp(1.8rem, 8vw, 2.5rem); }
    h2 { font-size: clamp(1.4rem, 6vw, 1.8rem); }
}

/* --- Nav Items (Bottom Nav Base) --- */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--mt-text-muted, #888);
    text-decoration: none;
    font-size: 10px;
    gap: 4px;
    flex: 1;
    transition: color var(--duration-normal, 0.3s) ease;
}

.nav-item i, .nav-item span.icon {
    font-size: 22px;
    transition: transform var(--duration-normal, 0.3s) ease, filter var(--duration-normal, 0.3s) ease;
}

.nav-item.active {
    color: var(--mt-primary, #FF073A);
}

.nav-item.active span.icon {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px var(--mt-primary, #FF073A));
}

/* --- Mobile Notifications --- */
@media (max-width: 768px) {
    .notifications-dropdown {
        position: fixed;
        top: 70px;
        left: 5%;
        right: 5%;
        width: 90%;
        max-height: 70vh;
        z-index: var(--z-dropdown, 2200);
        border: 1px solid var(--mt-primary, #FF073A);
        box-shadow: 0 0 40px rgba(255, 7, 58, 0.2);
        animation: beastSlideUp 0.3s ease-out forwards;
    }

    #navNotifWrapper {
        display: none;
    }
}

@keyframes beastSlideUp {
    from { transform: translate3d(0, 100%, 0); opacity: 0; }
    to { transform: translate3d(0, 0, 0); opacity: 1; }
}

/* --- Beast-Mode Cards & Grids --- */
@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 10px;
    }

    .movie-title {
        font-size: 0.65rem;
    }

    .profile-container {
        padding: 30px 15px;
        margin-top: 70px;
        width: 95%;
    }

    .dna-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .dna-item {
        padding: 12px;
    }
}

/* --- Bottom-Sheet Modals (Mobile) --- */
@media (max-width: 768px) {
    .modal-content, .modal {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: var(--radius-xl, 24px) var(--radius-xl, 24px) 0 0;
        transform: translate3d(0, 100%, 0);
        animation: beastSlideUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
        max-height: 85vh;
        overflow-y: auto;
        padding-bottom: 40px;
        contain: layout style;
        will-change: transform;
    }

    /* Drag handle for bottom sheets */
    .modal-content::before {
        content: '';
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 2px;
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
    }
}
