/**
 *
 * 音乐搜索器 - CSS 文件
 * 配色参考 daohang 项目：简约毛玻璃卡片风格
 *
 * @author  MaiCong <i@maicong.me>
 * @link    https://github.com/maicong/music
 * @since   1.5.4
 *
 */

/* ===== Card ===== */
.card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 12px;
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ===== Tab Pills ===== */
.tab-pill {
    color: #64748b;
    background: transparent;
}
.tab-pill:hover {
    color: #334155;
}
.tab-pill.active {
    color: #4f46e5;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    font-weight: 600;
}

/* ===== Chip / Radio Buttons ===== */
.chip-item .chip-label {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    color: #475569;
    background: rgba(255, 255, 255, 0.70);
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.chip-item .chip-label:hover {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(79, 70, 229, 0.30);
    color: #4f46e5;
}
.chip-item input:checked ~ .chip-label {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.40);
    font-weight: 500;
}

/* ===== Form Input ===== */
.form-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.70);
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input::placeholder {
    color: rgba(71, 85, 105, 0.55);
}
.form-input:focus {
    border-color: rgba(79, 70, 229, 0.40);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    background: rgba(255, 255, 255, 0.92);
}

/* ===== Buttons ===== */
.btn {
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.70);
    color: #0f172a;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.btn:hover {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 2px rgba(15, 23, 42, 0.06), 0 18px 48px rgba(15, 23, 42, 0.10);
}
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.btn-accent {
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #4f46e5;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.btn-accent:hover {
    background: #4338ca;
    box-shadow: 0 2px 2px rgba(15, 23, 42, 0.07), 0 18px 48px rgba(15, 23, 42, 0.12);
}
.btn-accent:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.btn-accent:active {
    transform: scale(0.98);
}
.btn-accent:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== Alert Error ===== */
.alert-error {
    background: rgba(239, 68, 68, 0.08);
    color: #991b1b;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    border: 1px solid rgba(239, 68, 68, 0.20);
    animation: shake 0.3s ease-in-out;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ===== Result Fields ===== */
.result-field {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.70);
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.result-field:focus-within {
    border-color: rgba(79, 70, 229, 0.40);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.65rem;
    color: rgba(15, 23, 42, 0.35);
    flex-shrink: 0;
}
.result-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.5rem 0;
    font-size: 0.8rem;
    background: transparent;
    min-width: 0;
    color: #0f172a;
    font-family: "Cascadia Code", "Fira Code", "JetBrains Mono", Consolas, monospace;
}
.result-action {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.65rem;
    height: 2.25rem;
    color: rgba(15, 23, 42, 0.45);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
    flex-shrink: 0;
}
.result-action:hover {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.06);
}

/* ===== Help Toggle ===== */
.help-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.60);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    transition: background 0.15s, border-color 0.15s;
    list-style: none;
}
.help-toggle::-webkit-details-marker {
    display: none;
}
.help-toggle:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(15, 23, 42, 0.12);
}

/* ===== Code ===== */
.code {
    background: rgba(15, 23, 42, 0.05);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-family: "Cascadia Code", "Fira Code", "JetBrains Mono", Consolas, monospace;
}

/* ===== Music Overflow ===== */
.music-overflow {
    max-height: 140px;
    overflow: hidden;
    position: relative;
}
.music-overflow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.82));
    pointer-events: none;
    border-radius: 0 0 8px 8px;
}

/* ===== APlayer Overrides ===== */
.aplayer {
    padding: 8px !important;
    margin: 0 !important;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 10px !important;
}
.aplayer .aplayer-info .aplayer-music .aplayer-title,
.aplayer .aplayer-info .aplayer-music .aplayer-author {
    font-size: 14px !important;
    color: #0f172a !important;
}
.aplayer .aplayer-list ol li .aplayer-list-index {
    display: inline-block;
    width: 20px;
    text-align: right;
}
.aplayer .aplayer-lrc p {
    color: #4f46e5 !important;
}
.aplayer .aplayer-more {
    position: relative;
    font-size: 12px;
    padding: 6px 10px;
    margin-top: 8px;
    text-align: center;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s;
    border-radius: 6px;
}
.aplayer .aplayer-more:hover,
.aplayer .aplayer-more:active {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.06);
}
.aplayer.aplayer-withlrc .aplayer-pic {
    width: 110px !important;
    height: 110px !important;
    border-radius: 8px !important;
}
.aplayer.aplayer-withlrc .aplayer-info {
    margin-left: 110px !important;
    height: 110px !important;
}
.aplayer.aplayer-withlist .aplayer-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-bottom: 0 !important;
}
.aplayer.aplayer-withlist .aplayer-list {
    height: auto !important;
    padding-top: 16px;
    transition: none;
}
.aplayer.aplayer-withlist .aplayer-list-hide {
    padding: 0;
}

/* ===== Download Icon ===== */
.download-icon .icon-external { display: none; }
.download-icon .icon-download { display: inline; }
.icon-download { display: none; }

/* ===== Modal Dialog ===== */
.modal-dialog {
    border: none;
    padding: 0;
    max-width: 480px;
    width: calc(100% - 2rem);
    border-radius: 16px;
    box-shadow: 0 2px 2px rgba(15, 23, 42, 0.06), 0 18px 48px rgba(15, 23, 42, 0.10);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.modal-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(15, 23, 42, 0.45);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border: none;
    background: transparent;
}
.modal-close-btn:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* ===== Selection ===== */
::selection {
    background: rgba(79, 70, 229, 0.15);
    color: #0f172a;
}
