/* 公開個人檔案頁面樣式 - 優化配色 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.public-profile-page {
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.6;
    color: var(--text-standard);
    /* 調整為與主題一致的漸層背景 */
    background: var(--bg-dark);
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
}

/* 為背景添加視覺效果 */
body.public-profile-page::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-gradient);
    opacity: 0.85;
    z-index: -1;
}

.profile-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 20px;
}

/* 個人頭像與基本資訊 */
.profile-header {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow); 
    border: 1px solid rgba(121, 131, 212, 0.2);
    transition: all 0.3s ease;
}

.profile-header:hover {
    border-color: var(--primary-light);
    box-shadow: var(--glow-primary);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1.5rem;
    border: 3px solid var(--primary-light);
    box-shadow: var(--glow-primary);
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    font-size: 2.2rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--text-light), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-info .profile-title {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 0;
}

/* 內容區塊 */
.profile-content {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(121, 131, 212, 0.2);
    transition: all 0.3s ease;
}

.profile-content:hover {
    box-shadow: var(--glow-primary);
    border-color: var(--primary-light);
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-section:last-child {
    margin-bottom: 0;
}

.profile-section h2 {
    font-size: 1.5rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    text-shadow: 0 0 10px rgba(121, 131, 212, 0.3);
}

.profile-section h2 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.profile-section .profile-bio {
    font-size: 1rem;
    color: var(--text-standard);
    margin-bottom: 0;
    white-space: pre-line;
    line-height: 1.8;
}

/* 興趣標籤 */
.profile-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    list-style: none;
}

.profile-interests li {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--text-light);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    border: none;
    transition: all 0.3s ease;
}

.profile-interests li:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
}

/* 社群媒體連結 */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.social-card {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--bg-elevated);
    border-radius: var(--border-radius-sm);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    text-decoration: none !important;
    color: var(--text-standard);
    min-height: 80px;
    width: 100%;
    border: 1px solid rgba(121, 131, 212, 0.15);
    box-shadow: var(--shadow-sm);
}

.social-card:hover, .social-card.copyable:hover {
    transform: translateY(-3px);
    box-shadow: var(--glow-primary);
    border-color: var(--primary-light);
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    font-size: 1.3rem;
    flex-shrink: 0;
    color: white;
    box-shadow: var(--shadow-sm);
}

.social-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.social-info h4 {
    font-size: 0.95rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: var(--primary-light);
}

.social-info small {
    color: var(--text-muted);
    font-size: 0.8rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 複製按鈕成功消息樣式 */
.social-info small.copied-success {
    background: linear-gradient(to right, var(--secondary-color), var(--primary-light));
    color: var(--text-light);
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s ease;
}

/* 底部區域 */
.profile-actions {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 1rem;
}

.action-btn {
    background: var(--bg-elevated);
    color: var(--text-standard);
    border: 1px solid rgba(121, 131, 212, 0.15);
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius-sm);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.action-btn i {
    margin-right: 0.5rem;
    color: var(--primary-light);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
    border-color: var(--primary-light);
}

.edit-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-light);
    border: none;
}

.edit-btn i {
    color: var(--text-light);
}

.edit-btn:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: var(--text-light);
    box-shadow: var(--glow-primary);
}

/* 頁尾 */
.profile-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 2rem;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar {
        margin: 0 0 1.5rem 0;
        width: 110px;
        height: 110px;
    }

    .social-grid {
        grid-template-columns: 1fr;
    }
}