/* 用户主页样式 */
body {
    background: #f5f5f5;
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

.header {
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: #4ECDC4;
    color: white;
}

.user-profile {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-profile h2 {
    color: #333;
    font-size: 28px;
    margin-bottom: 30px;
    border-bottom: 2px solid #4ECDC4;
    padding-bottom: 10px;
}

.profile-info {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
    border-radius: 50%;
    margin-right: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: bold;
}

.user-details h3 {
    color: #333;
    font-size: 20px;
    margin: 0 0 10px 0;
}

.user-details p {
    color: #666;
    margin: 5px 0;
    font-size: 14px;
}

.profile-sections {
    margin-top: 30px;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 25px;
}

.tab-button {
    padding: 12px 24px;
    background: none;
    border: none;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button.active,
.tab-button:hover {
    color: #4ECDC4;
    border-bottom-color: #4ECDC4;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
}

.question-list,
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.question-item,
.comment-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s ease;
}

.question-item:hover,
.comment-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.question-item h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.question-item h4 a {
    color: #4ECDC4;
    text-decoration: none;
}

.question-item h4 a:hover {
    text-decoration: underline;
}

.question-item p,
.comment-item p {
    color: #666;
    line-height: 1.6;
    margin: 10px 0;
}

.comment-text {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #4ECDC4;
}

.question-meta,
.comment-meta {
    display: flex;
    gap: 20px;
    color: #999;
    font-size: 12px;
    margin-top: 15px;
    align-items: center;
}

.question-meta .btn-delete,
.comment-meta .btn-delete {
    margin-left: auto;
    margin-right: 0;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #4ECDC4;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #45b7aa;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-delete {
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: #c82333;
    color: white;
    text-decoration: none;
}

.login-prompt {
    text-align: center;
    padding: 40px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 10px;
    border: 2px dashed #ffc107;
}

.login-prompt h3 {
    color: #f57c00;
    margin-bottom: 15px;
}

.login-prompt p {
    color: #666;
    margin-bottom: 20px;
}

.edit-buttons {
    margin-top: 20px;
}

.edit-buttons .btn {
    margin-right: 10px;
}

.edit-form {
    width: 100%;
    max-width: 400px;
}

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

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

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #4ECDC4;
    box-shadow: 0 0 5px rgba(78, 205, 196, 0.3);
}

.form-control[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

@media (max-width: 768px) {
    .profile-info {
        flex-direction: column;
        text-align: center;
    }

    .avatar-placeholder {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .tab-buttons {
        flex-wrap: wrap;
    }

    .question-meta,
    .comment-meta {
        flex-direction: column;
        gap: 5px;
    }

    /* Footer 移动端样式 */
    footer div[style*="display: flex"] {
        flex-direction: column !important;
        text-align: center !important;
    }

    footer div[style*="gap: 30px"] {
        flex-direction: column !important;
        gap: 20px !important;
    }
}