.app-container {
    position: relative;
    z-index: 1;
    margin: 0 auto;
    border-radius: 3px;
}

.main-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.card {
    border-radius: 3px;
    padding: 0.5rem;
    position: relative;
    min-width: 0;
    border: 1px solid #eee;
}

.night .card {
    background: #181a1b;
    border: 1px solid #444;
}

.card-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.cardisss{
    border: 1px solid #eee;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.night .cardisss{
    background: #0e0e15;
    border: 1px solid #444;
}

.gaugeCanvasdiv{
    width: 100%;
    max-width: 13rem;
    margin: auto;
}

#gaugeCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

.mode-selector {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    width: 100%;
    flex-direction: column;
    border: 1px solid #1f1f2e;
    background-color: #16161e;
    border-radius: 6px;
    padding: 0.75rem;
}

.mode-group {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.mode-label {
    font-size: 0.6rem;
    color: #6b7a90;
    white-space: nowrap;
    letter-spacing: 0.3px;
    width: 2.5rem;
}

.mode-selector select,
.mode-group>div {
    flex: 1;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid #2a3a54;
    color: #6b7a90;
    padding: 0.25rem 0 0.25rem 0.3rem;
    border-radius: 3px;
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.mode-selector option {
    background: #0f1725;
    color: #e8ecf4;
}

.sensitivity-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6rem;
    color: #6b7a90;
    width: 100%;
    justify-content: space-between;
}

.sensitivity-group label {
    white-space: nowrap;
    font-size: 0.6rem;
}

.sensitivity-group input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    background: #1e293b;
    border-radius: 2px;
    outline: none;
    min-width: 0;
}

.sensitivity-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00e68a;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0, 230, 138, 0.4);
}

.sens-val {
    color: #00e68a;
    min-width: 2.4rem;
    text-align: right;
    font-size: 0.5rem;
    flex-shrink: 0;
}

#micSelect {
    max-width: 100%;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;   /* 防止选项文本换行撑高 */
}

.db-value-display {
    text-align: center;
    position: relative;
    z-index: 2;
}

.db-number {
    font-size: 1.4rem;
    color: #eee;
    line-height: 1;
    transition: color 0.3s;
}

.night .db-number{
    color: #444;
}

.control-area {
    margin-top: 0.5rem;
    flex-wrap: wrap;
    border: 1px solid #eee;
    margin-bottom: 0.5rem;
    border-radius: 3px;
}

.night .control-area {
    border: 1px solid #444;
    background-color: #0e0e15;
}

.action-bar button:last-child{
    float: right;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.5rem;
    color: #6b7a90;
    position: absolute;
    top: 0.7rem;
    right: 0.75rem;
}

.status-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #6b7a90;
    transition: background 0.3s;
}

