/* User personal center专用样式 */

/* User personal center样式 */
.profile-header {
    padding: 40px 0;
    text-align: center;
}

.profile-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ffd700, #00bcd4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: #1a1a2e;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.profile-info {
    text-align: left;
    flex: 1;
}

.profile-username {
    font-size: 2rem;
    color: #ffd700;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item {
    display: flex;
    gap: 10px;
}

.detail-label {
    color: #e8eaf6;
    font-weight: 500;
}

.detail-value {
    color: #ffffff;
}

/* 个人中心标签页 */
.profile-content {
    margin: 30px 0;
}

.profile-tabs {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: width 0.6s;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: #ffd700;
    transform: translateY(-2px);
}

.tab-btn:hover::before {
    width: 100%;
}

.tab-btn.active {
    background: linear-gradient(45deg, #ffd700, #00bcd4);
    border-color: transparent;
    color: #1a1a2e;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.tab-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    min-height: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.stat-card:hover::before {
    transform: translateX(100%);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ffd700, #00bcd4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.stat-label {
    color: #e8eaf6;
    font-size: 0.9rem;
}

/* 最近活动 */
.recent-activity h3 {
    color: #ffd700;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 3px solid #00bcd4;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.activity-icon {
    font-size: 1.5rem;
}

.activity-content {
    flex: 1;
}

.activity-text {
    color: #ffffff;
    margin-bottom: 5px;
}

.activity-time {
    color: #e8eaf6;
    font-size: 0.8rem;
}

/* 成就系统 */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.achievement-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.3);
}

.achievement-card:hover::before {
    transform: translateX(100%);
}

.achievement-card.unlocked {
    background: rgba(76, 236, 196, 0.1);
    border-color: rgba(76, 236, 196, 0.3);
    box-shadow: 0 5px 15px rgba(76, 236, 196, 0.2);
}

.achievement-card.locked {
    opacity: 0.7;
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.achievement-card h3 {
    color: #ffd700;
    margin-bottom: 10px;
}

.achievement-card p {
    color: #e8eaf6;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.achievement-progress {
    color: #00bcd4;
    font-weight: 500;
    font-size: 0.9rem;
}

/* 活动标签页 */
.activity-section {
    margin-bottom: 30px;
}

.activity-section h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.posts-list, .replies-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #e8eaf6;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-text {
    font-size: 1.1rem;
}

/* 设置标签页 */
.settings-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-section h3 {
    color: #ffd700;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* 国家和地区下拉菜单样式 */
#country, #province, #city {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    font-family: 'Segoe UI Emoji', 'Segoe UI Symbol', 'Segoe UI', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}

#country:focus, #province:focus, #city:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

#country option, #province option, #city option {
    background-color: #1a1a2e;
    color: #ffffff;
    font-family: 'Segoe UI Emoji', 'Segoe UI Symbol', 'Segoe UI', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* 预设头像选择 */
.preset-avatars {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.avatar-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.avatar-option:hover {
    transform: scale(1.1);
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.avatar-option.selected {
    border-color: #00bcd4;
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.5);
}

/* 文件上传 */
#avatarUpload {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: #e8eaf6;
}

#avatarUpload::-webkit-file-upload-button {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 5px;
    color: #ffd700;
    padding: 5px 10px;
    cursor: pointer;
}

.upload-preview {
    margin-top: 15px;
    text-align: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
    margin: 0;
}

.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(45deg, #ffd700, #00bcd4);
    color: #1a1a2e;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    filter: brightness(1.1);
}

/* 学习进度标签页 */
.learning-progress-section {
    margin-bottom: 30px;
}

.learning-progress-section h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.progress-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #00bcd4);
    border-radius: 10px;
    width: 0%;
    transition: width 1s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    color: #ffffff;
    font-size: 0.9rem;
}

.goal-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.goal-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.goal-item:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.goal-icon {
    font-size: 1.5rem;
}

.goal-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.goal-label {
    color: #e8eaf6;
    font-size: 0.9rem;
}

.goal-value {
    color: #ffd700;
    font-size: 1.5rem;
    font-weight: bold;
}

.learning-charts {
    margin-top: 30px;
}

.learning-charts h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 我的收藏标签页 */
.favorites-section {
    margin-bottom: 30px;
}

.favorites-section h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.favorite-word-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.favorite-word-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.favorite-word-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 215, 0, 0.3);
}

.favorite-word-card:hover::before {
    transform: translateX(100%);
}

.favorite-word-card .remove-favorite {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(255, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.favorite-word-card:hover .remove-favorite {
    opacity: 1;
}

.word-main {
    color: #ffd700;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.word-type {
    color: #00bcd4;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.word-meaning {
    color: #ffffff;
    font-size: 0.9rem;
}

.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.favorite-post-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.favorite-post-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.favorite-post-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 215, 0, 0.3);
}

.favorite-post-item:hover::before {
    transform: translateX(100%);
}

.favorite-post-item .remove-favorite {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(255, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.favorite-post-item:hover .remove-favorite {
    opacity: 1;
}

.post-title {
    color: #ffd700;
    font-weight: 500;
    margin-bottom: 8px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    color: #e8eaf6;
    font-size: 0.8rem;
}

/* 学习历史标签页 */
.history-section {
    margin-bottom: 30px;
}

.history-section h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.history-word, .history-rule {
    color: #ffd700;
    font-weight: 500;
    font-size: 1.1rem;
    margin-right: 15px;
}

.history-meaning {
    color: #ffffff;
    font-size: 0.95rem;
}

.history-date {
    color: #e8eaf6;
    font-size: 0.85rem;
    align-self: flex-end;
    margin-top: 5px;
}

.history-status {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.history-status.mastered {
    background: rgba(76, 236, 196, 0.2);
    color: #4ecdc4;
    border: 1px solid rgba(76, 236, 196, 0.3);
}

.history-status.learning {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* 词汇贡献词性和理由样式 */
.history-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.word-type {
    color: #00bcd4;
    font-size: 0.85rem;
    font-style: italic;
}

.request-reason {
    color: #a5d6a7;
    font-size: 0.85rem;
    margin-top: 5px;
    padding: 8px;
    background: rgba(165, 214, 167, 0.1);
    border-radius: 5px;
    border-left: 2px solid #a5d6a7;
    width: 100%;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .profile-info {
        text-align: center;
    }
    
    .detail-item {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .goal-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .profile-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-btn {
        width: 80%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .favorites-grid {
        grid-template-columns: 1fr;
    }
}