/* ========================================
   COPELLA MOBILE OVERLAY - NETFLIX STYLE
   ======================================== */

.cp-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0f0f0f;
    color: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: none; /* Hidden by default on desktop */
}

@media (max-width: 768px) {
    .cp-mobile-overlay {
        display: block; /* Available but transform-hidden on mobile */
    }
    
    /* Fix for Admin Bar on mobile */
    .admin-bar .cp-mobile-overlay {
        top: 46px;
        height: calc(100% - 46px);
    }
}

.cp-mobile-overlay.is-open {
    transform: translateY(0);
}

.cp-mobile-overlay__content {
    padding: 20px;
    min-height: 100%;
    background: linear-gradient(180deg, rgba(15,15,15,0) 0%, #0f0f0f 100%);
}

/* === HEADER === */
.cp-mobile-overlay__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-top: env(safe-area-inset-top);
}

.cp-mobile-overlay__title {
    font-family: 'Unbounded', sans-serif;
    font-size: 28px;
    font-weight: 800;
    line-height: 0.9;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: -0.02em;
}

.cp-text-accent {
    color: #00c853;
}

.cp-mobile-overlay__close {
    background: none;
    border: none;
    color: #fff;
    padding: 0;
    cursor: pointer;
}

/* === NAVIGATION === */
.cp-mobile-nav-scroll {
    margin: 0 -20px 30px;
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cp-mobile-nav-scroll::-webkit-scrollbar {
    display: none;
}

.cp-mobile-nav {
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

.cp-mobile-nav__item {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    font-family: 'Gilroy-SemiBold', sans-serif;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.cp-mobile-nav__item--highlight {
    background: #fff;
    color: #000;
}

.cp-mobile-nav__item--donate {
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
    border-color: rgba(255, 59, 48, 0.3);
}

.cp-mobile-nav__item--logout {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
}

/* === SECTIONS === */
.cp-mobile-section {
    margin-bottom: 40px;
}

.cp-mobile-section__title {
    font-family: 'Unbounded', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 16px 0;
    letter-spacing: 0.05em;
}

/* === CARDS STACK (FEED) === */
.cp-mobile-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cp-mobile-card {
    display: block;
    text-decoration: none;
    color: inherit;
    perspective: 1000px;
}

.cp-mobile-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5; /* Taller card for "Feed" feel */
    border-radius: 24px;
    overflow: hidden;
    background: #1a1a1a;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.cp-mobile-card:active .cp-mobile-card__media {
    transform: scale(0.98);
}

.cp-mobile-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-mobile-card__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
}

.cp-mobile-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%);
}

.cp-mobile-card__content {
    margin-top: -100px; /* Увеличиваем зону контента */
    padding: 20px;
    position: relative;
    z-index: 2;
}

.cp-mobile-card__title {
    font-family: 'Unbounded', sans-serif;
    font-size: 20px; /* Чуть меньше для длинных заголовков */
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 8px 0;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Разрешаем 3 строки */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cp-mobile-card__meta {
    font-family: 'Gilroy-SemiBold', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* === RAIL (HORIZONTAL SCROLL) === */
.cp-mobile-rail {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    margin: 0 -20px;
    padding: 0 20px 20px 20px;
    scrollbar-width: none;
}

.cp-mobile-rail::-webkit-scrollbar {
    display: none;
}

.cp-mobile-rail-item {
    flex: 0 0 140px;
    text-decoration: none;
    color: inherit;
}

.cp-mobile-rail-item__media {
    width: 140px;
    height: 140px;
    border-radius: 16px;
    overflow: hidden;
    background: #1a1a1a;
    margin-bottom: 10px;
}

.cp-mobile-rail-item--circle {
    flex: 0 0 100px;
    text-align: center;
}

.cp-mobile-rail-item--circle .cp-mobile-rail-item__media {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

.cp-mobile-rail-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-mobile-rail-item__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a2a;
    color: rgba(255,255,255,0.3);
    font-family: 'Unbounded', sans-serif;
    font-weight: 700;
    font-size: 24px;
}

.cp-mobile-rail-item__title {
    font-family: 'Gilroy-SemiBold', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.9);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cp-mobile-rail-item--circle .cp-mobile-rail-item__title {
    font-size: 12px;
    text-align: center;
}
