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

/* 基础样式和导航菜单 */
* { margin:0; padding:0 ;box-sizing:border-box;}
html{ -webkit-text-size-adjust:none;}
body{background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); position:relative; font-size:15px; line-height:1.5; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB","Microsoft Yahei UI", "Microsoft Yahei", "Source Han Sans CN", sans-serif; color:#333; overflow-x:hidden; min-height: 100vh;}
a{color: #062743;text-decoration:none;}
a:hover{color: #ff3a29}
li{ list-style-type:none;}
img{ border:none; vertical-align:middle;}
input[type=text]:focus {
    outline: none;
}
.clear{ clear:both;}
.mt-50 { margin-top: 50px }
.mb-50 { margin-bottom: 50px }

/* 导航菜单样式 */
#menu{display:none;}
.menu {position: fixed;top: 0;left: 0;right: 0;z-index: 999;height: 50px;transition: all .3s ease 0s;
    -webkit-box-shadow: 0px 5px 10px 0px rgba(17, 58, 93, 0.1);
    -ms-box-shadow: 0px 5px 10px 0px rgba(17, 58, 93, 0.1);
    box-shadow: 0px 5px 10px 0px rgba(17, 58, 93, 0.1);}
.menu .logo-a{float: left;width: 140px;height: 50px;margin-left: 5px;margin-top: 8px}
.menu .logo-a img{width: 75%}
.active .logo-a .logo{display: none;}

.menu .navbar{width: 950px;float: left;}
.menu .navbar li{float: left;margin-top: 2px;}
.menu .navbar li a{color: #fff;padding: 0 15px;line-height: 50px;}
.menu .navbar li a:hover,.menu .navbar .on a{color: #ff3a29}
.menu .sou{float: right;line-height: 70px;color: #fff}
.active{background: #fff;-webkit-transition: all .3s ease-out;transition: all .3s ease-out;background: hsla(0,0%,100%,.96);}
.active .navbar li a{color: #062743;}
.active .sou{color: #062743}

/* 和弦模块特定样式 */
.container {
    width: auto;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 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: #667eea;
    font-weight: bold;
}

.search-box {
    display: flex;
    justify-content: center;
    margin: 15px 0;
    padding: 0 10px;
}

.search-box input {
    padding: 12px 20px;
    width: 100%;
    max-width: 400px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.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 .color-bar {
    width: 4px;
    height: 24px;
    border-radius: 2px;
    margin-right: 12px;
    flex-shrink: 0;
}

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

.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-placeholder {
    width: 160px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f0f0f0;
    border-radius: 8px;
}

.chord-name-label {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

.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}
.footer-links{text-align:left;color:#bdcadb;border-top: 1px solid #393f56;border-bottom: 1px solid #393f56;}
.footer-links ul{list-style:none;display:inline-block}
.footer-links ul li{float:left;margin:10px 5px 5px}
.footer-links a{color:#666e8e}
.copyright a{color:#fff}

/* 移动端适配 - 导航菜单 */
@media screen and (min-width: 320px) and (max-width: 767px){
body{font-size : 1.2rem;overflow-x:hidden;}
.container{width:100%;}
.mb-50{width:100%;}
.menu .logo-a{margin-left:5px;margin-top: 12px;}
.menu .sou{display:none;}
.menu .navbar{display:none;}
#menu {display:block;position: absolute;top: 0;right: 10px;padding: 20px 0;}
.menu .fa {font-size: 25px;color:#605959;}
.hd-nav {margin: 0;position: fixed;width: 100%;left: 0;background: #fff;top: 50px;bottom: 0;overflow-y: scroll!important;display: none;padding-right: 0;z-index: 100;background: rgba(0,0,0,.6);}
.hd-nav ul {background: #fff;text-align: left;padding: 8px 0;}
.hd-nav li {border-bottom: 1px solid #efefef;margin: 5px 1px;display: inline-block;width: 30%;border-radius: 10px;background: #efefef;padding: 0 10px;vertical-align: middle;text-align: center;font-size: 14px;color: #666666;line-height: 35px;}
.hd-nav li>a {display: block;padding: 0 4%;line-height: 35px;font-size: 16px;color: #4f4f4f;}
}

/* 移动端适配 - 和弦模块 */
@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){
body{font-size : 1.2rem;overflow-x:hidden;}
.container{width:100%;}
.mb-50{width:100%;}
.menu .logo-a{margin-left:41%;}
.menu .sou{display:none;}
.menu .navbar{display:none;}
#menu {display:block;position: absolute;top: 0;right: 10px;padding: 10px 0;}
.menu .fa {font-size: 25px;color:#7c7c7c;}
.hd-nav {margin: 0;position: fixed;width: 100%;left: 0;background: #fff;top: 60px;bottom: 0;overflow-y: scroll!important;display: none;padding-right: 0;z-index: 100;background: rgba(0,0,0,.6);}
.hd-nav ul {background: #fff;text-align: left;padding: 10px 0;}
.hd-nav li {border-bottom: 1px solid #efefef;margin: 5px 3px;display: inline-block;width: 24%;border-radius: 10px;background: #efefef;padding: 0 10px;vertical-align: middle;text-align: center;font-size: 14px;color: #666666;line-height: 40px;}
.hd-nav li>a {display: block;padding: 0 4%;line-height: 40px;font-size: 16px;color: #4f4f4f;}
}

@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 {
    body { background: white; }
    .tabs, .search-box, .print-btn, .page-header, .menu { display: none; }
    .chord-section {
        break-inside: avoid;
        box-shadow: none;
    }
    .footer { display: none; }
}
