/* 红色横条banner */
.profile-banner {
    width: 100vw;
    min-width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    position: relative;
    height: 43.98px;
    background: linear-gradient(135deg, #e65100, #A52A2A);
    color: #fff;
    padding: 0;
    margin: 60px 0 0 0;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 1;
}
.profile-banner-content {
    width: 100%;
    max-width: 1555px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0 auto;
}
.profile-banner-content h1 {
    font-size: 16px;
    margin: 0;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    animation: fadeInUp 0.8s ease-out;
    text-align: center;
    color: #fff;
}
.profile-banner-content p {
    font-size: 12px;
    margin: 2px auto 0;
    line-height: 1.2;
    max-width: 600px;
    animation: fadeInUp 1s ease-out;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-main {
    background: #f7f7f7;
    min-height: 800px;
    padding: 0;
    margin-top: 32px;
}
.profile-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    min-height: 600px;
    position: relative;
    z-index: 0;
}
.profile-sidebar {
    width: 240px;
    background: #fff;
    border-right: 1px solid #f0f0f0;
    border-radius: 12px 0 0 12px;
    padding: 32px 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 0;
}
.profile-avatar-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}
#profileAvatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff6b35;
}
.profile-username {
    margin-top: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

/* 右上角用户头像样式 - 修复加载时头像变大的问题 */
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    vertical-align: middle;
    transition: all 0.2s ease;
}
.profile-nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.profile-tab-btn {
    width: 80%;
    padding: 12px 0;
    margin: 8px 0;
    background: none;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.profile-tab-btn.active, .profile-tab-btn:hover {
    background: #ffeaea;
    color: #ff6b35;
    font-weight: bold;
}

.profile-content {
    flex: 1;
    padding: 48px 48px 32px 48px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    z-index: 0;
}
.profile-tab-content {
    display: none;
}
.profile-tab-content.active {
    display: block;
}
.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}
.form-group label {
    font-size: 1rem;
    margin-bottom: 6px;
    color: #ff6b35;
}
.form-group input[type="text"] {
    width: 240px;
    height: 40px;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
    box-sizing: border-box;
    margin-right: 0;
}
.form-group input:focus {
    border: 1.5px solid #ff6b35;
}
.profile-btn {
    background: #ff6b35;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.profile-btn:hover {
    background: #e65100;
}
.profile-novel-stats {
    margin-top: 40px;
    background: #fff7f7;
    border-radius: 8px;
    padding: 24px 24px 16px 24px;
    box-shadow: 0 1px 4px rgba(211,47,47,0.04);
}
.profile-novel-stats h3 {
    color: #ff6b35;
    margin-bottom: 16px;
}
#novelStatsList {
    list-style: none;
    padding: 0;
    margin: 0;
}
#novelStatsList li {
    padding: 8px 0;
    border-bottom: 1px solid #f0e0e0;
    font-size: 1rem;
    color: #333;
    display: flex;
    justify-content: space-between;
}
#novelStatsList li:last-child {
    border-bottom: none;
}
@media (max-width: 900px) {
    .profile-banner {
        width: 100vw;
        min-width: 100vw;
        left: 50%;
        transform: translateX(-50%);
        margin: 60px 0 0 0;
        border-radius: 0 0 8px 8px;
        height: 38px;
        padding: 0;
    }
    .profile-banner-content {
        max-width: 100vw;
        padding: 0 8px;
    }
    .profile-banner-content h1 {
        font-size: 1rem;
    }
    .profile-banner-content p {
        font-size: 0.7rem;
        margin-top: -3px;
    }
    .profile-main {
        margin-top: 16px;
        min-height: 400px;
    }
    .profile-container {
        flex-direction: column;
        min-width: 0;
        max-width: 100vw;
        box-shadow: none;
        border-radius: 0 0 12px 12px;
    }
    .profile-sidebar {
        width: 100%;
        border-radius: 12px 12px 0 0;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        flex-direction: row;
        justify-content: center;
        padding: 16px 0 0 0;
    }
    .profile-content {
        padding: 24px 8px 16px 8px;
        min-height: 300px;
    }
    .profile-center-card {
        width: 100vw;
        height: auto;
        min-height: 400px;
        margin: 20px 0 0 0;
        border-radius: 12px;
        padding: 20px 0 0 0;
    }
}