.status-dot.active {
    background: #00e68a;
    box-shadow: 0 0 8px rgba(0, 230, 138, 0.4);
    animation: statusPulse 1.5s ease-in-out infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.waveform-wrapper {
    width: 100%;
    height: 143px;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #444;
    background: radial-gradient(ellipse at 15% 40%, rgba(249, 115, 22, .07) 0%, transparent 55%), radial-gradient(ellipse at 85% 20%, rgba(239, 68, 68, .04) 0%, transparent 50%), radial-gradient(ellipse at 50% 90%, rgba(251, 191, 36, .04) 0%, transparent 45%);
    background-color: #181a1b;
}

#waveformCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

.db-bar-seg {
    flex: 1;
    height: 2px;
    border-radius: 2px;
    background: #1e293b;
    transition: background 0.1s;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.stat-item {
    border-radius: 3px;
    padding: 0.6rem 0.2rem;
    text-align: center;
    border: 1px solid #eee;
}

.night .stat-item{
    border: 1px solid #444;
    background-color: #0e0e15;
}

.stat-label {
    font-size: 0.6rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1rem;
}

.history-canvas-wrapper {
    width: 100%;
    height: 90px;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.75rem;
    border: 1px solid #444;
    background: radial-gradient(ellipse at 15% 40%, rgba(249, 115, 22, .07) 0%, transparent 55%), radial-gradient(ellipse at 85% 20%, rgba(239, 68, 68, .04) 0%, transparent 50%), radial-gradient(ellipse at 50% 90%, rgba(251, 191, 36, .04) 0%, transparent 45%);
    background-color: #181a1b;
}

#historyCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

.calib-body-inner {
    padding: 0.25rem;
    margin: 0.5rem;
    border-radius: 3px;
    background-color: #242424;
}

.calib-step {
    border: 1px solid #444;
    padding: 0.5rem;
    border-radius: 3px;
    margin-bottom: 0.25rem;
}

.calib-step>div {
    margin-bottom: 0.25rem;
    color: #aaa;
}

.calib-step>div:last-child {
    margin-bottom: 0;
}

.calib-input-group {
    display: flex;
    align-items: center;
    border-radius: 3px;
    background-color: #181818;
    border: 1px solid #444;
}

.calib-input-group label {
    font-size: 0.6rem;
    color: #aaa;
    white-space: nowrap;
    background-color: #181818;
    border: 1px solid #181818;
    display: inline-block;
    padding: 0.3rem 0.5rem;
    border-right: 1px solid #444;
}

.calib-input-group input {
    flex: 1;
    border: 1px solid #181818;
    color: #e8ecf4;
    padding: 0.3rem 0.2rem;
    font-size: 0.6rem;
    background-color: #181818;
}

.calib-input-group .unit {
    font-size: 0.6rem;
    color: #aaa;
    white-space: nowrap;
    border: 1px solid #181818;
    padding: 0.3rem 0.2rem;
    background-color: #181818;
}

.calib-current-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0.4rem;
    border-radius: 3px;
    margin: 0 0 0.25rem 0;
    background-color: #181818;
    border: 1px solid #444;
}

.calib-current-row .label {
    font-size: 0.6rem;
    color: #aaa;
}

.calib-current-row .value {
    font-size: 0.6rem;
    color: #00e68a;
}

.calib-current-row .value.has-offset {
    color: #aaa;
}

.npowers{
    width: 30rem;
    padding: 0.5rem 0rem;
}

.npowers h4{
    height: 0.8rem;
    line-height: 0.8rem;
    padding-left: 0.5rem;
    font-size: 0.6rem;
}

.npowers h6{
    height: 0.8rem;
    line-height: 0.8rem;
    padding-left: 0.5rem;
    font-size: 0.6rem;
    color: #FF9800;
    margin-bottom: 0.6rem;
}

.npowers ul{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.npowers ul li{
    padding: 0.5rem;
}

.npowers ul li h5{
    font-size: 0.6rem;
    margin-bottom: 0.5rem;
}

.npowers ul li img{
    width: 100%;
    border: 1px solid #ccc;
}

.night .npowers ul li img{
    opacity: 0.8;
}

.npowers>p{
    font-size: 0.6rem;
    padding-left: 0.5rem;
    margin-top: 0.5rem;
}

.ref-div-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.6rem;
    display: flex;
    flex-direction: column;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #eee;
}

.night .ref-div-table{
    border: 1px solid #444;
}

.ref-div-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid #eee;
}

.ref-div-row.ref-header{
    color: #19baaa;
}

.night .ref-div-row{
    border-bottom: 1px solid #444;
}

.ref-div-row:last-child{
    border-bottom: 0;
}

.night .ref-div-row:last-child{
    border-bottom: 0;
}

.ref-div-row>div {
    padding: 10px 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ref-div-row>div:first-child{
    padding: 10px 3px 10px 10px;
}

.ref-div-row>div span{
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.beatalert .layui-layer-title {
    height: 1.8rem;
    line-height: 1.8rem;
    font-size: 0.6rem;
}

.beatalert .layui-layer-setwin {
    top: 0.5rem;
}

.beatalert .layui-layer-content {
    color: #34495e;
}

.night .beatalert .layui-layer-content {
    color: #ddd;
}

.layui-layer-page .layui-layer-btn {
    padding-top: 0 !important;
    padding-right: 0.25rem !important;
}

@media screen and (max-width: 1120px) {
    .main-grid {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 380px) {
    .cardisss {
        padding: 0.5rem 0.25rem 0.75rem 0.25rem;
    }
}