/* =================================================================
   👑 SocialFontbox.com - 頂級美式科技感 & 行動端防爆完全體 style.css
   ================================================================= */

/* 核心基礎樣式 */
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    max-width: 750px; 
    margin: 20px auto; 
    padding: 20px; 
    background-color: #fafafa; 
    color: #333; 
    line-height: 1.6; 
}

/* 👑 通用導航列：修正手機端橫向推擠死結 */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    margin-bottom: 20px;
    box-sizing: border-box; /* 確保內邊距不撐破外殼 */
}

.nav-logo {
    font-size: 18px;
    font-weight: bold;
    color: #111;
    text-decoration: none;
    flex-shrink: 0; /* 鎖定 Logo 大小，絕不被右側擠壓 */
    margin-right: 15px;
}

/* 👑 導航連結貨櫃：加入自動折行與完美的間距（完美根治 Icon 重疊奇怪的問題） */
.nav-links {
    display: flex;
    flex-wrap: wrap;       /* 🚀 核心：手機螢幕不夠寬時，Icon 自動優雅換行，絕不強行擠壓 */
    gap: 12px 16px;        /* 🚀 核心：上下間距 12px、左右間距 16px，全裝置 100% 絕不重疊 */
    justify-content: flex-end;
    align-items: center;
    max-width: 75%;        /* 防止一整排圖示撞到左邊 Logo */
}

/* 👑 導航按鈕項目：升級為彈性盒子，物理性鎖定 SVG 不准縮小擠扁 */
.nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s, border-color 0.2s;
    flex-shrink: 0;        /* 🚀 核心：強制瀏覽器絕對不准把我們的社群圖示縮小壓扁 */
    min-width: 24px;       /* 手指點擊的安全熱區 */
    min-height: 24px;
}

.nav-links a:hover { 
    color: #4a90e2; 
}

/* 👑 修正 Active 底線在純圖示 Icon 下的精美置中比例 */
.nav-links a.active {
    color: #4a90e2;
    font-weight: bold;
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 2px;
}

/* 核心版面貨櫃 */
.container { 
    background: white; 
    padding: 30px; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    margin-bottom: 25px; 
    box-sizing: border-box;
}

h1 { font-size: 32px; font-weight: 800; color: #111; margin-top: 0; margin-bottom: 5px; }
.subtitle { color: #666; font-size: 16px; margin-bottom: 25px; }

textarea { 
    width: 100%; 
    height: 100px; 
    margin: 10px 0; 
    padding: 14px; 
    font-size: 16px; 
    border: 2px solid #e0e0e0; 
    border-radius: 8px; 
    box-sizing: border-box; 
    resize: vertical; 
    transition: border-color 0.2s; 
}
textarea:focus { border-color: #4a90e2; outline: none; }

.placeholder-text {
    text-align: center;
    color: #999;
    margin-top: 20px;
    font-size: 15px;
}

/* 字體生成列通用容器 */
.font-row { 
    background: #f8f9fa; 
    border: 1px solid #ededed; 
    border-radius: 8px; 
    margin: 12px 0; 
    padding: 15px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    cursor: pointer; 
    transition: all 0.2s; 
    box-sizing: border-box;
}
.font-row:hover { background: #f1f3f5; border-color: #ced4da; }

.font-label { 
    font-size: 11px; 
    font-weight: bold; 
    color: #4a90e2; 
    text-transform: uppercase; 
    margin-bottom: 5px; 
    display: block; 
    letter-spacing: 0.5px; 
}

/* 👑 字體輸出區域：結合白框與最大寬度限制，100% 鎖定複製按鈕 */
.font-output { 
    font-size: 18px; 
    color: #222; 
    word-break: break-all;      /* 🚀 核心：強迫萬國碼特殊字元在螢幕邊緣乖乖自動折行 */
    white-space: pre-wrap;     /* 🚀 核心：保留空格的同時，允許手機端自動換行 */
    flex-grow: 1; 
    padding-right: 15px; 
    max-width: calc(100% - 75px); /* 🚀 核心：限制文字最大寬度，防止把 Copy 按鈕擠出螢幕 */
}

.copy-btn { 
    background: #4a90e2; 
    color: white; 
    border: none; 
    padding: 8px 14px; 
    font-size: 14px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: bold; 
    flex-shrink: 0;             /* 鎖定複製按鈕，絕對不被文字擠壓變形 */
}
.copy-btn:hover { background: #357abd; }

/* 提示通知與廣告 */
.toast { 
    position: fixed; 
    bottom: 20px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: #2b2b2b; 
    color: white; 
    padding: 10px 20px; 
    border-radius: 20px; 
    font-size: 14px; 
    display: none; 
    z-index: 1000; 
}
.ad-slot { background: #eee; border: 1px dashed #bbb; padding: 20px; text-align: center; color: #777; font-size: 13px; font-weight: bold; margin: 20px 0; border-radius: 8px; box-sizing: border-box; }

/* 深度 SEO 內容區域 */
.seo-content { background: white; padding: 35px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); box-sizing: border-box; }
.seo-content h2 { font-size: 22px; color: #111; margin-top: 30px; border-bottom: 2px solid #f0f0f0; padding-bottom: 8px; }
.seo-content h2:first-of-type { margin-top: 0; }
.seo-content p { color: #444; font-size: 15px; }
.seo-content ol, .seo-content ul { padding-left: 20px; color: #444; font-size: 15px; }
.seo-content li { margin-bottom: 8px; }

footer { text-align: center; margin-top: 40px; font-size: 13px; color: #999; }
footer a { color: #4a90e2; text-decoration: none; }
