/* 重置和基础样式 */
.guitar-chord-finder * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.guitar-chord-finder {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #2c3e50;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin: 10px 0;
    width: 100%;
}

.gcf-container {
    padding: 12px;
    color: white;
}

/* 头部样式 - 极简 */
.gcf-header {
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #3a506b;
}

.gcf-header h2 {
    font-size: 1.3em;
    font-weight: 400;
    color: #ecf0f1;
    margin: 0;
}

/* 主内容区域 - 左右布局 */
.gcf-main-content {
    display: flex;
    gap: 15px;
    min-height: 200px;
}

/* 左侧 - 和弦图区域 */
.gcf-results-section {
    flex: 1;
    min-height: 200px;
}

.gcf-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

/* 右侧 - 控制面板 */
.gcf-controls-panel {
    width: 180px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gcf-select-group {
    display: flex;
    flex-direction: column;
}

.gcf-select-group label {
    font-size: 0.8em;
    margin-bottom: 4px;
    color: #bdc3c7;
    font-weight: 500;
}

.gcf-select-group select {
    padding: 8px 10px;
    border: 1px solid #4a6278;
    border-radius: 4px;
    background: #34495e;
    color: #ecf0f1;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.gcf-select-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 和弦图样式 - 超紧凑 */
.gcf-chord-diagram {
    background: #34495e;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    color: #ecf0f1;
    text-align: center;
    border: 1px solid #3a506b;
}

.gcf-chord-name {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ecf0f1;
}

/* 指板样式 - 超紧凑 */
.gcf-fretboard {
    position: relative;
    margin: 0 auto 6px;
    width: 110px;
    background: #2c3e50;
    border-radius: 4px;
    padding: 8px 6px;
    border: 1px solid #4a6278;
}

/* 六根弦 - 竖线 */
.gcf-strings {
    position: relative;
    height: 70px;
    margin-bottom: 4px;
}

.gcf-string {
    position: absolute;
    width: 1px;
    height: 100%;
    background: #95a5a6;
    left: 0;
}

.gcf-string:nth-child(1) { left: 0; }
.gcf-string:nth-child(2) { left: 20%; }
.gcf-string:nth-child(3) { left: 40%; }
.gcf-string:nth-child(4) { left: 60%; }
.gcf-string:nth-child(5) { left: 80%; }
.gcf-string:nth-child(6) { left: 100%; }

/* 三个品 - 横线 */
.gcf-frets {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.gcf-fret {
    position: absolute;
    width: 100%;
    height: 1px;
    background: #4a6278;
    left: 0;
}

.gcf-fret:nth-child(1) { top: 0; border-top: 2px solid #ecf0f1; }
.gcf-fret:nth-child(2) { top: 33.33%; }
.gcf-fret:nth-child(3) { top: 66.66%; }
.gcf-fret:nth-child(4) { top: 100%; }

/* 按弦点 */
.gcf-finger-positions {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.gcf-finger-point {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #e74c3c;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
    transform: translate(-50%, -50%);
    border: 1.5px solid #2c3e50;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* 空弦和闷音标记 */
.gcf-nut-marks {
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 3px;
}

.gcf-nut-mark {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
}

.gcf-open {
    background: transparent;
    border: 1px solid #ecf0f1;
    color: #ecf0f1;
}

.gcf-muted {
    color: #e74c3c;
    font-size: 9px;
}

/* 弦名称 */
.gcf-string-names {
    display: flex;
    justify-content: space-between;
    padding: 0 3px;
    margin-top: 4px;
}

.gcf-string-name {
    font-size: 7px;
    color: #95a5a6;
    font-weight: 500;
}

/* 和弦信息 */
.gcf-chord-info {
    font-size: 9px;
    color: #bdc3c7;
    margin-top: 6px;
}

/* 加载状态 */
.gcf-loading {
    text-align: center;
    padding: 20px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.gcf-spinner {
    width: 25px;
    height: 25px;
    border: 2px solid rgba(236, 240, 241, 0.3);
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 无结果状态 */
.gcf-no-results {
    text-align: center;
    padding: 20px 10px;
    background: #34495e;
    border-radius: 6px;
    border: 1px solid #3a506b;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.gcf-no-results p {
    margin: 0;
    color: #bdc3c7;
    font-size: 0.85em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .gcf-main-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .gcf-controls-panel {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .gcf-select-group {
        flex: 1;
        margin: 0 5px;
    }
    
    .gcf-results-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    .gcf-container {
        padding: 8px;
    }
    
    .gcf-header {
        margin-bottom: 8px;
    }
    
    .gcf-header h2 {
        font-size: 1.2em;
    }
    
    .gcf-controls-panel {
        flex-direction: column;
        gap: 8px;
    }
    
    .gcf-select-group {
        margin: 0;
    }
    
    .gcf-results-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .gcf-fretboard {
        width: 100px;
    }
    
    .gcf-strings {
        height: 65px;
    }
}