/* 
 * FILE: /skin/fun/css/component.kalimba.css
 * VERSION: V26
 * DESC: Footer 列表去点终极修复版 (Fixed: Force remove list-style bullets with !important)
 * 
 * MODIFICATION HISTORY:
 * -----------------------------------------------------------------------------
 * [2025-11-23 15:10:00] V26: Added !important to list-style in footer to override Pico.css defaults.
 * [2025-11-23 15:00:00] V25: Optimized footer layout.
 * [2025-11-23 14:50:00] V24: Fixed theme switcher.
 * -----------------------------------------------------------------------------
 */

/* ==========================================================================
   1. Header & Navigation (头部与导航)
   ========================================================================== */

.site-header {
    background: var(--surface);
    height: var(--header-height);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: var(--container-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.site-logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    text-decoration: none;
    z-index: 10;
    white-space: nowrap;
    flex-shrink: 0; 
    padding-right: 60px; 
}

/* --- 桌面端导航 --- */
.site-nav {
    height: 100%;
    display: flex;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.site-nav > ul {
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
    height: 100%;
    align-items: center;
}

.site-nav > ul > li {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.site-nav a {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
    text-decoration: none;
}

.site-nav a:hover {
    color: var(--primary);
}

/* --- 下拉菜单 --- */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--surface);
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.site-nav li.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-menu li {
    height: auto;
    display: block;
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    white-space: nowrap;
    color: var(--text-main);
    width: 100%;
}

.dropdown-menu a:hover {
    background: var(--background);
    color: var(--primary);
}

/* --- 移动端汉堡按钮 --- */
.mobile-nav-toggle {
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    padding: 0; 
    color: var(--text-main);
    z-index: 1001;
    flex-shrink: 0;
    margin-left: auto; 
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: flex-end; 
}

@media (min-width: 993px) {
    .mobile-nav-toggle {
        display: none !important;
    }
}

.mobile-nav-toggle svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
}

/* --- 响应式适配 --- */
@media (max-width: 992px) {
    .mobile-nav-toggle {
        display: flex; 
    }

    .site-logo {
        font-size: 1.3rem; 
        max-width: 70%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .site-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        transform: none; 
        width: 100%;
        background: var(--surface);
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        height: auto;
        display: block;
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
    }

    .site-nav[data-visible="true"] {
        transform: translateY(0);
    }

    .site-nav > ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        height: auto;
    }

    .site-nav > ul > li {
        width: 100%;
        height: auto;
        border-bottom: 1px solid var(--border-color);
        display: block;
    }

    .site-nav a {
        display: block;
        padding: 15px 0;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0 0 0 20px;
        min-width: auto;
        pointer-events: auto;
        display: block;
        background: transparent;
    }

    .dropdown-menu a {
        padding: 10px 0;
        font-size: 0.9rem;
        color: var(--text-muted);
    }
}


/* ==========================================================================
   2. Instrument Stage & Layout
   ========================================================================== */

main.container > section {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important; 
    padding-bottom: 0 !important; 
}

main.container article {
    margin-top: 0 !important;
    margin-bottom: 20px !important; 
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

main.container > section:first-child > article {
    margin-top: 10px !important; 
}

main.container {
    margin-top: 10px !important;
    padding-top: 0 !important;
}

.app-main-title {
    margin-top: 0 !important;
    margin-bottom: 15px;
    font-size: 2rem;
    line-height: 1.2;
}

#instrument-stage {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 360px;
    width: 100%;
    margin-bottom: 0;
    user-select: none;
}

#instrument-stage.loading::before {
    content: "Loading Sounds...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
}

.tine-wrapper {
    flex: 1;
    max-width: 60px;
    min-width: 12px;
    margin: 0 1px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    transition: height 0.3s ease;
}

.tine-bar {
    width: 100%;
    height: 100%;
    border-radius: 0 0 15px 15px;
    cursor: pointer;
    background: linear-gradient(to bottom, #eef2f3 0%, #cbe2ed 20%, #2980b9 100%);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2), inset 0 -5px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 15px;
    transition: transform 0.1s, filter 0.1s;
}

.tine-bar.hit {
    transform: scaleY(0.96) translateY(2px);
    filter: brightness(1.1);
    background: linear-gradient(to bottom, #fff 0%, var(--primary) 100%);
}

.k-num {
    font-size: 1.4rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
    line-height: 1;
}

.k-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    font-weight: 600;
}

.k-char {
    position: absolute;
    top: 10px;
    font-size: 0.7rem;
    color: #888;
    font-weight: bold;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .k-num { font-size: 1rem; }
    .k-note { font-size: 0.6rem; }
    .k-char { display: none; }
    #instrument-stage { height: 300px; }
    .app-main-title { font-size: 1.5rem; }
}


/* ==========================================================================
   3. Controls (Buttons)
   ========================================================================== */

.buttons-wrapper-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 20px; 
    text-align: center;
}

@media (max-width: 992px) {
    .buttons-wrapper-center {
        margin-top: 60px !important;
    }
    main.container article {
        margin-bottom: 15px !important;
        padding-top: 15px !important;
    }
}

.buttons-container {
    background: var(--background);
    padding: 15px 30px;
    border-radius: 60px;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin: 0 auto;
}

.button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-main);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.2s;
    padding: 0;
    flex-shrink: 0;
    margin: 0;
}

.button:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    border-color: var(--primary);
}

.button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: #f0f0f0;
}

.button svg {
    width: 24px;
    height: 24px;
    display: block;
    stroke: currentColor;
    fill: none;
}

