.aacmp3-tool {
    --aacmp3-ink: #172033;
    --aacmp3-muted: #657287;
    --aacmp3-soft: #f6f9fc;
    --aacmp3-line: #dbe4ef;
    --aacmp3-card: #ffffff;
    --aacmp3-primary: #0f6fb5;
    --aacmp3-primary-dark: #0a4f82;
    --aacmp3-accent: #0d9488;
    --aacmp3-success: #15803d;
    --aacmp3-warning: #b7791f;
    --aacmp3-danger: #dc2626;
    --aacmp3-shadow: 0 16px 38px rgba(30, 48, 80, .10);
    color: var(--aacmp3-ink);
    width: 100%;
}

.aacmp3-tool * {
    box-sizing: border-box;
}

.aacmp3-tool button,
.aacmp3-tool input,
.aacmp3-tool select {
    font: inherit;
}

.aacmp3-banner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    border: 1px solid #cfe0f0;
    background: linear-gradient(135deg, rgba(15, 111, 181, .10), rgba(13, 148, 136, .08)), #fff;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.aacmp3-banner-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--aacmp3-primary);
}

.aacmp3-banner strong {
    display: block;
    font-size: 15px;
    margin-bottom: 3px;
}

.aacmp3-banner span {
    color: var(--aacmp3-muted);
    font-size: 13px;
    line-height: 1.55;
}

.aacmp3-engine {
    border: 1px solid rgba(15, 111, 181, .24);
    background: rgba(255, 255, 255, .76);
    color: var(--aacmp3-primary-dark) !important;
    border-radius: 999px;
    padding: 7px 10px;
    font-weight: 800;
    white-space: nowrap;
}

