/*
Theme Name: Guitar Tabs Pro
Author: AI Collaborator
Version: 1.2
Description: 专为吉他谱设计的响应式、标准规范 WordPress 主题。
*/

/* --- 1. 全局基础样式 --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f9f9f9; color: #333; line-height: 1.6; transition: background 0.3s, color 0.3s; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 20px; }

/* --- 2. 头部大搜索框样式（从 header.php 移入） --- */
.search-hero { background: linear-gradient(135deg, #2c3e50, #3498db); color: #fff; text-align: center; padding: 50px 20px; border-bottom: 4px solid #1abc9c; }
.search-wrapper { max-width: 700px; margin: 0 auto; }
.search-wrapper h1 { margin-bottom: 20px; font-weight: 300; letter-spacing: 1px; font-size: 2.2rem; }
.site-logo a { color: #fff; text-decoration: none; font-size: 14px; text-transform: uppercase; letter-spacing: 2px; opacity: 0.8; }
.search-form { display: flex; justify-content: center; position: relative; max-width: 600px; margin: 0 auto; }
.search-form input[type="search"] { width: 100%; border: none; padding: 15px 120px 15px 25px; border-radius: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); outline: none; font-size: 1rem; transition: all 0.3s ease; }
.search-form input[type="search"]:focus { box-shadow: 0 4px 25px rgba(26, 188, 156, 0.4); transform: scale(1.01); }
.search-form button { position: absolute; right: 5px; top: 5px; bottom: 5px; background: #1abc9c; color: white; border: none; padding: 0 22px; border-radius: 25px; cursor: pointer; transition: background 0.2s; font-weight: bold; }
.search-form button:hover { background: #16a085; }

/* --- 3. 曲谱核心网格与卡片 --- */
.page-header-title { font-size: 20px; color: #2c3e50; margin: 20px 0; padding-bottom: 10px; border-bottom: 2px solid #ecf0f1; }
.tab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-bottom: 40px; }
.tab-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: all 0.2s ease; border-left: 4px solid #3498db; }
.tab-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.tab-card h3 a { color: #2c3e50; text-decoration: none; }
.tab-card h3 a:hover { color: #1abc9c; }
.tab-meta { font-size: 13px; color: #7f8c8d; margin-top: 8px; }

/* --- 4. 吉他谱详情文本页 --- */
/*.guitar-tab-content { font-family: "Courier New", Courier, Consolas, monospace; font-size: 16px; white-space: pre; overflow-x: auto; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

*/
/* --- 优化后的吉他谱内容核心样式 --- */
.guitar-tab-content {
    font-family: "Courier New", Courier, Consolas, monospace;
    /* 流式字号：在 320px 到 1200px 屏幕间，字号在 13px 到 18px 之间完美平滑过渡 */
    font-size: clamp(13px, 1.1vw + 10px, 18px); 
    white-space: pre;
    overflow-x: auto;
    background: #fff;
    padding: clamp(15px, 3vw, 30px);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    line-height: 1.8;
}

/* 变调高亮：为歌谱中的和弦专门标记的类（选填，配合动态变调功能） */
.chord {
    font-weight: bold;
    color: #1abc9c;
    cursor: pointer;
    user-select: none;
}
body.dark-mode .chord {
    color: #3498db;
}


/* --- 5. 乐手辅助工具栏 --- */
.guitar-controls { position: fixed; bottom: 20px; right: 20px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border: 1px solid #e0e0e0; border-radius: 30px; padding: 10px 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); z-index: 9999; display: flex; align-items: center; gap: 15px; }
.control-group { display: flex; align-items: center; gap: 8px; border-right: 1px solid #eee; padding-right: 12px; }
.control-group:last-child { border-right: none; padding-right: 0; }
.control-btn { background: #f1f2f6; border: none; color: #2c3e50; padding: 6px 12px; border-radius: 15px; cursor: pointer; font-size: 13px; font-weight: bold; }
.control-btn:hover, .control-btn.active { background: #1abc9c; color: #fff; }
.speed-indicator { font-size: 12px; color: #7f8c8d; min-width: 45px; text-align: center; }

/* --- 6. 分页与页脚 --- */
.pagination { text-align: center; margin: 40px 0; }
.pagination .page-numbers { display: inline-block; padding: 8px 16px; margin: 0 4px; background: #fff; border-radius: 4px; color: #333; text-decoration: none; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.pagination .page-numbers.current { background: #1abc9c; color: #fff; }
.site-footer { text-align: center; padding: 30px 20px; color: #bdc3c7; font-size: 14px; background: #fff; border-top: 1px solid #eee; margin-top: 50px; }

/* --- 7. 🌟 完美暗黑模式优化 --- */
body.dark-mode { background: #121212 !important; color: #e0e0e0 !important; }
body.dark-mode .tab-card, body.dark-mode .guitar-tab-content, body.dark-mode .site-footer { background: #1e1e1e !important; guitar-tab-contentcolor: #e0e0e0 !important; border-color: #333; }
body.dark-mode .tab-card h3 a { color: #fff; }
body.dark-mode .guitar-controls { background: rgba(30, 30, 30, 0.95); border-color: #444; }
body.dark-mode .control-btn { background: #2c3e50; color: #e0e0e0; }
body.dark-mode .page-header-title { color: #fff; border-bottom-color: #333; }
body.dark-mode .pagination .page-numbers { background: #1e1e1e; color: #ccc; }

/* --- 8. 响应式三端适配断点 --- */
@media (max-width: 1023px) {
    .search-wrapper h1 { font-size: 1.8rem; }
}
@media (max-width: 767px) {
    .container { width: 95%; padding: 10px; }
    .search-hero { padding: 35px 15px; }
    .search-form input[type="search"] { padding: 12px 10px 12px 15px; border-radius: 8px; }
    .search-form button { position: relative; right: 0; top: 0; margin-left: 8px; border-radius: 8px; padding: 0 15px; }
    .search-form { display: flex; }
    .guitar-controls { left: 10px; right: 10px; bottom: 10px; border-radius: 15px; justify-content: space-around; padding: 8px 5px; gap: 2px; }
    .control-group { padding-right: 4px; gap: 3px; }
    .control-btn { padding: 6px 8px; font-size: 11px; }
    .container { padding-bottom: 90px !important; } /* 极其重要：防止内容被底部工具栏永久遮挡 */
    .guitar-tab-content { font-size: 13px; padding: 12px; }
}





/* ==========================================
   🚀 终极进化：高级功能专属样式 
   ========================================== */

/* --- 1. 和弦指法悬浮提示框 (Tooltip) --- */
.chord {
    position: relative;
    display: inline-block;
    border-bottom: 1px dashed #1abc9c; /* 给和弦加个虚线下划线暗示可交互 */
}

.chord-tooltip {
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: #2c3e50;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: -apple-system, sans-serif;
    font-size: 13px;
    font-weight: normal;
    letter-spacing: 2px; /* 让指法数字（如 x32010）更容易辨认 */
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10000;
}

/* 小箭头 */
.chord-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #2c3e50 transparent transparent transparent;
}

/* 鼠标悬浮或触摸时显示 */
.chord:hover .chord-tooltip,
.chord:active .chord-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* 夜间模式适配 */
body.dark-mode .chord-tooltip {
    background: #f1f2f6;
    color: #2c3e50;
}
body.dark-mode .chord-tooltip::after {
    border-color: #f1f2f6 transparent transparent transparent;
}

/* --- 2. 🖨️ 完美的物理打印机适配 --- */
@media print {
    /* 隐藏所有不需要打印的元素：控制栏、头部大搜索、页脚 */
    .guitar-controls, .search-hero, .site-footer { 
        display: none !important; 
    }
    
    body {
        background: #fff !important;
        color: #000 !important;
    }

    .container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }

    .guitar-tab-content {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        font-size: 12pt !important; /* 物理打印使用 pt 单位 */
        color: #000 !important;
    }

    /* 防止和弦被强行分页截断 */
    .guitar-tab-content {
        page-break-inside: avoid;
    }
    
    /* 强制移除夜间模式的深色背景 */
    body.dark-mode {
        background: #fff !important;
        color: #000 !important;
    }
}



/* ==========================================
   💬 完美的卡片式留言板 UI 样式
   ========================================== */
.comments-area {
    margin-top: 30px;
    background: #fff;
    padding: clamp(15px, 4vw, 35px);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.comments-title {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f2f6;
}

/* 评论列表流式布局 */
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: clamp(20px, 5vw, 45px); margin-top: 10px; } /* 回复缩进 */
.comment-body {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid #f1f2f6;
}
.comment-body .avatar { 
    border-radius: 50%; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.08); 
    flex-shrink: 0;
}
.comment-meta { font-size: 12px; color: #7f8c8d; margin-bottom: 6px; }
.comment-author cite a { font-style: normal; font-weight: bold; color: #2c3e50; text-decoration: none; }
.comment-author cite a:hover { color: #1abc9c; }
.comment-metadata a { color: #bdc3c7; text-decoration: none; margin-left: 8px; }
.comment-content { color: #444; font-size: 14.5px; line-height: 1.6; word-break: break-all; }

/* 互动按钮 */
.reply { margin-top: 10px; }
.comment-reply-link { 
    font-size: 11px; color: #1abc9c; text-decoration: none; font-weight: bold; 
    border: 1px solid #1abc9c; padding: 3px 12px; border-radius: 12px; transition: all 0.2s; 
}
.comment-reply-link:hover { background: #1abc9c; color: #fff; }

/* 留言表单美化 */
#respond { margin-top: 35px; }
#reply-title { font-size: 17px; color: #2c3e50; margin-bottom: 20px; }
.comment-form input[type="text"], 
.comment-form input[type="email"], 
.comment-form input[type="url"], 
.comment-form textarea {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    background: #fcfcfc;
}
.comment-form textarea { resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { border-color: #1abc9c; background: #fff; box-shadow: 0 0 8px rgba(26,188,156,0.15); }
.comment-form p { margin-bottom: 15px; }

/* 传统三行表单（并排响应式展示） */
.comment-form-author, .comment-form-email, .comment-form-url {
    display: inline-block;
    width: 32%;
    margin-right: 1.33%;
}
.comment-form-url { margin-right: 0; }

/* 酷炫发布按钮 */
.submit-btn {
    background: #2c3e50; color: #fff; border: none; padding: 12px 35px; 
    border-radius: 25px; cursor: pointer; font-weight: bold; transition: background 0.2s;
}
.submit-btn:hover { background: #1abc9c; }

/* 分页导航 */
.comment-navigation .nav-inside { display: flex; justify-content: space-between; padding: 15px 0; font-size: 13px; }
.comment-navigation a { color: #1abc9c; text-decoration: none; font-weight: bold; }

/* --- 🌙 留言板专属暗黑模式适配 --- */
body.dark-mode .comments-area { background: #1e1e1e !important; border-color: #333; }
body.dark-mode .comments-title, body.dark-mode #reply-title { color: #fff; border-bottom-color: #333; }
body.dark-mode .comment-body { border-bottom-color: #2c3e50; }
body.dark-mode .comment-author cite a { color: #3498db; }
body.dark-mode .comment-content { color: #ccc; }
body.dark-mode .comment-form input[type="text"], 
body.dark-mode .comment-form input[type="email"], 
body.dark-mode .comment-form input[type="url"], 
body.dark-mode .comment-form textarea {
    background: #2c3e50; border-color: #444; color: #fff;
}
body.dark-mode .comment-form input:focus, body.dark-mode .comment-form textarea:focus { background: #23313f; border-color: #1abc9c; }
body.dark-mode .submit-btn { background: #34495e; }
body.dark-mode .submit-btn:hover { background: #1abc9c; }

/* 移动端完美坍塌 */
@media (max-width: 767px) {
    .comment-form-author, .comment-form-email, .comment-form-url { width: 100%; margin-right: 0; }
    .comment-body { padding: 15px 0; }
}

