/* ===== 我爱吉他网 · 吉他工具箱 ===== */
.gt-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem 0 3rem;
    color: #2b2f33;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

/* 移动端父模板没有 Bootstrap 的全局盒模型重置，这里限定在工具页内统一 */
.gt-page,
.gt-page *,
.gt-page *::before,
.gt-page *::after {
    box-sizing: border-box;
}

.gt-breadcrumb {
    font-size: 0.82rem;
    color: #9aa3ab;
    margin-bottom: 0.6rem;
}
.gt-breadcrumb a { color: #9aa3ab; text-decoration: none; }
.gt-breadcrumb a:hover { color: #dc3545; }

.gt-hero { padding: 0.4rem 0 1.1rem; }
.gt-hero h1 {
    font-size: 1.9rem;
    line-height: 1.3;
    font-weight: 700;
    color: #23282d;
    margin: 0 0 0.5rem;
}
.gt-hero .gt-lead {
    font-size: 0.95rem;
    line-height: 1.75;
    color: #66707a;
    margin: 0;
}

.gt-card {
    background: #fff;
    border: 1px solid #eceff1;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(20, 30, 40, 0.06);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.gt-section {
    background: #fff;
    border: 1px solid #eceff1;
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.9;
}
.gt-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #23282d;
    margin: 0 0 0.75rem;
    padding-left: 0.65rem;
    border-left: 4px solid #dc3545;
}
.gt-section h3 {
    font-size: 0.98rem;
    font-weight: 700;
    color: #343a40;
    margin: 1rem 0 0.35rem;
}
.gt-section p { font-size: 0.9rem; color: #5b646d; margin: 0 0 0.6rem; }
.gt-section ul { margin: 0.3rem 0 0.6rem 1.1rem; }
.gt-section li { font-size: 0.9rem; color: #5b646d; list-style: disc; margin-bottom: 0.3rem; }

/* 控件 */
.gt-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1rem;
}
.gt-controls > label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: #5b646d;
    margin: 0;
}
.gt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    height: 2.35rem;
    padding: 0 1.05rem;
    border: 1px solid #dfe4e8;
    border-radius: 9px;
    background: #fff;
    color: #3d454c;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    outline: 0;
    transition: all 0.18s ease;
    user-select: none;
}
.gt-btn:hover { border-color: #c8cfd5; background: #f8f9fa; }
.gt-btn:active { transform: translateY(1px); }
.gt-btn-primary {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}
.gt-btn-primary:hover { background: #c82333; border-color: #c82333; color: #fff; }
.gt-btn-dark { background: #343a40; border-color: #343a40; color: #fff; }
.gt-btn-dark:hover { background: #23282d; border-color: #23282d; color: #fff; }
.gt-btn-lg { height: 2.75rem; padding: 0 1.6rem; font-size: 1rem; }
.gt-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.gt-btn.active { background: #dc3545; border-color: #dc3545; color: #fff; }

.gt-select, .gt-input, .gt-textarea {
    border: 1px solid #dfe4e8;
    border-radius: 8px;
    background: #fff;
    color: #3d454c;
    font-size: 0.9rem;
    outline: 0;
    padding: 0.45rem 0.6rem;
    font-family: inherit;
}
.gt-select:focus, .gt-input:focus, .gt-textarea:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}
.gt-input { height: 2.35rem; }
.gt-textarea {
    width: 100%;
    min-height: 150px;
    line-height: 1.8;
    resize: vertical;
}
.gt-textarea-wrap { position: relative; }
.gt-textarea-wrap .gt-textarea { display: block; }
.gt-sample-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.22rem 0.65rem;
    font-size: 0.76rem;
    color: #dc3545;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #f0c2c7;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
}
.gt-sample-btn:hover { background: #dc3545; border-color: #dc3545; color: #fff; }
.gt-sample-btn[hidden] { display: none; }

.gt-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    color: #5b646d;
    cursor: pointer;
    margin: 0;
}
.gt-check input { cursor: pointer; }

.gt-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.gt-pill {
    display: inline-block;
    padding: 0.28rem 0.8rem;
    border: 1px solid #e3e7ea;
    border-radius: 999px;
    background: #fff;
    color: #5b646d;
    font-size: 0.82rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}
.gt-pill:hover { border-color: #dc3545; color: #dc3545; }
.gt-pill.active { background: #dc3545; border-color: #dc3545; color: #fff; }

.gt-tip {
    font-size: 0.8rem;
    color: #98a1a9;
    line-height: 1.7;
    margin-top: 0.75rem;
}

/* ===== 工具首页 ===== */
.gt-tool-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.75rem;
}
.gt-tool-card {
    --accent: #dc3545;
    --accent-rgb: 220, 53, 69;
    grid-column: span 4;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #edf0f2;
    border-radius: 18px;
    padding: 1.5rem;
    padding-right: 9rem;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.gt-tool-card::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.12), rgba(var(--accent-rgb), 0) 70%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.gt-tool-card:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(20, 30, 40, 0.1);
    border-color: rgba(var(--accent-rgb), 0.3);
}
.gt-tool-card:hover::before { opacity: 1; }

.gt-tool-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #23282d;
    margin: 0 0 0.4rem;
}
.gt-tool-card p {
    font-size: 0.85rem;
    line-height: 1.75;
    color: #737d86;
    margin: 0 0 1.1rem;
}
.gt-tool-card .gt-go {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.2px;
}

/* 前两个高频工具做成横向大卡 */
.gt-tool-card.is-feature {
    grid-column: span 6;
    padding: 1.7rem 9.5rem 1.7rem 1.8rem;
}
.gt-tool-body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.gt-tool-card.is-feature h3 { font-size: 1.22rem; margin-bottom: 0.35rem; }
.gt-tool-card.is-feature p { margin-bottom: 0.8rem; }
.gt-tool-card.is-feature .gt-go { margin-top: 0; }

/* 卡片背景插画：从 tool_bg.png 中精确裁出每个工具对应的插画 */
.gt-tool-art {
    position: absolute;
    top: 50%;
    right: -2rem;
    width: 11.6rem;
    height: 18rem;
    transform: translateY(-50%);
    background-image: url('../img/tool_bg.png');
    background-repeat: no-repeat;
    background-size: 570.3% 113.2%;
    background-position: 3.25% 54.7%;
    opacity: 0.3;
    filter: saturate(0.92);
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.gt-tool-card:hover .gt-tool-art { opacity: 0.42; }
.gt-tool-art.art-2 { background-position: 26.67% 54.7%; }
.gt-tool-art.art-3 { background-position: 50.09% 54.7%; }
.gt-tool-art.art-4 { background-position: 73.6% 54.7%; }
.gt-tool-art.art-5 { background-position: 97.09% 54.7%; }

/* ===== 调音器 ===== */
.gt-status {
    text-align: center;
    font-size: 0.86rem;
    color: #737d86;
    margin-top: 0.6rem;
    min-height: 1.4rem;
}
.gt-strings {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.6rem;
    margin-top: 1.4rem;
}
.gt-string-btn {
    border: 1px solid #e3e7ea;
    border-radius: 12px;
    background: #fff;
    padding: 0.7rem 0.4rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.16s ease;
    user-select: none;
}
.gt-string-btn:hover { border-color: #dc3545; }
.gt-string-btn.active {
    background: #fdecee;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}
.gt-string-btn strong {
    display: block;
    font-size: 1.05rem;
    color: #23282d;
    font-weight: 700;
    line-height: 1.2;
}
.gt-string-btn span {
    display: block;
    font-size: 0.7rem;
    color: #9aa3ab;
    margin-top: 0.2rem;
}

/* ===== 节拍器 ===== */
.gt-bpm-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
}
.gt-bpm-display { text-align: center; min-width: 170px; }
.gt-bpm-display #metroBpm {
    font-size: 4.2rem;
    line-height: 1;
    font-weight: 700;
    color: #23282d;
    font-family: "Anton", Impact, sans-serif;
}
.gt-bpm-display small {
    font-size: 0.8rem;
    color: #9aa3ab;
    margin-left: 0.25rem;
}
.gt-tempo-name {
    font-size: 0.82rem;
    color: #dc3545;
    font-weight: 600;
    margin-top: 0.35rem;
}
.gt-round-btn {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: 1px solid #dfe4e8;
    background: #fff;
    color: #343a40;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: 0;
}
.gt-round-btn:hover { border-color: #dc3545; color: #dc3545; }
.gt-range {
    width: 100%;
    margin: 0.9rem 0 0.4rem;
    accent-color: #dc3545;
    cursor: pointer;
}
.gt-beats {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    margin: 1.1rem 0 0.6rem;
    min-height: 1.6rem;
    flex-wrap: wrap;
}
.gt-beat-dot {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    background: #eef1f3;
    border: 1px solid #e0e4e7;
    transition: all 0.08s ease;
}
.gt-beat-dot.accent { border-color: #f0bcc1; }
.gt-beat-dot.on { background: #dc3545; border-color: #dc3545; transform: scale(1.18); }
.gt-beat-dot.on.accent { box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.16); }
.gt-grid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: 1rem;
}
.gt-grid2 > label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.86rem;
    color: #5b646d;
    margin: 0;
    background: #f8f9fa;
    border: 1px solid #eef1f3;
    border-radius: 9px;
    padding: 0.45rem 0.65rem;
}
.gt-metro-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.1rem;
}

/* ===== 和弦库 ===== */
.gt-chord-search {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}
.gt-chord-search .gt-input { flex: 1; }
.gt-filter-row { margin-bottom: 0.75rem; }
.gt-filter-row .gt-filter-label {
    font-size: 0.78rem;
    color: #9aa3ab;
    margin-bottom: 0.35rem;
}
.gt-chord-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.gt-chord-card {
    border: 1px solid #eceff1;
    border-radius: 12px;
    background: #fff;
    padding: 0.65rem 0.4rem 0.55rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.16s ease;
}
.gt-chord-card:hover { border-color: #f0bcc1; box-shadow: 0 6px 18px rgba(20, 30, 40, 0.08); transform: translateY(-2px); }
.gt-chord-card.active { border-color: #dc3545; box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1); }
.gt-chord-card svg { display: block; margin: 0 auto; }
.gt-chord-card .gt-chord-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #23282d;
    margin: 0 0 0.2rem;
    line-height: 1.2;
}
.gt-chord-card .gt-chord-sub {
    font-size: 0.68rem;
    color: #9aa3ab;
    margin-top: 0.1rem;
}
.gt-chord-empty {
    text-align: center;
    color: #9aa3ab;
    font-size: 0.88rem;
    padding: 2rem 0;
}
.gt-chord-detail {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    background: #fbfcfd;
    border: 1px solid #eef1f3;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.gt-chord-detail svg { flex: 0 0 auto; }
.gt-chord-detail-info { flex: 1 1 220px; }
.gt-chord-detail-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #23282d;
    margin: 0 0 0.25rem;
}
.gt-chord-detail-info p {
    font-size: 0.84rem;
    color: #737d86;
    margin: 0 0 0.3rem;
    line-height: 1.7;
}
.gt-chord-detail-info .gt-notes { color: #dc3545; font-weight: 600; }

/* ===== 移调 / 变调夹 ===== */
.gt-tabs {
    display: inline-flex;
    background: #f1f3f5;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 1rem;
}
.gt-tab {
    border: 0;
    background: transparent;
    color: #5b646d;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.45rem 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    outline: 0;
    transition: all 0.16s ease;
}
.gt-tab.active { background: #fff; color: #dc3545; box-shadow: 0 1px 4px rgba(20, 30, 40, 0.1); }
.gt-transpose-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.9rem;
}
.gt-result-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: #737d86;
    margin: 1rem 0 0.4rem;
}
.gt-key-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #fdecee;
    color: #c82333;
    border-radius: 999px;
    padding: 0.15rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
}
.gt-capo-result {
    margin-top: 1rem;
    border-radius: 12px;
    background: #23282d;
    color: #fff;
    padding: 1rem 1.15rem;
    font-size: 0.95rem;
    line-height: 1.8;
}
.gt-capo-result strong { color: #ffd166; font-size: 1.15rem; }
.gt-capo-result .gt-capo-hint { color: rgba(255, 255, 255, 0.62); font-size: 0.8rem; }
.gt-divider { border: 0; border-top: 1px dashed #e3e7ea; margin: 1.4rem 0 1rem; }

/* ===== 音阶指板 ===== */
.gt-scale-notes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin: 1rem 0 0.4rem;
}
.gt-scale-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    height: 2rem;
    padding: 0 0.55rem;
    border-radius: 8px;
    background: #f5f7f8;
    border: 1px solid #e8ecef;
    color: #3d454c;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}
.gt-scale-note.root { background: #dc3545; border-color: #dc3545; color: #fff; }
.gt-fretboard-wrap {
    overflow-x: auto;
    padding: 0.5rem 0 0.75rem;
    -webkit-overflow-scrolling: touch;
}
.gt-fretboard-wrap svg { display: block; }
.gt-fret-dot { cursor: pointer; transition: opacity 0.12s ease; }
.gt-fret-dot:hover { opacity: 0.72; }
.gt-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: #737d86;
    margin-top: 0.35rem;
}
.gt-legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
.gt-legend i { width: 0.8rem; height: 0.8rem; border-radius: 50%; display: inline-block; }
.gt-legend .lg-root { background: #dc3545; }
.gt-legend .lg-note { background: #343a40; }

/* ===== 相关工具 ===== */
.gt-related {
    border-top: 1px solid #eceff1;
    margin-top: 1.5rem;
    padding-top: 1.1rem;
}
.gt-related h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #23282d;
    margin: 0 0 0.75rem;
}
.gt-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.6rem;
}
.gt-related-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #eceff1;
    border-radius: 10px;
    background: #fff;
    color: #3d454c;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.15s ease;
}
.gt-related-link:hover {
    color: #dc3545;
    border-color: #f3c3c8;
    text-decoration: none;
}
.gt-related-link i { color: #dc3545; width: 1.1rem; text-align: center; font-style: normal; }

@media (max-width: 1100px) {
    .gt-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gt-tool-card,
    .gt-tool-card.is-feature { grid-column: span 1; }
    .gt-tool-card.is-feature:first-child { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .gt-page { padding: 0.85rem 0.75rem 2rem; }
    .gt-hero h1 { font-size: 1.45rem; }
    .gt-hero .gt-lead { font-size: 0.88rem; }
    .gt-card { padding: 1.05rem; border-radius: 12px; }
    .gt-section { padding: 1.05rem; border-radius: 12px; }
    .gt-tool-grid { grid-template-columns: 1fr; gap: 0.8rem; }
    .gt-tool-card { padding: 1.15rem; border-radius: 14px; }
    .gt-tool-card.is-feature,
    .gt-tool-card.is-feature:first-child {
        grid-column: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 1.15rem;
    }
    .gt-tool-card.is-feature h3 { font-size: 1.08rem; }
    .gt-tool-art { display: none; }
    .gt-strings { grid-template-columns: repeat(3, 1fr); }
    .gt-bpm-display #metroBpm { font-size: 3.2rem; }
    .gt-grid2 { grid-template-columns: 1fr; }
    .gt-chord-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
    .gt-chord-search { flex-direction: column; }
    .gt-chord-detail { justify-content: center; }
}
