/* my-profile.css - 个人资料页面样式 */

.btn-post {
    border-style: none;
    background: none;
}

[v-cloak] {
    display: none;
}

/* 成功提示 */
.success-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 16px;
    border-radius: 8px;
    z-index: 99999;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.success-toast.visible {
    opacity: 1;
    transform: translate(-50%, 10px);
}

/* 用户选择器弹窗 */
.user-picker-dialog {
    min-width: 400px;
}

.user-search-box {
    padding: 10px 0;
    margin-bottom: 10px;
}

.user-search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}


.user-list {
    margin-top: 10px;
}

.no-users {
    text-align: center;
    padding: 40px 0;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 12px 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s;
    gap: 12px;
}

.user-item:hover {
    background-color: #f5f5f5;
}

.user-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ff5473;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-desc {
    font-size: 12px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 隐私提示样式 */
.privacy-tip-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 300px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    border-radius: 12px;
    margin: 20px 0;
}

.privacy-tip-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: #95a5a6;
}

.privacy-tip-text {
    font-size: 16px;
    color: #7f8c8d;
    margin: 0;
    text-align: center;
    font-weight: 500;
}

/* 编辑资料弹窗 */
.edit-profile-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: editProfileFadeIn 0.25s ease;
}

.edit-profile-dialog {
    background: #fff;
    border-radius: 20px;
    width: 540px;
    max-width: 92%;
    max-height: 88vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    animation: editProfileSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.edit-profile-header {
    background: #f5f5f5;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #eee;
}

.edit-profile-header .header-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.edit-profile-header .header-icon {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.edit-profile-header .header-text h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    letter-spacing: 0.3px;
}

.edit-profile-header .header-text p {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #888;
}

.edit-profile-header .close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    color: #666;
    background: #fff;
    transition: all 0.2s;
}

.edit-profile-header .close-btn:hover {
    background: #eee;
    color: #333;
}


.edit-profile-body {
    padding: 28px;
    overflow-y: auto;
    max-height: calc(88vh - 180px);
}

.edit-profile-body::-webkit-scrollbar {
    width: 6px;
}

.edit-profile-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.edit-profile-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.edit-profile-body::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.edit-profile-body .avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.edit-profile-body .avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 4px solid #fff;
}

.edit-profile-body .avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.edit-profile-body .avatar-wrapper:hover img {
    transform: scale(1.05);
}

.edit-profile-body .avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.25s;
    color: #fff;
}

.edit-profile-body .avatar-overlay span {
    font-size: 12px;
    font-weight: 500;
}

.edit-profile-body .avatar-wrapper:hover .avatar-overlay {
    opacity: 1;
}

.edit-profile-body .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.edit-profile-body .form-item {
    display: flex;
    flex-direction: column;
}

.edit-profile-body .form-item.full-width {
    grid-column: 1 / -1;
}

.edit-profile-body .form-item label {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.edit-profile-body .form-item label svg {
    color: #333;
}

.edit-profile-body .form-item input,
.edit-profile-body .form-item textarea,
.edit-profile-body .form-item select {
    padding: 12px 14px;
    border: 2px solid #eef0f5;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.25s;
    background: #f8f9fc;
    color: #333;
}

.edit-profile-body .form-item input::placeholder,
.edit-profile-body .form-item textarea::placeholder {
    color: #aaa;
}

.edit-profile-body .form-item input:focus,
.edit-profile-body .form-item textarea:focus,
.edit-profile-body .form-item select:focus {
    border-color: #333;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
}

.edit-profile-body .form-item textarea {
    resize: none;
    font-family: inherit;
    line-height: 1.5;
}

.edit-profile-body .input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.edit-profile-body .input-with-unit input {
    flex: 1;
    padding-right: 45px;
}

.edit-profile-body .input-with-unit .unit {
    position: absolute;
    right: 14px;
    color: #888;
    font-size: 13px;
    font-weight: 500;
}

.edit-profile-body .char-count {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}


/* 性别选择 */
.edit-profile-body .gender-select {
    display: flex;
    gap: 12px;
}

.edit-profile-body .gender-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid #eef0f5;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background: #f8f9fc;
    transition: all 0.25s;
}

.edit-profile-body .gender-option:hover {
    border-color: #333;
    background: #f5f5f5;
}

.edit-profile-body .gender-option.active {
    border-color: #333;
    background: #f0f0f0;
    color: #333;
}

.edit-profile-body .gender-option.female.active {
    border-color: #333;
    background: #f0f0f0;
    color: #333;
}

.edit-profile-body .gender-option.female:hover {
    border-color: #333;
    background: #f5f5f5;
}

/* 保存状态提示 */
.edit-profile-body .save-status {
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: editProfileFadeIn 0.3s ease;
}

.edit-profile-body .save-status.success {
    background: #d1fae5;
    color: #059669;
}

.edit-profile-body .save-status.error {
    background: #fee2e2;
    color: #dc2626;
}

/* 弹窗底部 */
.edit-profile-footer {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    padding: 20px 28px;
    border-top: 1px solid #f0f0f0;
    background: #fafbfc;
}

.edit-profile-footer button {
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-profile-footer .btn-cancel {
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #666;
}

.edit-profile-footer .btn-cancel:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.edit-profile-footer .btn-save {
    border: none;
    background: #333;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.edit-profile-footer .btn-save:hover {
    background: #222;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.edit-profile-footer .btn-save:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.edit-profile-footer .btn-save .spin {
    animation: editProfileSpin 1s linear infinite;
}

/* 动画 */
@keyframes editProfileFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes editProfileSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes editProfileSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 576px) {
    .edit-profile-dialog {
        max-width: 95%;
        border-radius: 16px;
    }
    .edit-profile-header {
        padding: 20px;
    }
    .edit-profile-body {
        padding: 20px;
    }
    .edit-profile-body .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .edit-profile-footer {
        padding: 16px 20px;
    }
    .edit-profile-footer button {
        padding: 10px 20px;
    }
}

@media (max-width: 1200px) {
    .author-content {
        width: 100%;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
    }
    .author-content .content-center .author-menu {
        width: auto;
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 992px) {
    .author-content {
        flex-wrap: wrap;
        margin: -80px auto 80px;
    }
    .author-content .content-left,
    .author-content .content-center,
    .author-content .content-right {
        width: 100%;
    }
    .author-content .content-center {
        margin: 0;
        top: 0;
        order: 2;
    }
    .author-content .content-left {
        order: 1;
    }
    .author-content .content-right {
        top: 0;
        order: 3;
    }
    .author-content .content-center .author-menu {
        position: static;
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
    }
}

@media (max-width: 768px) {
    .author-content .content-right {
        display: none !important;
    }
}
