/* 会员中心样式 - 响应式设计 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

        .post-form textarea {
            width: 100%;
            min-height: 300px;
            font-family: monospace;
        }
        .post-info {
            background: #e8f5e9;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
        }
        .remaining-info {
            color: #666;
            margin-top: 10px;
            font-size: 14px;
        }
        .upgrade-link {
            color: #ff9800;
            text-decoration: none;
        }

/* 会员中心布局 - 桌面端 */
.member-container {
    max-width: 1200px;
    margin: 30px auto;
    display: flex;
    gap: 30px;
    padding: 0 20px;
}

/* 侧边栏 */
.member-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px;
    padding: 30px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.user-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.member-sidebar h3 {
    margin-bottom: 5px;
    color: #333;
    font-size: 18px;
}

.member-sidebar p {
    color: #999;
    font-size: 14px;
    margin-bottom: 20px;
}

.member-menu {
    list-style: none;
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 5px;
}

.member-menu li {
    margin-bottom: 5px;
}

.member-menu li a {
    display: block;
    padding: 1px 55px;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.member-menu li a:hover {
    background: #f0f7ff;
    color: #007bff;
}

/* 主内容区 */
.member-content {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.member-content h2 {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
    font-size: 24px;
}

.member-content h3 {
    margin: 20px 0 15px 0;
    color: #555;
    font-size: 18px;
}

/* 信息组 */
.info-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.info-group label {
    display: block;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    font-size: 14px;
}

.info-group div {
    color: #333;
    font-size: 16px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 12px;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

button, .buy-btn, .sign-btn, .btn-primary {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

button:hover, .buy-btn:hover, .sign-btn:hover, .btn-primary:hover {
    background: #0056b3;
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

/* 会员登录/注册盒子 */
.member-box {
    max-width: 400px;
    margin: 80px auto;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.member-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.member-box .form-group {
    margin-bottom: 20px;
}

.member-box button {
    width: 100%;
    margin-top: 10px;
}

.member-box p {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.member-box a {
    color: #007bff;
    text-decoration: none;
}

/* 提示消息 */
.error, .success {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* 积分页面 */
.points-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 12px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.points-total {
    font-size: 18px;
}

.points-total strong {
    font-size: 36px;
    margin-right: 5px;
}

.sign-btn {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.sign-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* 表格样式 - 响应式 */
.points-table, .posts-table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
}

.posts-table td:first-child {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.points-table th, .points-table td,
.posts-table th, .posts-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.points-table th, .posts-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.points-plus {
    color: #28a745;
    font-weight: 600;
}

.points-minus {
    color: #dc3545;
    font-weight: 600;
}

/* 订阅页面 */
.subscription-active,
.subscription-inactive {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.subscription-active {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.subscription-inactive {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
}

.active-badge {
    color: #4caf50;
    font-weight: bold;
}

.inactive-badge {
    color: #ff9800;
    font-weight: bold;
}

.sub-info {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
}

.benefits {
    margin: 15px 0 0 20px;
    color: #666;
}

.benefits li {
    margin: 5px 0;
}

.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.plan {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.plan:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.plan h4 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.plan .price {
    font-size: 28px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 20px;
}

.plan .price span {
    font-size: 14px;
    font-weight: normal;
    color: #999;
}

.save-tag {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #ff9800;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.buy-btn {
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    transition: background 0.3s;
}

.buy-btn:hover {
    background: #0056b3;
}

/* 分页 */
.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a {
    display: inline-block;
    padding: 6px 12px;
    background: #f8f9fa;
    color: #007bff;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
}

.pagination a:hover,
.pagination a.current {
    background: #007bff;
    color: #fff;
}

/* ========== 响应式设计 - 移动端 ========== */
@media (max-width: 768px) {
    .member-container {
        flex-direction: column;
        padding: 0 15px;
        margin: 15px auto;
        gap: 15px;
    }
    
    .member-sidebar {
        width: 100%;
        padding: 20px;
    }
    
    .user-avatar img {
        width: 80px;
        height: 80px;
    }
    
    .member-sidebar h3 {
        font-size: 16px;
    }
    
    .member-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 1px;
        padding-top: 5px;
    }
    
    .member-menu li {
        margin-bottom: 0;
        width: calc(50% - 4px);
    }
    
    .member-menu li a {
        padding: 5px 2px;
        font-size: 13px;
        text-align: center;
    }
    
    .member-content {
        padding: 20px;
    }
    
    .member-content h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .points-summary {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .points-total strong {
        font-size: 28px;
    }
    
    .plans {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .plan {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button,
    .form-actions a {
        width: 100%;
        text-align: center;
    }
    
    .member-box {
        margin: 40px 20px;
        padding: 30px 20px;
    }
    
    /* 表格在小屏幕上可横向滚动 */
    .points-table, .posts-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .points-table th, .points-table td,
    .posts-table th, .posts-table td {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .action-links a {
        display: inline-block;
        margin-right: 8px;
        font-size: 12px;
    }
}

/* 超小屏幕（手机竖屏） */
@media (max-width: 480px) {
    .member-menu li {
        width: 100%;
    }
    
    .member-content {
        padding: 15px;
    }
    
    .info-group label {
        font-size: 13px;
    }
    
    .info-group div {
        font-size: 14px;
    }
    
    button, .buy-btn, .sign-btn, .btn-primary {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* ========== 汉堡菜单（移动端） ========== */

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    width: 45px;
    height: 45px;
    background: #007bff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.menu-toggle span {
    display: block;
    position: absolute;
    left: 12px;
    width: 21px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

.menu-toggle span:nth-child(1) { top: 14px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle span:nth-child(3) { top: 28px; }

/* 菜单打开时的动画（X图标） */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 21px;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 21px;
}

/* 移动端侧边栏 - 默认隐藏 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .member-container {
        padding-top: 60px;
    }
    
    .member-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 260px;
        height: 100vh;
        z-index: 1000;
        overflow-y: auto;
        transition: left 0.3s ease;
        border-radius: 0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .member-sidebar.open {
        left: 0;
    }
    
    /* 遮罩层 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        cursor: pointer;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    /* 移动端内容区全宽 */
    .member-content {
        width: 100%;
        margin-left: 0;
    }
}

/* 桌面端保持原样 */
@media (min-width: 769px) {
    .member-sidebar {
        position: relative;
        left: auto !important;
    }
    
    .menu-toggle,
    .sidebar-overlay {
        display: none !important;
    }
}

/* 收藏按钮样式 */
.favorite-box {
    margin: 20px 0;
    text-align: center;
}

.btn-favorite {
    display: inline-block;
    padding: 10px 25px;
    background: #f5f5f5;
    color: #666;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #ddd;
}

.btn-favorite:hover {
    background: #ffebee;
    border-color: #f44336;
    color: #f44336;
}

.btn-favorite.favorited {
    background: #ffebee;
    border-color: #f44336;
    color: #f44336;
}

.btn-favorite.favorited:hover {
    background: #f5f5f5;
    border-color: #ddd;
    color: #666;
}