/*-----------*/
/*-自定義變數-*/
/*-----------*/
:root {
    --title: #e6e8eb;
    --bg-site: #0f1115;
    --bg-main: #141721;
    --btn-bg: #11192b;
    --text-primary: #9ca3af;
    --text-secondary: #7c8794;
    --border-primary: #252a38;
    --border-secondary: #28303f;
}

/*--------*/
/*-系統區-*/
/*--------*/
* {
    box-sizing: border-box;
}

h1 {
    color: var(--title);
    font-size: 2rem;
}

h2 {
    color: var(--title);
    font-size: 1.5rem;
}

h3 {
    color: var(--title);
    font-size: 1.25rem;
}

h4 {
    color: var(--title);
    font-size: 1rem;
}

h5 {
    color: var(--title);
    font-size: 0.9rem;
}

h6 {
    color: var(--title);
    font-size: 0.8rem;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/*--------*/
/* button */
/*--------*/
.btn {
    font-size: 0.9rem;
    /* 文字顏色 */
    color: var(--text-primary);
    background: var(--btn-bg);
    /* 設定元件的「內距」，上下&左右 */
    padding: 6px 10px;
    /* 讓邊角變圓 */
    border-radius: 16px;
    /* 設定邊框樣式：1px → 邊框寬度,solid → 實線,#2a3140 → 邊框顏色 */
    border: 1px solid var(--border-primary);
    /* 讓元素變成： inline-level 行內元素（不會獨佔一整行）同時擁有 flex 排版功能(下面兩個才會作用) */
    display: inline-flex;
    /* 子元素在「垂直方向」置中*/
    align-items: center;
    /* 子元素在「水平方向」置中*/
    justify-content: center;
    /* 不允許文字換行 */
    white-space: nowrap;
    /* 移過去數標會變點擊手 */
    cursor: pointer;
}

.btn:hover {
    border-color: var(--border-secondary);
    opacity: 0.9;
    text-decoration: underline;
}

/*------*/
/* tabs */
/*------*/
.tabs,
.lang-tabs {
    margin-top: 8px;
    margin-bottom: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    background: #020617;
    border: 1px solid #1f2937;
    padding: 2px;
}

.tab,
.lang-tab {
    margin: 1px;
    height: 28px;
    min-width: 64px;
    padding: 0px 8px;
    font-size: 0.9rem;
    line-height: 1;
    text-align: center;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #020617;
    border: #020617;
    color: #9ca3af;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.tab:hover,
.lang-tab:hover {
    background: #0b1120;
    color: #e5e7eb;
}

.tab.active,
.lang-tab.active {
    background: #2563eb;
    color: #f9fafb;
}

/*--------*/
/*-header-*/
/*--------*/
html,
body {
    height: 100%;
    font-family: ui-sans-serif, system-ui, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    /*
        ui-sans-serif：系統 UI 預設無襯線字型
        system-ui：舊標準系統預設字型，泛用
        "Segoe UI"： Windows 介面字型
        "Noto Sans TC"： Google 提供的繁體中文字型
        "Microsoft JhengHei"： 微軟預設繁中字型
        sans-serif：瀏覽器的預設無襯線字體
    */
    background: var(--bg-site);
    color: var(--text-primary);
}

html {
    font-size: 16px;
}

/* 避免載入時閃一下 */
html.app-init body {
    visibility: hidden;
    /* 位置保留、不顯示文字 */
}

body {
    line-height: 1.5;
    font-size: 1rem;
}

header {
    min-height: 80px;
    margin-bottom: 16px;

    /* 布局方式 */
    display: flex;
    /* 左右貼邊 */
    justify-content: space-between;
    /* 垂直置中 */
    align-items: center;
}

#header-titlebox {
    padding: 4px;
}

#header-title {
    color: var(--title);
    font-size: 2rem;
    font-weight: bold;
}

#header-nav {
    padding: 4px;
    gap: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 主框架 */
.container {
    max-width: 80%;
    margin: 0 auto;
    padding: 24px;
}

/*主頁面*/
.main-page {
    background: var(--bg-main);
    border-radius: 16px;
    border: 1px solid var(--border-primary);
    padding: 16px;
}

/*---------*/
/* 設定按鈕 */
/*---------*/
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #202124;
    border: 1px solid #5f6368;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
    text-decoration: none;
}

.icon-btn:hover {
    background: #292a2d;
    border-color: #80868b;
    text-decoration: none;
}

.icon-btn .material-symbols-outlined {
    font-size: 22px;
    color: #cfcfcf;
}

/*---------------*/
/* google登入登出 */
/*---------------*/
.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    padding: 9px 16px;
    cursor: pointer;
    border-width: 1px;
    border-style: solid;
    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.google-btn img {
    width: 18px;
    height: 18px;
}

/* 淺色版（如果之後想用） */
.google-btn--light {
    background: #ffffff;
    color: #444444;
    border-color: #dadce0;
}

.google-btn--light:hover {
    border-color: #c6c6c6;
    box-shadow:
        0 1px 3px rgba(60, 64, 67, 0.3),
        0 4px 8px rgba(60, 64, 67, 0.15);
}

/* 深色版（適合暗色主題） */
.google-btn--dark {
    background: #202124;
    /* Google 自家深灰 */
    color: #e8eaed;
    border-color: #5f6368;
}

.google-btn--dark:hover {
    background: #292a2d;
    border-color: #80868b;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.4);
}

#auth-btn .auth-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    display: none;
}

/*----------*/
/*- footer -*/
/*----------*/
footer {
    margin-top: 32px;
    padding: 16px 0 0;
    border-top: 1px solid var(--border-secondary);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

footer div {
    padding-bottom: 6px;
}

footer a {
    margin-right: 8px;
}

/*----------*/
/*-settings-*/
/*----------*/

.setting-section {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px; /* 每一行設定之間的距離 */
  border-top: 1px solid var(--border-primary); /* 底線 */
}

.setting-row {
  display: grid;
  grid-template-columns: 160px 1fr; /* 左邊固定寬度，右邊自動撐開 */
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-primary); /* 底線 */
}

.setting-label {
  font-size: 1rem;
  font-weight: 600;
  color: #e8e8e8;
  padding-left: 8px;
  padding-right: 8px;
  margin-right: 12px;
  border-right: 1px solid var(--border-primary); /* 底線 */
}

.setting-content {
  display: flex;
  align-items: center;
}

