/* ============================================
   PicGallery 图片主题 - 移动端样式
   ============================================ */

/* Mobile Bottom Navigation */
.pg-mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 0 3px;
    color: #999;
    text-decoration: none;
    font-size: 9px;
    gap: 2px;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item .icon {
    font-size: 18px;
    line-height: 1;
}

.mobile-nav-item.active {
    color: var(--primary);
}

/* Mobile Menu Panel */
.pg-mobile-menu {
    position: fixed;
    top: 0;
    right: -80%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    z-index: 300;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.pg-mobile-menu.open {
    right: 0;
}

.pg-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 16px;
}

.pg-close-btn {
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    padding: 4px;
}

.pg-mobile-menu-content {
    padding: 8px 0;
}

.mobile-menu-item {
    display: block;
    padding: 14px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}

.mobile-menu-item:active {
    background: #f5f5f5;
}

.pg-mobile-menu-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 250;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pg-mobile-menu-mask.show {
    opacity: 1;
    visibility: visible;
}

/* Show mobile nav and hide desktop elements on mobile */
@media (max-width: 768px) {
    .pg-mobile-nav {
        display: flex;
    }

    /* Adjust banner on mobile */
    .pg-banner {
        aspect-ratio: 2/1;
    }
    .pg-banner-prev, .pg-banner-next {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    /* Banner strip: 2 per row on mobile */
    .pg-banner-strip-track {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Site stats: 2x2 grid on mobile */
    .pg-site-stats {
        flex-wrap: wrap;
        gap: 16px;
        padding: 16px;
    }
    .pg-stat-item {
        min-width: 40%;
    }

    /* Section title smaller on mobile */
    .pg-section-title-bar {
        font-size: 16px;
    }

    /* Hide keyboard hint on mobile */
    .pg-keyboard-hint {
        display: none;
    }

    /* Article viewer adjustments */
    .pg-image-viewer {
        min-height: 250px;
    }
    .image-nav {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    .pg-click-hint {
        font-size: 11px;
    }

    /* Comment form adjustments */
    .comment-input-row {
        flex-direction: column;
    }
    .comment-submit-btn {
        width: 100%;
        align-self: flex-end;
    }

    /* Hide category tab right text on mobile */
    .pg-cat-tabs-right {
        display: none;
    }
}

@media (max-width: 480px) {
    .pg-banner {
        aspect-ratio: 3/2;
    }
    .image-nav {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}