.aacmp3-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.aacmp3-tab {
    border: 1px solid var(--aacmp3-line);
    background: #fff;
    color: #18324f;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    text-align: left;
    min-height: 66px;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.aacmp3-tab:hover {
    border-color: rgba(15, 111, 181, .42);
    transform: translateY(-1px);
}

.aacmp3-tab.active {
    border-color: var(--aacmp3-primary);
    background: linear-gradient(180deg, #ffffff, #eef7fc);
    box-shadow: 0 10px 24px rgba(15, 111, 181, .14);
}

.aacmp3-tab.is-done .aacmp3-tab-index {
    background: var(--aacmp3-success);
    color: #fff;
}

.aacmp3-tab-index {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e7f1fa;
    color: var(--aacmp3-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.aacmp3-tab.active .aacmp3-tab-index {
    background: var(--aacmp3-primary);
    color: #fff;
}

.aacmp3-tab b {
    display: block;
    color: #102a43;
    font-size: 15px;
}

.aacmp3-tab small {
    display: block;
    color: var(--aacmp3-muted);
    font-size: 12px;
    margin-top: 2px;
}

.aacmp3-body {
    display: block;
}

.aacmp3-panel-tab {
    display: none;
}

.aacmp3-panel-tab.active {
    display: block;
}

.aacmp3-layout {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: 14px;
    align-items: start;
}

.aacmp3-panel {
    background: var(--aacmp3-card);
    border: 1px solid var(--aacmp3-line);
    border-radius: 8px;
    box-shadow: var(--aacmp3-shadow);
    overflow: hidden;
}

.aacmp3-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 16px;
    border-bottom: 1px solid #edf1f6;
    background: #f8fafc;
}

.aacmp3-title {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aacmp3-note {
    margin: 0;
    color: var(--aacmp3-muted);
    font-size: 13px;
    line-height: 1.6;
}

.aacmp3-panel-body {
    padding: 16px;
    display: grid;
    gap: 14px;
}

.aacmp3-drop {
    border: 2px dashed #b8c8da;
    border-radius: 8px;
    background: #f8fbfd;
    min-height: 220px;
    padding: 24px;
    text-align: center;
    display: grid;
    gap: 8px;
    place-items: center;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.aacmp3-drop:hover,
.aacmp3-drop.dragging {
    border-color: var(--aacmp3-primary);
    background: #eef7fc;
    transform: translateY(-1px);
}

.aacmp3-drop input {
    display: none;
}

.aacmp3-drop-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--aacmp3-primary);
    font-size: 28px;
}

.aacmp3-drop-main {
    font-weight: 900;
    font-size: 17px;
}

.aacmp3-drop-sub,
.aacmp3-inline-tip {
    color: var(--aacmp3-muted);
    font-size: 13px;
    line-height: 1.6;
}

.aacmp3-actions,
.aacmp3-actions-inline,
.aacmp3-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.aacmp3-nav {
    justify-content: space-between;
    border-top: 1px solid #edf1f6;
    padding-top: 12px;
}

.aacmp3-btn {
    border: 1px solid #cfd8e6;
    background: #fff;
    color: #24364b;
    border-radius: 7px;
    padding: 9px 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-weight: 900;
    min-height: 40px;
    transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease, opacity .18s ease;
}

.aacmp3-btn:hover {
    border-color: var(--aacmp3-primary);
    color: var(--aacmp3-primary-dark);
}

.aacmp3-btn:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.aacmp3-btn-primary {
    border-color: var(--aacmp3-primary);
    background: var(--aacmp3-primary);
    color: #fff;
}

.aacmp3-btn-primary:hover {
    background: var(--aacmp3-primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

.aacmp3-btn-success {
    border-color: var(--aacmp3-success);
    background: var(--aacmp3-success);
    color: #fff;
}

.aacmp3-btn-success:hover {
    color: #fff;
    filter: brightness(.96);
}

.aacmp3-btn-danger {
    border-color: #efb7b7;
    color: var(--aacmp3-danger);
}

.aacmp3-btn-warning {
    border-color: #e2c48b;
    color: var(--aacmp3-warning);
}

.aacmp3-stat-grid,
.aacmp3-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.aacmp3-stat,
.aacmp3-summary-item {
    border: 1px solid #e3eaf3;
    background: #fbfcff;
    border-radius: 8px;
    padding: 11px;
    text-align: center;
}

.aacmp3-stat-value,
.aacmp3-summary-item b {
    display: block;
    color: var(--aacmp3-ink);
    font-size: 16px;
    font-weight: 900;
}

.aacmp3-stat-label,
.aacmp3-summary-item span {
    display: block;
    color: var(--aacmp3-muted);
    font-size: 12px;
    margin-top: 4px;
}

.aacmp3-file-list {
    display: grid;
    gap: 9px;
    max-height: 372px;
    overflow: auto;
}

.aacmp3-file-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 32%);
    gap: 12px;
    align-items: center;
    border: 1px solid #e7edf5;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.aacmp3-file-name,
.aacmp3-result-name {
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aacmp3-file-meta,
.aacmp3-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    color: var(--aacmp3-muted);
    font-size: 12px;
}

.aacmp3-pill {
    border: 1px solid #dbe5ef;
    border-radius: 999px;
    padding: 3px 7px;
    background: #f8fafc;
}

.aacmp3-file-item audio {
    width: 100%;
    height: 34px;
}

.aacmp3-empty,
.aacmp3-more-note {
    border: 1px dashed #c8d5e5;
    background: #f8fafc;
    border-radius: 8px;
    color: var(--aacmp3-muted);
    padding: 16px;
    text-align: center;
    line-height: 1.6;
}

.aacmp3-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.aacmp3-form-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.aacmp3-field {
    display: grid;
    gap: 6px;
}

.aacmp3-field label {
    font-weight: 900;
    font-size: 13px;
    color: #344054;
}

.aacmp3-field input,
.aacmp3-field select {
    width: 100%;
    border: 1px solid #d7dfeb;
    border-radius: 7px;
    padding: 9px 10px;
    background: #fff;
    outline: none;
    min-height: 40px;
}

.aacmp3-field input:focus,
.aacmp3-field select:focus {
    border-color: var(--aacmp3-primary);
    box-shadow: 0 0 0 3px rgba(15, 111, 181, .12);
}

.aacmp3-range-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 10px;
    align-items: center;
}

.aacmp3-range-value {
    border: 1px solid #dbe5ef;
    border-radius: 999px;
    padding: 5px 8px;
    text-align: center;
    color: var(--aacmp3-primary-dark);
    font-size: 12px;
    font-weight: 900;
}

.aacmp3-quick-grid,
.aacmp3-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.aacmp3-quick,
.aacmp3-check {
    border: 1px solid var(--aacmp3-line);
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    color: var(--aacmp3-ink);
    text-align: left;
}

.aacmp3-quick {
    cursor: pointer;
}

.aacmp3-quick:hover {
    border-color: var(--aacmp3-primary);
    background: #f3f9fc;
}

.aacmp3-quick strong,
.aacmp3-check b {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.aacmp3-quick span,
.aacmp3-check small {
    display: block;
    color: var(--aacmp3-muted);
    font-size: 12px;
    line-height: 1.5;
}

.aacmp3-check {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 9px;
    cursor: pointer;
}

.aacmp3-check input {
    margin-top: 3px;
    accent-color: var(--aacmp3-primary);
}

.aacmp3-progress-wrap {
    display: none;
}

.aacmp3-progress-track {
    height: 26px;
    border-radius: 999px;
    background: #e7edf5;
    overflow: hidden;
}

.aacmp3-progress-bar {
    width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(90deg, var(--aacmp3-primary), var(--aacmp3-accent));
    font-size: 12px;
    font-weight: 900;
    transition: width .18s ease;
}

.aacmp3-status {
    min-height: 24px;
    color: var(--aacmp3-muted);
    font-size: 13px;
    line-height: 1.6;
}

.aacmp3-status.success {
    color: var(--aacmp3-success);
}

.aacmp3-status.error {
    color: var(--aacmp3-danger);
}

.aacmp3-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.aacmp3-result-card {
    border: 1px solid #e3eaf3;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.aacmp3-result-audio {
    background: #f7fafc;
    padding: 10px;
    border-bottom: 1px solid #edf1f6;
}

.aacmp3-result-audio audio {
    width: 100%;
}

.aacmp3-result-body {
    padding: 11px;
    display: grid;
    gap: 9px;
}

.aacmp3-error-list {
    display: grid;
    gap: 8px;
}

.aacmp3-error-item {
    border: 1px solid #f3c0c0;
    background: #fff7f7;
    color: var(--aacmp3-danger);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
}

.aacmp3-hidden {
    display: none !important;
}

@media (max-width: 980px) {
    .aacmp3-banner,
    .aacmp3-layout {
        grid-template-columns: 1fr;
    }
    .aacmp3-engine {
        justify-self: start;
    }
    .aacmp3-form-grid,
    .aacmp3-form-grid-two,
    .aacmp3-result-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .aacmp3-tabs,
    .aacmp3-stat-grid,
    .aacmp3-summary,
    .aacmp3-quick-grid,
    .aacmp3-check-grid {
        grid-template-columns: 1fr;
    }
    .aacmp3-panel-head,
    .aacmp3-nav,
    .aacmp3-file-item {
        display: grid;
        grid-template-columns: 1fr;
    }
    .aacmp3-panel-body,
    .aacmp3-panel-head,
    .aacmp3-drop {
        padding: 14px;
    }
    .aacmp3-btn {
        width: 100%;
    }
    .aacmp3-actions-inline {
        width: 100%;
    }
}
