/* --- themes.css --- */

/* === 全域基礎設定 === */
body { 
    font-family: "Microsoft JhengHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0; 
    padding: 0; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    min-height: 100vh; 
    overflow-x: hidden; 
}

/* =======================================================
   [預設版型 (Default)]
   ======================================================= */
.container {
    width: 100%; 
    max-width: 800px; 
    padding: 40px 40px; 
    text-align: center; 
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin-top: 20px; 
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

/* 頭像包裹器 */
.avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.avatar { 
    width: 150px; 
    height: 150px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 4px solid #fff; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    transition: transform 0.3s ease; 
}
.avatar-link { display: inline-block; cursor: zoom-in; } 
.avatar-link:hover .avatar { transform: scale(1.05); box-shadow: 0 8px 15px rgba(0,0,0,0.2); }

/* 對話氣泡 */
.status-bubble {
    position: absolute;
    z-index: 10;
    background: #fff;
    color: #333;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #eee;
    animation: popIn 0.5s ease-out;
    line-height: 1.4;
    top: 20px;
    left: 100%;
    margin-left: 15px;
    white-space: nowrap; 
    border-bottom-left-radius: 0;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* 手機版氣泡調整 */
@media (max-width: 600px) {
    .avatar-wrapper { margin-bottom: 50px; }
    .status-bubble {
        top: auto; bottom: -35px; left: 50%; margin-left: 0;   
        transform: translateX(-50%); 
        white-space: normal; width: max-content; max-width: 260px; text-align: center;
        border-bottom-left-radius: 16px; border-top-left-radius: 4px;     
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    }
    @keyframes popIn {
        from { opacity: 0; transform: translateX(-50%) scale(0.5); }
        to { opacity: 1; transform: translateX(-50%) scale(1); }
    }
}

h1 { font-size: 22px; margin: 0 0 10px 0; font-weight: 700; }

/* 簡介與按鈕 */
.bio { font-size: 15px; color: #666; margin-bottom: 30px; line-height: 1.6; word-wrap: break-word; } 
.bio img { max-width: 100%; height: auto; } 
.bio p { margin: 0 0 10px 0; } 
.bio a { color: #007bff; text-decoration: underline; }

/* 簡介折疊樣式 */
.bio-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: max-height 0.3s ease;
}

.read-more-btn {
    display: inline-block;
    margin-top: 10px;
    margin-bottom: 25px;
    padding: 6px 20px;
    font-size: 13px;
    font-weight: bold;
    color: #555;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.read-more-btn:hover {
    color: #333; background: #fff; border-color: #ccc;
    transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* 標籤 (Tags) 預設樣式 */
.profile-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}
.profile-tag {
    background: rgba(0,0,0,0.05);
    color: #555;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    text-decoration: none;
    transition: 0.2s;
    border: 1px solid rgba(0,0,0,0.1);
}
.profile-tag:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
}

.full-width-btn { 
    display: flex; align-items: center; justify-content: flex-start; width: 100%; 
    background: #fff; color: #333; text-decoration: none; padding: 12px 16px; margin-bottom: 12px; 
    border-radius: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: 0.2s; font-weight: 600; 
    box-sizing: border-box; position: relative; border: 1px solid transparent; cursor: pointer; text-align: left; min-height: 70px; 
}
.full-width-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-color: #ddd; }
.no-link { cursor: default; } 
.no-link:hover { transform: none; box-shadow: 0 2px 5px rgba(0,0,0,0.05); border-color: transparent; }

.icon-wrapper { width: 50px; text-align: center; margin-right: 15px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.custom-icon { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; } 
.default-emoji { font-size: 28px; line-height: 50px; }
.custom-text-content { font-size: 14px; line-height: 1.5; color: #444; word-break: break-all; }
.footer { margin-top: auto; padding: 20px 0; color: #888; font-size: 12px; text-align: center; box-sizing: border-box; }

/* =======================================================
   [vCard Button & Animations] 加入通訊錄按鈕與動畫
   ======================================================= */

/* 發光動畫：綠色 */
@keyframes glowing-green {
    0% { box-shadow: 0 0 5px rgba(40, 167, 69, 0.5); }
    50% { box-shadow: 0 0 20px rgba(40, 167, 69, 0.8), 0 0 10px rgba(40, 167, 69, 0.6); }
    100% { box-shadow: 0 0 5px rgba(40, 167, 69, 0.5); }
}

/* 發光動畫：金色 */
@keyframes glowing-gold {
    0% { box-shadow: 0 0 5px rgba(212, 175, 55, 0.5); }
    50% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 0 0 10px rgba(212, 175, 55, 0.6); }
    100% { box-shadow: 0 0 5px rgba(212, 175, 55, 0.5); }
}

/* 發光動畫：藍色 */
@keyframes glowing-cyan {
    0% { box-shadow: 0 0 5px rgba(0, 243, 255, 0.5); }
    50% { box-shadow: 0 0 20px rgba(0, 243, 255, 0.8), 0 0 10px rgba(0, 243, 255, 0.6); }
    100% { box-shadow: 0 0 5px rgba(0, 243, 255, 0.5); }
}

.btn-vcard {
    display: inline-block;
    background: #28a745; /* 預設綠色 */
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.2s;
    border: 2px solid transparent;
    animation: glowing-green 2s infinite; 
}

.btn-vcard:hover {
    background: #218838;
    transform: translateY(-2px);
    color: white;
}

/* vCard 按鈕顯示控制：預設隱藏 (電腦與平板) */
.vcard-wrapper {
    display: none;
}

/* vCard 按鈕顯示控制：僅在手機版顯示 (螢幕寬度 < 768px) */
@media (max-width: 767px) {
    .vcard-wrapper {
        display: block;
        margin-top: 20px; 
        margin-bottom: 20px;
    }
}

/* =======================================================
   🎨 [Theme: Cute] 粉彩可愛版型
   ======================================================= */
.theme-cute .container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    border: 4px solid #ffb7b2;
    box-shadow: 8px 8px 0px rgba(255, 183, 178, 0.5);
    backdrop-filter: none;
    max-width: 800px;
}
.theme-cute .avatar { border: 4px dashed #ff9aa2; box-shadow: none; }
.theme-cute h1 { font-family: "Microsoft JhengHei", 'Comic Sans MS', sans-serif; color: #ff6f69 !important; letter-spacing: 1px; }
.theme-cute .full-width-btn {
    border-radius: 50px; border: 2px solid #ffdac1; box-shadow: 4px 4px 0px #ffdac1;
    transition: all 0.1s; margin-bottom: 15px; background: #fff;
}
.theme-cute .full-width-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0px #ffdac1; background-color: #fff0f5; }
.theme-cute .full-width-btn:active { transform: translate(4px, 4px); box-shadow: none; }
.theme-cute .custom-icon { border: 2px solid #e2f0cb; padding: 2px; background: #fff; }
.theme-cute .status-bubble { border: 2px solid #ffdac1; background: #fff0f5; color: #ff6f69; }
.theme-cute .read-more-btn { background: #fff0f5; border: 2px solid #ffdac1; color: #ff6f69; box-shadow: 2px 2px 0px #ffdac1; }
.theme-cute .read-more-btn:hover { box-shadow: 1px 1px 0px #ffdac1; transform: translate(1px, 1px); }
.theme-cute .profile-tag { background: #fff0f5; color: #ff6f69; border: 1px solid #ffb7b2; border-radius: 20px; }
.theme-cute .profile-tag:hover { background: #ffb7b2; color: white; transform: translateY(-2px); box-shadow: 2px 2px 0 rgba(255, 183, 178, 0.5); }

/* =======================================================
   💼 [Theme: Pro] 商務專業版型
   ======================================================= */
.theme-pro .container {
    background: #ffffff;
    border-radius: 4px;
    border-top: 6px solid #2c3e50;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    backdrop-filter: none;
    max-width: 800px;
}
.theme-pro .avatar { border-radius: 12px; border: 1px solid #ddd; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.theme-pro h1 { font-family: "Microsoft JhengHei", serif; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.theme-pro .bio { font-style: italic; padding-bottom: 20px; }
.theme-pro .full-width-btn {
    border-radius: 2px; border: 1px solid #e0e0e0; border-left: 5px solid #2c3e50;
    background: linear-gradient(to right, #f9f9f9, #fff); box-shadow: none; margin-bottom: 10px;
}
.theme-pro .full-width-btn:hover { transform: translateX(5px); background: #2c3e50; color: #fff !important; border-color: #2c3e50; }
.theme-pro .full-width-btn:hover .custom-text-content, .theme-pro .full-width-btn:hover .default-emoji { color: #fff; }
.theme-pro .custom-icon { border-radius: 4px; }
.theme-pro .status-bubble { border-radius: 4px; border: 1px solid #2c3e50; background: #f9f9f9; }
.theme-pro .read-more-btn { border-radius: 4px; border: 1px solid #2c3e50; color: #2c3e50; background: #fff; }
.theme-pro .read-more-btn:hover { background: #2c3e50; color: #fff; }
.theme-pro .profile-tag { border-radius: 2px; background: #f4f6f8; border: 1px solid #ccc; color: #444; }
.theme-pro .profile-tag:hover { background: #2c3e50; color: #fff; border-color: #2c3e50; }

/* =======================================================
   🏆 [Theme: Luxury] 復古奢華風 (黑金)
   ======================================================= */
.theme-luxury body {
    background-color: #0F0F0F !important;
    background-image: linear-gradient(45deg, #1a1a1a 25%, transparent 25%, transparent 75%, #1a1a1a 75%, #1a1a1a), 
                      linear-gradient(45deg, #1a1a1a 25%, transparent 25%, transparent 75%, #1a1a1a 75%, #1a1a1a) !important;
    background-size: 20px 20px !important;
    background-position: 0 0, 10px 10px !important;
}
.theme-luxury .container {
    background: #111;
    border: 1px solid #D4AF37;
    border-radius: 0;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    max-width: 800px;
}
.theme-luxury .avatar {
    border: 3px double #D4AF37;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}
.theme-luxury h1 {
    color: #D4AF37 !important;
    font-family: "Microsoft JhengHei", serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.theme-luxury .bio { color: #aaa; font-style: italic; }
.theme-luxury .full-width-btn {
    background: transparent; border: 1px solid #333; border-bottom: 1px solid #D4AF37;
    color: #eee !important; border-radius: 0; margin-bottom: 15px; transition: 0.4s;
}
.theme-luxury .full-width-btn:hover {
    background: #D4AF37; color: #000 !important; box-shadow: 0 0 10px #D4AF37; transform: translateY(-2px);
}
.theme-luxury .full-width-btn:hover .custom-text-content { color: #000; font-weight: bold; }
.theme-luxury .custom-text-content { color: #D4AF37; font-family: "Microsoft JhengHei", serif; letter-spacing: 1px; }
.theme-luxury .status-bubble { background: #000; color: #D4AF37; border: 1px solid #D4AF37; }
.theme-luxury .read-more-btn { background: #000; border: 1px solid #D4AF37; color: #D4AF37; border-radius: 0; }
.theme-luxury .read-more-btn:hover { background: #D4AF37; color: #000; }
.theme-luxury .profile-tag { background: #222; color: #D4AF37; border: 1px solid #555; }
.theme-luxury .profile-tag:hover { background: #D4AF37; color: #000; border-color: #D4AF37; box-shadow: 0 0 10px #D4AF37; }
.theme-luxury .btn-vcard {
    background: #D4AF37;
    color: #000;
    animation: glowing-gold 2s infinite;
}
.theme-luxury .btn-vcard:hover { background: #fff; color: #000; }

/* =======================================================
   🤖 [Theme: Tech] 大膽科技風 (Cyberpunk/Neon)
   ======================================================= */
.theme-tech body {
    background-color: #050510 !important;
}
.theme-tech .container {
    background: rgba(10, 10, 20, 0.9);
    border: 1px solid #00f3ff;
    box-shadow: 0 0 15px #00f3ff, inset 0 0 20px rgba(0, 243, 255, 0.1);
    border-radius: 0;
    clip-path: polygon(10% 0, 100% 0, 100% 95%, 90% 100%, 0 100%, 0 5%);
    padding-top: 50px;
    max-width: 800px;
}
.theme-tech .avatar {
    border: 2px solid #00f3ff;
    border-radius: 0;
    box-shadow: 5px 5px 0px #ff00ff;
}
.theme-tech h1 {
    color: #fff !important;
    text-shadow: 2px 2px 0px #ff00ff;
    font-family: "Microsoft JhengHei", monospace;
    text-transform: uppercase;
}
.theme-tech .bio { color: #00f3ff; font-family: "Microsoft JhengHei", monospace; font-size: 13px; }
.theme-tech .full-width-btn {
    background: #000; border: 1px solid #333; border-left: 5px solid #ff00ff;
    border-radius: 0; color: #fff !important; margin-bottom: 12px; transform: skewX(-10deg);
}
.theme-tech .full-width-btn:hover {
    background: #ff00ff; border-left: 5px solid #00f3ff; box-shadow: 0 0 10px #ff00ff;
    transform: skewX(-10deg) translateX(5px);
}
.theme-tech .full-width-btn .icon-wrapper, 
.theme-tech .full-width-btn .custom-text-content { transform: skewX(10deg); }
.theme-tech .custom-text-content { color: #fff; font-family: "Microsoft JhengHei", monospace; font-weight: bold; }
.theme-tech .status-bubble { background: #000; color: #00f3ff; border: 1px solid #ff00ff; box-shadow: 0 0 5px #00f3ff; border-radius: 0;}
.theme-tech .read-more-btn { background: #000; border: 1px solid #00f3ff; color: #00f3ff; border-radius: 0; box-shadow: 0 0 5px #00f3ff; font-family: monospace; }
.theme-tech .read-more-btn:hover { background: #00f3ff; color: #000; }
.theme-tech .profile-tag { background: #000; color: #00f3ff; border: 1px solid #00f3ff; border-radius: 0; font-family: monospace; }
.theme-tech .profile-tag:hover { background: #00f3ff; color: #000; box-shadow: 0 0 10px #00f3ff; }
.theme-tech .btn-vcard {
    background: transparent;
    border: 1px solid #00f3ff;
    color: #00f3ff;
    border-radius: 0;
    animation: glowing-cyan 2s infinite;
}
.theme-tech .btn-vcard:hover { background: #00f3ff; color: #000; }

/* =======================================================
   ✏️ [Theme: Sketch] 手繪童趣風
   ======================================================= */
.theme-sketch body {
    background-color: #fdfcf0 !important;
    background-image: radial-gradient(#ccc 1px, transparent 1px);
    background-size: 20px 20px;
}
.theme-sketch .container {
    background: #fff;
    border: 2px solid #333;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; /* 不規則邊框 */
    box-shadow: 10px 10px 0px rgba(0,0,0,0.1);
    max-width: 800px;
}
.theme-sketch .avatar {
    border: 3px solid #333;
    border-radius: 50% 40% 60% 40%;
    animation: wobble 5s ease-in-out infinite;
}
@keyframes wobble { 0%,100% { border-radius: 50% 40% 60% 40%; } 50% { border-radius: 40% 60% 50% 50%; } }

.theme-sketch h1 { font-family: "Microsoft JhengHei", cursive; color: #333 !important; transform: rotate(-2deg); }
.theme-sketch .bio { font-family: "Microsoft JhengHei", cursive; color: #555; }

.theme-sketch .full-width-btn {
    background: #fff; border: 2px solid #333;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    box-shadow: 3px 3px 0px #333; transition: transform 0.2s; margin-bottom: 15px;
}
.theme-sketch .full-width-btn:nth-child(even) { transform: rotate(1deg); }
.theme-sketch .full-width-btn:nth-child(odd) { transform: rotate(-1deg); }

.theme-sketch .full-width-btn:hover {
    transform: scale(1.02) rotate(0deg); background: #ffeb3b; box-shadow: 5px 5px 0px #333;
}
.theme-sketch .custom-text-content { font-family: "Microsoft JhengHei", cursive; font-weight: bold; color: #333; }
.theme-sketch .status-bubble { 
    border: 2px solid #333; 
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    background: #fff; box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}
.theme-sketch .read-more-btn { background: #fff; border: 2px solid #333; border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; box-shadow: 2px 2px 0px #333; color: #333; }
.theme-sketch .read-more-btn:hover { background: #ffeb3b; transform: scale(1.05); }
.theme-sketch .profile-tag { background: #fff; border: 2px solid #333; color: #333; font-family: cursive; border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; }
.theme-sketch .profile-tag:hover { background: #ffeb3b; transform: rotate(-2deg); box-shadow: 2px 2px 0 rgba(0,0,0,0.1); }