@media (max-width: 600px) {
    .profile-banner {
        height: 32px;
        font-size: 0.9rem;
    }
    .profile-banner-content h1 {
        font-size: 0.9rem;
    }
    .profile-banner-content p {
        font-size: 0.65rem;
        margin-top: -2px;
    }
    .profile-center-card {
        padding: 10px 0 0 0;
        border-radius: 8px;
    }
}

.profile-center-card {
    width: 1200px;
    height: 1200px;
    margin: 40px auto 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 0 0 0;
}

/* 文件选择模态框样式 */
.file-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.file-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    animation: slideUp 0.3s ease-out;
}

.file-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.file-modal-header h3 {
    color: #ff6b35;
    font-size: 1.25rem;
    margin: 0;
    font-weight: 600;
}

.file-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.file-modal-close:hover {
    color: #ff6b35;
}

.file-modal-body {
    margin-bottom: 24px;
}

.file-input-wrapper {
    position: relative;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 32px 16px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.file-input-wrapper:hover {
    border-color: #ff6b35;
    background: #fff7f7;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.file-input-icon {
    font-size: 2rem;
    color: #ff6b35;
    margin-bottom: 12px;
}

.file-input-text {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.file-input-hint {
    color: #999;
    font-size: 0.85rem;
}

.file-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.file-modal-btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.file-modal-btn.cancel {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
}

.file-modal-btn.cancel:hover {
    background: #eee;
}

.file-modal-btn.upload {
    background: #ff6b35;
    color: #fff;
    border: none;
}

.file-modal-btn.upload:hover {
    background: #e65100;
}

.file-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.file-preview {
    margin-top: 16px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    display: none;
}

.file-preview.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.file-preview-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-preview-icon {
    font-size: 1.5rem;
    color: #ff6b35;
}

.file-preview-details {
    flex: 1;
}

.file-preview-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    word-break: break-all;
}

.file-preview-size {
    font-size: 0.85rem;
    color: #666;
}

.file-preview-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.file-preview-remove:hover {
    color: #ff6b35;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translate(-50%, -40%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

/* 头像上传正方形点击框样式 */
.avatar-upload-box {
    width: 80px;
    height: 80px;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 8px;
    background: #fafafa;
}
.avatar-upload-box:hover {
    border-color: #ff6b35;
    box-shadow: 0 2px 8px rgba(211,47,47,0.08);
}
.avatar-upload-box img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 1.5px solid #eee;
    margin-bottom: 4px;
    transition: border 0.2s;
}
.avatar-upload-box:hover img {
    border: 1.5px solid #ff6b35;
}
.avatar-upload-tip {
    font-size: 0.85rem;
    color: #b0b0b0;
    text-align: center;
    pointer-events: none;
    user-select: none;
}

#tab-password input[type="password"] {
    width: 240px;
    height: 40px;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
    box-sizing: border-box;
    margin-right: 0;
}

/* 强制修正橙色背景问题 */
.profile-main,
.profile-container,
.profile-content,
.profile-tab-content,
.form-group,
.avatar-upload-box,
#editProfileForm,
#editProfileForm > div,
#editProfileForm > div > div,
#editProfileForm > div > div[style*="background"] {
    background: #fff !important;
    background-color: #fff !important;
}

/* 个人简介区域保持浅灰色但不是橙色 */
#editProfileForm > div > div[style*="faf8f8"] {
    background: #faf8f8 !important;
    background-color: #faf8f8 !important;
}

/* 表单标签保持橙色文字但背景为白色 */
.form-group label {
    background: #fff !important;
    background-color: #fff !important;
} 

/* ========================================
   个人中心页面移动端全面优化
   ======================================== */