#action-record svg { fill: #e74c3c; stroke: none; }
#action-record:hover svg { fill: #fff; }

.button.recording-now {
    background: #ffebeb !important;
    border-color: #ff4d4f !important;
    animation: pulse-red 1.5s infinite;
}
.button.recording-now svg { fill: #ff4d4f !important; stroke: none !important; }
#icon-spin { stroke: #ff4d4f !important; fill: none !important; }

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(255, 77, 79, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0); }
}

.text-button {
    width: auto;
    height: 48px; 
    padding: 0 24px;
    border-radius: 30px;
    font-weight: 700;
    gap: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.buttons-separator {
    width: 1px;
    height: 28px;
    background: #cbd5e0;
    margin: 0 5px;
}


/* ==========================================================================
   4. Settings Layout
   ========================================================================== */

#options-panel h2 {
    text-align: center;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    margin-bottom: 30px;
    display: inline-block;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    text-align: left;
}

fieldset {
    border: 1px solid var(--border-color);
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius);
    margin: 0;
    min-width: 0; 
    width: 100%;
}

fieldset label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
}

input[type=range] { width: 100%; cursor: pointer; }
select { width: 100%; padding: 5px; }
.radio-group { display: flex; gap: 15px; }
.radio-group label { margin: 0; font-weight: normal; cursor: pointer; }

/* Tune Keys */
.tune-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.tune-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 24px;
}

.tune-item input[type=range] {
    -webkit-appearance: none;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 4px;
    height: 70px;
    background: #e0e0e0;
    border-radius: 2px;
    margin: 5px 0;
}

.tune-item input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #009688;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    margin-left: -5px;
}

.tune-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: monospace;
}

/* Visual Keyboard */
.keyboard-map {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f0f2f5;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    overflow-x: auto;
}

.kb-row { display: flex; gap: 4px; margin-bottom: 4px; white-space: nowrap; }
.kb-key {
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    color: #555;
}
.kb-key.active-map { background: var(--primary); color: white; border-color: var(--primary); }
.kb-key.pressed { background: #e74c3c; color: white; transform: scale(0.9); }

#customization {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding-top: 15px;
}
.color-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.grid-span-3 { grid-column: span 3; }
.grid-span-2 { grid-column: span 2; }

/* --- 手机端适配 (Settings) --- */
@media (max-width: 992px) {
    .options-grid { display: block; }
    fieldset { margin-bottom: 20px; width: 100%; box-sizing: border-box; }
    .grid-span-3, .grid-span-2 { grid-column: span 1; }
    .option-scheme, #visual-keyboard { display: none !important; }
    .tune-container {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 10px;
    }
    #main-container { padding: 20px; }
}


/* ==========================================================================
   5. Footer (V26 列表去点修复)
   ========================================================================== */

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border-color);
    padding: 50px 0 0 0;
    margin-top: 50px;
    text-align: center;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding: 50px 20px 40px 20px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.footer-col h4 {
    color: var(--text-main);
    margin-bottom: 20px;
    font-weight: 700;
}

/* V26 核心修复：暴力去除列表点 */
.footer-col ul {
    list-style: none !important; 
    padding: 0 !important;
    margin: 0 !important;
}

.footer-col li {
    list-style: none !important; /* 双重保险 */
    list-style-type: none !important;
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--primary);
}

/* 底部版权栏 */
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.02);
    margin-top: 20px;
}


/* ==========================================================================
   6. Modal & Sheet Music
   ========================================================================== */

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

.modal-card {
    background: var(--surface);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    position: relative;
}

.modal-header {
    background: var(--primary);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    flex: 1;
    text-align: left; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.modal-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 5px;
    transition: opacity 0.2s;
    flex: 0 0 auto;
    width: auto;
}

.modal-close:hover { opacity: 0.7; }
.modal-body { padding: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.score-list { list-style: none; padding: 0; margin: 0; }
.score-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}
.score-item:hover { background: var(--background); }
.score-icon { color: var(--primary); display: flex; align-items: center; }
.score-name { font-weight: 600; color: var(--text-main); font-size: 1rem; }
.empty-state { padding: 40px 20px; text-align: center; color: var(--text-muted); }

.score-scroll-wrapper {
    overflow-x: auto;
    white-space: nowrap;
    padding: 20px 10px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
    text-align: center;
    margin-top: 20px;
}

#sheet-render { display: inline-block; }

.n-node {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.2rem;
    color: #333;
    background: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    margin: 0 4px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    min-width: 30px;
    text-align: center;
    transition: all 0.2s;
}

.n-node.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.n-node.correct { background-color: #d4edda; color: #155724; border-color: #c3e6cb; }
.n-node.error { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; animation: shake 0.4s; }
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.sep { font-style: normal; color: #bbb; margin: 0 10px; font-size: 1.2rem; font-weight: 300; }

.score-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
    width: 100%;
}

.score-header-row h4 {
    margin: 0;
    flex: 1; 
    min-width: 0; 
    text-align: left; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.tiny-btn {
    padding: 4px 10px;
    font-size: 1rem;
    background: transparent;
    border: 1px solid #ccc;
    cursor: pointer;
    color: var(--text-muted);
    flex: 0 0 auto; 
    width: auto !important;
}

/* Theme Switcher */
.theme-switcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1002;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--text-main); 
    color: var(--surface);
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.theme-switcher i {
    font-style: normal;
    font-weight: bold;
    font-size: 0.8rem;
}