/**
 * ToolHub - 工具頁面專用樣式
 */

/* 工具操作區 */
.tool-action-area {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

/* 按鈕群組 */
.tool-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tool-btn-group .btn {
    border-radius: 8px;
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 輸出區域 */
.output-area {
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: var(--radius);
    padding: 1.2rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    min-height: 120px;
    position: relative;
    overflow-x: auto;
}

.output-area .copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.output-area .copy-btn:hover {
    background: rgba(255,255,255,0.25);
}

/* 顏色預覽 */
.color-preview {
    width: 100%;
    height: 100px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin: 1rem 0;
}

/* 選項面板 */
.options-panel {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1.2rem;
    margin: 1rem 0;
}

.options-panel label {
    font-weight: 500;
    margin-bottom: 0.3rem;
}

/* Regex 結果 */
.regex-match {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    padding: 2px 4px;
}

.regex-match-group {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid #2ecc71;
    border-radius: 5px;
    padding: 2px 4px;
}

/* Diff 比對 */
.diff-added {
    background: #e6ffe6;
    color: #006400;
    padding: 2px 5px;
    border-radius: 3px;
}

.diff-removed {
    background: #ffe6e6;
    color: #8b0000;
    padding: 2px 5px;
    border-radius: 3px;
    text-decoration: line-through;
}

/* 統計表 */
.stats-table {
    font-size: 0.9rem;
}

.stats-table td {
    padding: 0.6rem 1rem;
}

/* QR Code 顯示 */
.qr-result {
    text-align: center;
    padding: 2rem;
}

.qr-result img {
    border: 5px solid #fff;
    box-shadow: var(--shadow);
    border-radius: 10px;
}

/* 時間戳雙向 */
.time-display {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    padding: 1rem;
}

/* 表單樣式優化 */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.15);
}

/* 標籤切換 */
.nav-tabs .nav-link {
    border-radius: 8px 8px 0 0;
    color: var(--text-muted);
    border: none;
    padding: 0.7rem 1.5rem;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    background: #fff;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 1.5rem;
    background: #fff;
}

/* JSON 高亮 */
.json-key { color: #9cdcfe; }
.json-string { color: #ce9178; }
.json-number { color: #b5cea8; }
.json-boolean { color: #569cd6; }
.json-null { color: #569cd6; }

/* 進度條 */
.progress {
    height: 8px;
    border-radius: 4px;
}

.progress-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}
