/* 前台介面樣式 */

/* 浮動球基礎樣式 */
#achang-readability-floatball {
    position: fixed;
    bottom: 20px;
    left: 20px;
    /* width 和 height 將由 JavaScript 動態設定 */
    /* width: 50px; */
    /* height: 50px; */
    background-color: #0073aa;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: move; /* 拖曳游標 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    /* font-size 將由 JavaScript 動態設定 */
    /* font-size: 24px; */
    user-select: none; /* 防止文字被選取 */
    transition: opacity 0.3s ease;
}

/* 浮動球懸停效果 */
#achang-readability-floatball:hover {
    opacity: 0.8;
}

/* 控制面板樣式 */
#achang-readability-control-panel {
    position: fixed;
    bottom: 80px; /* 位於浮動球上方 */
    left: 20px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px; /* 稍微圓潤一點 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); /* 更柔和的陰影 */
    z-index: 9998;
    padding: 20px;
    display: none; /* 預設隱藏 */
    flex-direction: column;
    gap: 15px; /* 增加間距 */
    width: 280px; /* 稍微寬一點 */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* 使用更現代的字體 */
    /* 添加動畫相關樣式 */
    transform-origin: bottom left; /* 設定變形原點 */
    transition: transform 0.3s ease, opacity 0.3s ease; /* 添加過渡效果 */
}

/* 控制面板展開動畫 */
#achang-readability-control-panel.achang-readability-panel-open {
    display: flex;
    transform: scale(1);
    opacity: 1;
}

/* 控制面板收合動畫 */
#achang-readability-control-panel.achang-readability-panel-closed {
    transform: scale(0);
    opacity: 0;
}

/* 控制面板標題 */
#achang-readability-control-panel h3 {
    margin: 0 0 10px 0;
    color: #2c3e50; /* 更深的標題顏色 */
    text-align: center;
    font-weight: 600; /* 稍微粗一點 */
    font-size: 18px;
}

/* 分區標題 */
.achang-readability-section-title {
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.achang-readability-section-title::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #0073aa;
    margin-right: 8px;
}

/* 按鈕樣式 */
.achang-readability-btn {
    padding: 10px 15px; /* 增大按鈕 */
    border: none;
    border-radius: 5px; /* 更圓潤 */
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease; /* 更流暢的過渡 */
    font-weight: 500;
}

/* 字體大小調整區域 */
#achang-readability-font-size-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 字體大小按鈕容器 */
#achang-readability-font-size-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

/* 字體大小調整按鈕 */
#achang-readability-font-size-increase, #achang-readability-font-size-decrease {
    flex: 1;
    background-color: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
}

#achang-readability-font-size-increase:hover, #achang-readability-font-size-decrease:hover {
    background-color: #d5dbdb;
    border-color: #95a5a6;
}

/* 顏色調整區域 */
#achang-readability-color-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 顏色選擇器容器 */
#achang-readability-color-picker-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#achang-readability-color-picker-label {
    font-weight: 500;
    color: #34495e;
    white-space: nowrap;
}

#achang-readability-color-picker {
    flex: 1;
    height: 40px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    cursor: pointer;
    background-color: #fff;
}

/* 顏色選擇器標籤 */
#achang-readability-link-color-picker-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#achang-readability-link-color-picker-label {
    font-weight: 500;
    color: #34495e;
    white-space: nowrap;
}

#achang-readability-link-color-picker {
    flex: 1;
    height: 40px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    cursor: pointer;
    background-color: #fff;
}


/* 預設顏色選項標題 */
#achang-readability-default-colors-title {
    font-weight: 500;
    color: #34495e;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* 預設顏色選項容器 */
#achang-readability-default-colors {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

/* 預設顏色選項按鈕 */
.achang-readability-default-color {
    width: 35px;
    height: 35px;
    border: 2px solid transparent; /* 預設無邊框 */
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.achang-readability-default-color:hover {
    transform: scale(1.1);
}

.achang-readability-default-color.active {
    border-color: #2c3e50; /* 選中時的邊框 */
    transform: scale(1.1);
}

/* 恢復預設按鈕 */
#achang-readability-reset-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    align-self: center; /* 居中對齊 */
    width: 80%;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
}

#achang-readability-reset-btn:hover {
    background-color: #c0392b;
}