/* 移动端响应式样式补充文件 */
/* 这个文件为各个页面特定组件提供移动端适配 */

@media (max-width: 768px) {
    /* ==== 社媒页面移动端适配 ==== */
    .social-container {
        grid-template-columns: 1fr;
        height: auto;
        min-height: calc(100vh - 56px - 60px); /* 减去底部导航栏高度 */
        padding: 0;
        padding-bottom: 60px; /* 为底部导航留空间 */
        gap: 0;
    }
    
    .social-sidebar {
        display: none; /* 完全隐藏左侧边栏 */
    }
    
    /* 底部移动导航栏 */
    .social-mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        border-top: 1px solid #EFF3F4;
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 100;
        padding: 0 20px;
    }
    
    .social-mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 8px 16px;
        cursor: pointer;
        transition: all 0.2s;
        border-radius: 12px;
        position: relative;
    }
    
    .social-mobile-nav-item.active {
        background: rgba(19, 91, 255, 0.1);
    }
    
    .social-mobile-nav-item svg {
        width: 26px;
        height: 26px;
        fill: #536471;
    }
    
    .social-mobile-nav-item.active svg {
        fill: #135BFF;
    }
    
    .social-feed {
        padding: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .post-box {
        padding: 16px;
        border-radius: 0;
        margin-bottom: 0;
        border-left: none;
        border-right: none;
    }
    
    .feed-post,
    .post-item {
        padding: 16px;
        margin-bottom: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .post-item * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .post-content {
        font-size: 15px;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .post-media {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .post-media img {
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        height: auto;
    }
    
    .social-right-sidebar {
        display: none;
    }
    
    .post-actions {
        padding: 8px 0;
        gap: 8px;
        display: flex;
        justify-content: space-around;
        max-width: 100%;
        overflow: hidden;
    }
    
    .post-action {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 0;
    }
    
    .post-action svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }
    
    .post-action span {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .post-header-info h4 {
        font-size: 15px;
    }
    
    /* ==== Tuebo Profile页面移动端适配 ==== */
    .tuebo-profile-container {
        padding: 0;
        padding-bottom: 60px;
    }
    
    .tuebo-profile-header {
        padding: 16px;
    }
    
    .tuebo-cover {
        height: 120px;
    }
    
    .tuebo-avatar-section {
        padding: 0 16px;
    }
    
    .tuebo-avatar {
        width: 80px;
        height: 80px;
        margin-top: -40px;
    }
    
    .tuebo-profile-info {
        padding: 16px;
    }
    
    .tuebo-name {
        font-size: 20px;
    }
    
    .tuebo-username {
        font-size: 14px;
    }
    
    .tuebo-bio {
        font-size: 14px;
        padding: 0 16px 16px 16px;
    }
    
    .tuebo-stats {
        padding: 12px 16px;
        border-left: none;
        border-right: none;
    }
    
    .tuebo-stat-item {
        font-size: 14px;
    }
    
    .tuebo-tabs {
        border-left: none;
        border-right: none;
        overflow-x: auto;
    }
    
    .tuebo-tab {
        font-size: 14px;
        padding: 12px 20px;
        white-space: nowrap;
    }
    
    .tuebo-posts {
        padding: 0;
    }
    
    /* ==== 搜索页面移动端适配 ==== */
    .search-results-container {
        padding: 0;
        padding-bottom: 60px;
    }
    
    .search-input-wrapper {
        padding: 12px 16px;
    }
    
    .search-input {
        font-size: 16px;
        padding: 10px 16px;
    }
    
    .search-tabs {
        padding: 12px 16px;
        overflow-x: auto;
        border-left: none;
        border-right: none;
    }
    
    .search-tab {
        font-size: 14px;
        padding: 8px 16px;
        white-space: nowrap;
    }
    
    .search-results {
        padding: 0;
    }
    
    .search-result-item {
        padding: 16px;
        border-left: none;
        border-right: none;
    }
    
    /* ==== 消息页面移动端适配 ==== */
    .messages-container {
        flex-direction: column;
        padding-bottom: 60px;
    }
    
    #chatContainer {
        display: grid !important;
        grid-template-columns: 1fr;
        height: calc(100vh - 56px - 60px); /* 减去顶部导航和底部导航 */
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 60px; /* 为底部导航留空间 */
        z-index: 10;
        background: #fff;
        width: 100%;
        max-width: 100%;
    }
    
    .chat-list-section {
        display: block;
        width: 100%;
        max-width: 100%;
        border-right: none;
    }
    
    .chat-detail-section {
        width: 100%;
        max-width: 100%;
    }
    
    #chatContainer:not(.show-detail) .chat-list-section {
        display: block;
    }
    
    #chatContainer:not(.show-detail) .chat-detail-section {
        display: none;
    }
    
    #chatContainer.show-detail .chat-list-section {
        display: none;
    }
    
    #chatContainer.show-detail .chat-detail-section {
        display: flex;
        flex-direction: column;
    }
    
    .message-item {
        padding: 12px 16px;
    }
    
    .message-avatar {
        width: 40px;
        height: 40px;
    }
    
    .message-preview h4 {
        font-size: 15px;
    }
    
    .message-preview p {
        font-size: 13px;
    }
    
    .message-detail {
        width: 100%;
    }
    
    .message-header {
        padding: 12px 16px;
    }
    
    .message-content {
        padding: 16px;
    }
    
    .message-input-area {
        padding: 12px 16px;
    }
    
    /* ==== 公益页面移动端适配 ==== */
    .charity-container {
        flex-direction: column;
        padding: 16px;
    }
    
    .charity-left, .charity-right {
        width: 100%;
        max-width: 100%;
    }
    
    .charity-header h1 {
        font-size: 24px;
    }
    
    .charity-header p {
        font-size: 14px;
    }
    
    .charity-progress {
        padding: 20px 16px;
    }
    
    .charity-progress h3 {
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    .progress-info {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .progress-current,
    .progress-target {
        width: 100%;
    }
    
    .progress-amount {
        font-size: 24px;
    }
    
    .donation-form {
        padding: 20px 16px;
    }
    
    .donor-avatar {
        width: 40px;
        height: 40px;
    }
    
    .donor-info h4 {
        font-size: 14px;
    }
    
    .donor-info p {
        font-size: 12px;
    }
    
    /* ==== 新闻页面移动端适配 ==== */
    .cooperation-hero {
        padding: 40px 20px;
        min-height: 50vh;
    }
    
    .cooperation-hero h1 {
        font-size: 32px;
    }
    
    .cooperation-hero p {
        font-size: 16px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 16px;
    }
    
    .news-card {
        margin-bottom: 16px;
    }
    
    /* ==== 定制页面移动端适配 ==== */
    .customize-container {
        padding: 16px;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }
    
    .service-card {
        padding: 20px 16px;
    }
    
    .service-card h3 {
        font-size: 18px;
    }
    
    .service-card p {
        font-size: 14px;
    }
    
    /* ==== 帮助中心移动端适配 ==== */
    .help-center-main {
        flex-direction: column;
    }
    
    .help-sidebar {
        width: 100%;
        position: static;
        height: auto;
        padding: 16px;
        border-right: none;
        border-bottom: 1px solid #e1e8ed;
    }
    
    .help-categories {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 8px;
    }
    
    .help-categories li {
        white-space: nowrap;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .help-content {
        padding: 16px;
    }
    
    .help-section h2 {
        font-size: 20px;
    }
    
    .help-item h3 {
        font-size: 16px;
    }
    
    .help-item p {
        font-size: 14px;
    }
    
    /* ==== 灵凝页面移动端适配 ==== */
    /* 注意：主要样式已移至 galapure.css 中的 @media (max-width: 768px) */
    /* 此处仅保留补充样式 */
    
    /* ==== 趋势页面移动端适配 ==== */
    .price-container {
        padding: 16px;
    }
    
    .price-header {
        padding: 16px;
    }
    
    .price-header h1 {
        font-size: 24px;
    }
    
    .price-search {
        flex-direction: column;
        gap: 12px;
    }
    
    .price-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .price-card {
        padding: 16px;
    }
    
    .price-card h3 {
        font-size: 18px;
    }
    
    .price-value {
        font-size: 24px;
    }
    
    /* ==== 邮件页面移动端适配 ==== */
    .email-container {
        flex-direction: column;
        height: auto;
    }
    
    .email-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e1e8ed;
        padding: 12px;
    }
    
    .email-list {
        width: 100%;
        border-right: none;
    }
    
    .email-detail {
        width: 100%;
    }
    
    .email-item {
        padding: 12px 16px;
    }
    
    .email-subject {
        font-size: 15px;
    }
    
    .email-preview {
        font-size: 13px;
    }
    
    /* ==== 教学工具移动端适配 ==== */
    .teaching-tool-wrapper {
        padding: 20px 16px;
    }
    
    .teaching-tool-wrapper h2 {
        font-size: 1.2em;
    }
    
    .class-card-apple {
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .teaching-progress-card {
        padding: 16px !important;
    }
    
    .teaching-progress-card > div:first-child {
        font-size: 1em !important;
        flex-wrap: wrap;
    }
    
    .teaching-progress-card > div:first-child span {
        font-size: 0.9em !important;
        margin-left: 0 !important;
        margin-top: 4px;
        display: block;
    }
    
    .teaching-progress-card > div:last-child {
        position: static !important;
        margin-top: 12px;
        justify-content: flex-start !important;
    }
    
    /* ==== 个人资料页面移动端适配 ==== */
    .profile-main-row {
        flex-direction: column;
        gap: 20px;
        padding: 16px;
    }
    
    .profile-wrapper {
        max-width: 100%;
        padding: 24px 20px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
    }
    
    .profile-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .profile-info-label {
        width: 100%;
        font-size: 13px;
    }
    
    .profile-info-value {
        font-size: 15px;
    }
    
    /* ==== 会员卡片移动端适配 ==== */
    .balance-card-mplus {
        max-width: 100%;
        margin: 0 auto 16px auto;
    }
    
    .hanlin-vip-section {
        padding: 24px 16px;
    }
    
    .hanlin-vip-title {
        font-size: 1.5em;
    }
    
    .hanlin-vip-join-btn {
        padding: 10px 28px;
        font-size: 16px;
    }
    
    .hanlin-vip-table {
        font-size: 14px;
    }
    
    .hanlin-vip-table th,
    .hanlin-vip-table td {
        padding: 12px 8px;
        font-size: 14px;
    }
    
    /* ==== 支付弹窗移动端适配 ==== */
    .payment-modal-content {
        width: 95vw;
        max-width: 400px;
        padding: 24px 16px;
    }
    
    .payment-header h2 {
        font-size: 20px;
    }
    
    .payment-amount {
        font-size: 32px;
    }
    
    .payment-method-item {
        padding: 12px;
    }
    
    /* ==== 通用按钮移动端适配 ==== */
    .apple-btn-primary,
    .apple-btn-outline,
    .apple-btn-outline-red {
        padding: 10px 24px;
        font-size: 15px;
    }
    
    .apple-input {
        padding: 10px 14px;
        font-size: 15px;
    }
    
    /* ==== 表单元素移动端适配 ==== */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px !important; /* 防止iOS自动缩放 */
    }
    
    /* ==== 模态框通用移动端适配 ==== */
    .modal-content {
        width: 95vw;
        max-width: 400px;
        padding: 24px 16px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* ==== 卡片网格移动端适配 ==== */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr !important;
    }
    
    /* ==== 隐藏不必要的装饰元素 ==== */
    .desktop-only {
        display: none !important;
    }
}

/* ================== 社媒页面移动端适配 ================== */
@media (max-width: 768px) {
    /* 主容器 */
    .chat-list-section {
        display: block;
        width: 100%;
        max-width: 100%;
        border-right: none;
    }
    
    /* 默认显示聊天列表 */
    #chatContainer:not(.show-detail) .chat-list-section {
        display: block;
    }
    
    #chatContainer:not(.show-detail) .chat-detail-section {
        display: none;
    }
    
    /* 显示聊天详情时隐藏列表 */
    #chatContainer.show-detail .chat-list-section {
        display: none;
    }
    
    #chatContainer.show-detail .chat-detail-section {
        display: flex;
        flex-direction: column;
    }
    
    /* 主容器 */
    .social-container {
        display: block;
        padding: 0;
        width: 100%;
        max-width: 100%;
    }
}

/* ==== 小屏手机额外适配 (max-width: 375px) ==== */
@media (max-width: 375px) {
    .main-header {
        height: 52px;
    }
    
    #site-logo {
        width: 32px;
        height: 32px;
    }
    
    .logo::after {
        font-size: 14px;
    }
    
    .text-variant-btn {
        right: 52px;
        width: 32px;
        height: 32px;
        font-size: 11px;
    }
    
    .user-avatar {
        right: 10px;
        width: 36px;
        height: 36px;
    }
    
    .user-avatar-img,
    .user-avatar img,
    .user-avatar .user-initial {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .main-nav ul li a {
        font-size: 16px;
        padding: 14px 20px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .title-line-large {
        font-size: 44px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .cta-button {
        padding: 12px 24px;
        font-size: 15px;
    }
}