/* 移动端优化 (768px以下) */
@media (max-width: 768px) {
    /* 页脚隐藏 */
    .footer,
    footer {
        display: none !important;
    }
    
    /* 主要布局适配 */
    .profile-main {
        background: #f8f9fa;
        margin-top: 0;
        padding: 15px 0;
        min-height: calc(100vh - 60px);
    }
    
    .profile-container {
        flex-direction: column;
        max-width: 100%;
        margin: 0 10px;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    /* 侧边栏适配 */
    .profile-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        border-radius: 10px 10px 0 0;
        padding: 20px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-avatar-box {
        margin-bottom: 15px;
    }
    
    .profile-avatar-box img {
        width: 80px;
        height: 80px;
    }
    
    .profile-username {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .profile-phone {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    /* 导航标签移动端适配 */
    .profile-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .profile-nav-item {
        flex: 1;
        min-width: 120px;
        text-align: center;
        padding: 12px 8px;
        font-size: 14px;
        border-radius: 20px;
        margin: 0;
    }
    
    /* 内容区域适配 */
    .profile-content {
        padding: 20px 15px;
        border-radius: 0 0 10px 10px;
    }
    
    /* 表单适配 */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
        padding: 12px 15px;
        border-radius: 8px;
        min-height: 44px;
    }
    
    /* 头像上传区域 */
    .avatar-upload-box {
        width: 120px;
        height: 120px;
        margin: 0 auto 20px;
    }
    
    .avatar-upload-box img {
        width: 100%;
        height: 100%;
    }
    
    .avatar-upload-tip {
        font-size: 12px;
        margin-top: 8px;
    }
    
    /* 按钮适配 */
    .profile-btn {
        padding: 12px 25px;
        font-size: 16px;
        border-radius: 8px;
        min-height: 44px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
    
    /* 编辑表单布局适配 */
    #editProfileForm > div {
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    #editProfileForm > div > div {
        flex: none !important;
        max-width: 100% !important;
    }
    
    /* 个人简介区域 */
    #editProfileForm > div > div[style*="faf8f8"] {
        margin-top: 0;
        padding: 20px 15px !important;
        border-radius: 8px !important;
    }
    
    #editIntro {
        min-height: 100px;
        resize: vertical;
    }
}

/* 小屏幕移动端优化 (480px以下) */
@media (max-width: 480px) {
    .profile-container {
        margin: 0 5px;
        border-radius: 8px;
    }
    
    .profile-sidebar {
        padding: 15px;
    }
    
    .profile-content {
        padding: 15px 10px;
    }
    
    .profile-avatar-box img {
        width: 70px;
        height: 70px;
    }
    
    .profile-username {
        font-size: 16px;
    }
    
    .profile-nav-item {
        min-width: 100px;
        padding: 10px 6px;
        font-size: 13px;
    }
    
    .form-group label {
        font-size: 15px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 16px;
        padding: 10px 12px;
    }
    
    .avatar-upload-box {
        width: 100px;
        height: 100px;
    }
    
    .profile-btn {
        padding: 10px 20px;
        font-size: 15px;
        background: #ff6b35 !important;
        color: #fff !important;
        border: none !important;
    }
    
    #editIntro {
        min-height: 90px;
    }
}

/* 超小屏幕优化 (360px以下) */
@media (max-width: 360px) {
    .profile-main {
        padding: 10px 0;
    }
    
    .profile-container {
        margin: 0 3px;
    }
    
    .profile-sidebar {
        padding: 12px;
    }
    
    .profile-content {
        padding: 12px 8px;
    }
    
    .profile-nav {
        gap: 5px;
    }
    
    .profile-nav-item {
        min-width: 80px;
        padding: 8px 4px;
        font-size: 12px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 8px 10px;
    }
    
    .avatar-upload-box {
        width: 90px;
        height: 90px;
    }
}

/* 横屏优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .profile-main {
        min-height: calc(100vh - 45px);
    }
    
    .profile-sidebar {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 15px;
    }
    
    .profile-avatar-box {
        margin-bottom: 0;
        margin-right: 20px;
    }
    
    .profile-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 8px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .profile-nav-item:hover {
        transform: none;
    }
    
    .profile-nav-item:active {
        transform: scale(0.95);
        opacity: 0.8;
    }
    
    .avatar-upload-box:hover {
        transform: none;
    }
    
    .avatar-upload-box:active {
        transform: scale(0.95);
    }
} 