/* 吉他和弦表完整样式 */

/* ========== 基础重置 ========== */
*{margin:0;padding:0;box-sizing:border-box;}
html{-webkit-text-size-adjust:none;}
body{font-family:"Microsoft Yahei",Helvetica,Arial,sans-serif;font-size:14px;color:#333;line-height:1.7;background:linear-gradient(135deg,#213733 0%,#16a085 50%,#0e6655 100%);overflow-x:hidden;min-height:100vh;}
ul,ol{list-style:none;}
a{text-decoration:none;color:#063c31;}
a:hover{color:#1abc9c;}
img{border:0;vertical-align:middle;max-width:100%;}
input[type=text]:focus{outline:none;}

/* ========== 头部导航（原站原版 + index.css覆盖） ========== */
.menu {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    height: 64px;
    transition: all .3s ease 0s;
    box-shadow: 0px 5px 10px 0px rgba(17, 58, 93, 0.1);
}
.menu.active {
    background: #fff;
}

/* logo区域 */
.navbar-header{float:left;padding:10px 0;}
.logo-a{float:left;width:140px;height:44px;margin-top:0px;display:block;}
.logo-a img{max-height:44px;object-fit:contain;}

/* PC端横向导航 */
.menu .container{width:1200px;margin:0 auto;padding:0 15px;}
.clearfix{zoom:1;}
.clearfix:after{content:"";display:block;clear:both;height:0;visibility:hidden;}
.navbar-collapse{float:left;}
.wpcom-adv-menu{float:left;}
.wpcom-adv-menu>li{float:left;position:relative;padding:0 16px;line-height:64px;}
.wpcom-adv-menu>li>a{color:#fff;padding:0 6px;font-size:15px;}
.menu.active .wpcom-adv-menu>li>a{color:#062743;}
.wpcom-adv-menu>li.on a,.wpcom-adv-menu>li a:hover{color:#1abc9c;}

/* 右上角登录投稿搜索栏 */
.navbar-action{float:right;line-height:64px;white-space:nowrap;}
.navbar-search{display:inline-block;position:relative;margin-right:12px;vertical-align:middle;}
.navbar-search-input{width:170px;height:32px;padding:0 34px 0 12px;border-radius:30px;background:#f6f6f6;border:1px solid #eee;outline:none;font-size:13px;}
.j-navbar-search{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:#999;cursor:pointer;}
.j-navbar-search:hover{color:#1abc9c;}
.navbar-action #j-user-wrap{display:inline-block;}
#j-user-wrap a.login{margin:0 6px;color:#666;font-size:13px;}
#j-user-wrap a.login:hover{color:#1abc9c;}
#j-user-wrap a.register{color:#1abc9c;font-size:13px;}
.navbar-action .publishing{display:inline-block;padding:0 16px;margin-left:16px;font-size:13px;line-height:32px;color:#fff;background:#1abc9c;border-radius:4px;vertical-align:middle;}
.navbar-action .publishing:hover{background:#16a085;color:#fff;}

/* 移动端汉堡按钮 */
#menu{display:none;position:absolute;top:12px;right:15px;cursor:pointer;z-index:1000;}
.navbar-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    padding: 8px;
}
.icon-bar{display:block;width:22px;height:3px;background:#666;margin:4px auto;border-radius:3px;}
.menu.active .icon-bar{background:#333;}

/* 移动端下拉菜单 hd-nav */
.hd-nav{
    display: none;
    position: fixed;
    width:100%;
    left:0;
    top:70px;
    background:rgba(0,0,0,.6);
    z-index:998;
    overflow-y:auto;
}
.hd-nav ul{background:#fff;padding:8px 15px;}
.hd-nav li{display:inline-block;width:30%;margin:5px 0;border-radius:10px;background:#efefef;text-align:center;line-height:35px;margin:0.5%;}
.hd-nav li a{color:#4f4f4f;font-size:15px;display:block;}
.hd-nav li.on a{color:#1abc9c;}

/* 下拉菜单（工具子菜单） */
.dropdown{position:relative;}
.wpcom-adv-menu>li.dropdown>a{padding-right:4px;}
.wpcom-adv-menu>li.dropdown>a::after{content:'\f107';font-family:FontAwesome;font-size:12px;margin-left:3px;transition:transform 0.2s ease;}
.dropdown.open>a::after{transform:rotate(180deg);}
.dropdown-menu{display:none;position:absolute;top:100%;left:0;background:#fff;min-width:160px;padding:6px 0;border-radius:8px;box-shadow:0 6px 24px rgba(0,0,0,0.12);z-index:1000;margin-top:8px;border:1px solid rgba(0,0,0,0.06);}
.dropdown.open .dropdown-menu{display:block;animation:fadeInDown 0.15s ease;}
@keyframes fadeInDown{from{opacity:0;transform:translateY(-6px);}to{opacity:1;transform:translateY(0);}}
.dropdown-menu li a{display:flex;align-items:center;padding:10px 20px;color:#062743;font-size:14px;white-space:nowrap;transition:all 0.15s ease;gap:10px;}
.dropdown-menu li a i{color:#999;font-size:14px;width:18px;text-align:center;transition:color 0.15s ease;}
.dropdown-menu li a:hover{background-color:#f0faf8;color:#1abc9c;}
.dropdown-menu li a:hover i{color:#1abc9c;}

/* ========== 媒体查询：手机、平板适配 ========== */
@media screen and (max-width:991px){
    .menu .container{width:100%;}
    .chord-content{max-width:100%;}
    .navbar-collapse{display:none;background-color:#7d7979;}
    .wpcom-adv-menu{display:none;}
    #menu,.navbar-toggle{display:block;}
    .logo-a{margin-left:5px;}
}
@media screen and (max-width:767px){
    .menu{height:56px;}
    .logo-a img{max-height:36px;margin-top:5px;}
    .hd-nav{top:56px;}
    .navbar-action{display:none;}
    .chord-content{padding-top:66px;}
}

/* 打印页头 - 屏幕上隐藏 */
.print-header {
    display: none;
}
.print-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid #333;
}
.print-logo-text {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.print-site-name {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}
.print-page-title {
    font-size: 14px;
    color: #666;
}
.print-account-info {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #888;
}

/* 打印页脚 - 屏幕上隐藏 */
.print-footer {
    display: none;
}
.print-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 20px 20px 10px;
    border-top: 1px solid #ccc;
    margin-top: 30px;
}
.print-qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.print-qr-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.print-qr-label {
    font-size: 10px;
    color: #888;
}
.print-qr-name {
    font-size: 11px;
    font-weight: bold;
    color: #333;
}
.print-footer-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.print-url {
    font-size: 12px;
    color: #1abc9c;
    font-weight: bold;
}
.print-copy {
    font-size: 10px;
    color: #aaa;
}

/* 和弦模块特定样式 */
.chord-content {
    padding-top: 78px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.page-header {
    text-align: center;
    padding: 20px 0;
    color: white;
}

.page-header h1 {
    font-size: clamp(1.5em, 4vw, 2.5em);
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-header p {
    font-size: clamp(0.9em, 2vw, 1.1em);
    opacity: 0.9;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 18px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: clamp(12px, 2vw, 14px);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.tab:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.tab.active {
    background: white;
    color: #1abc9c;
    font-weight: bold;
}

.chord-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    font-size: clamp(1.1em, 3vw, 1.4em);
    color: #333;
}

.section-header h2 i {
    margin-right: 8px;
    font-size: 0.9em;
}

.section-header .count {
    margin-left: auto;
    background: #f5f5f5;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: clamp(0.8em, 2vw, 0.95em);
    color: #666;
    white-space: nowrap;
}

.chord-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    justify-items: center;
}

.chord-card {
    background: #fafafa;
    border-radius: 12px;
    padding: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    display: flex;
    justify-content: center;
}

.chord-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.chord-card svg {
    display: block;
    max-width: 100%;
    height: auto;
}

.chord-detail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.chord-detail.show {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.chord-detail-content {
    background: white;
    border-radius: 16px;
    padding: 25px;
    max-width: min(500px, 95vw);
    max-height: min(600px, 90vh);
    overflow: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.chord-detail-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    font-size: 28px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.chord-detail-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.print-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.print-btn:hover {
    transform: scale(1.05);
}

/* Footer 样式 */
.footer{position:relative;z-index:9;clear:both;padding:40px 15px;font-size:12px;text-align:center;color:#666e8e;background:#1c1f2b}
.footer a{color:#bdcadb}
.copyright a{color:#fff}

/* 移动端适配 - 和弦模块 */
@media screen and (min-width: 320px) and (max-width: 767px) {
    .chord-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }
    .tabs { gap: 6px; }
    .tab {
        padding: 7px 12px;
        font-size: 11px;
    }
    .chord-section {
        padding: 15px;
        border-radius: 12px;
    }
    .section-header { margin-bottom: 15px; }
    .search-box input {
        font-size: 14px;
        padding: 10px 16px;
    }
    .footer{padding:20px 10px;}
    .footer .copyright{font-size:0.8rem;}
}

/* 平板适配 - 和弦模块 */
@media screen and (min-width: 768px) and (max-width: 991px) {
    .chord-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    .chord-section {
        padding: 18px;
    }
}

/* 打印样式 */
@media print {
    @page {
        size: A4;
        margin: 15mm 12mm 20mm 12mm;
    }

    body {
        background: white !important;
        font-size: 12px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .menu, .tabs, .print-btn, .page-header,
    .chord-detail, .footer, .chord-detail-close {
        display: none !important;
    }

    .container {
        padding: 0 !important;
        max-width: 100% !important;
        padding-top: 0 !important;
    }

    .print-header {
        display: block !important;
    }

    .print-footer {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }

    .chord-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        margin: 10px 0;
        padding: 12px;
    }

    .section-header {
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .section-header h2 {
        font-size: 14px;
    }

    .chord-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }

    .chord-card {
        padding: 4px;
        border-radius: 6px;
    }

    .chord-card svg {
        max-width: 120px;
    }

    .chord-placeholder {
        width: 120px;
        height: 150px;
    }
}
