
.metronomediv {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.bpm-zone {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 2rem 0;
    border-radius: 3px;
    border: 1px solid transparent;
    transition: border-color 0.3s, background 0.3s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    border-color: rgba(245, 158, 11, 0.2);
    background: rgba(245, 158, 11, 0.03);
    overflow: hidden;
    background-image: linear-gradient(rgb(253 233 208 / 38%) 1px, transparent 1px), linear-gradient(90deg, rgb(253 233 208 / 38%) 1px, transparent 1px);
    background-size: 60px 60px;
}

.night .bpm-zone{
    border:1px solid #444;
    background-color: #181a1b;
    background-image: linear-gradient(rgb(68 68 68 / 40%) 1px, transparent 1px), linear-gradient(90deg, rgb(68 68 68 / 40%) 1px, transparent 1px);
}

.bpm-zone:active {
    transform: scale(0.985);
}

.bpm-zone .hint {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 10px;
    color: #72717a;
    opacity: 0;
    transition: opacity 0.3s;
    letter-spacing: 0.5px;
}

.bpm-zone:hover .hint {
    opacity: 0.6;
}

.bpm-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 4rem;
    font-weight: 400;
    line-height: 1;
    transition: color 0.12s;
    user-select: none;
    position: relative;
}

.bpm-number.flash {
    color: #f59e0b;
}

.bpm-label {
    font-size: 11px;
    font-weight: 500;
    color: #72717a;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-top: -2px;
}

.tempo-name {
    font-size: 14px;
    color: #f59e0b;
    font-weight: 500;
    min-height: 18px;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 2px solid #f59e0b;
    opacity: 0;
    pointer-events: none;
}

.pulse-ring.active {
    animation: pulseOut 0.5s ease-out forwards;
}

@keyframes pulseOut {
    0% {
        transform: translate(-50%, -50%) scale(0.6);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.6);
        opacity: 0;
    }
}

.beat-indicators {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    padding: 10px 0 8px;
    flex-wrap: wrap;
    min-height: 30px;
}

.beat-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2a2a33;
    transition: background 0.08s, transform 0.08s, box-shadow 0.08s, opacity 0.2s;
}

.night .beat-dot{
    background-color: #aaa;
}

.beat-dot.active {
    background: #f59e0b;
}

.beat-dot.downbeat.active {
    background: #03A9F4;
}

.beat-dot.muted-beat {
    opacity: 0.25;
}

.beat-dot.muted-beat.active {
    background: #72717a;
    transform: scale(1.1);
    box-shadow: none;
    opacity: 0.4;
}

.beat-dot.muted-beat.downbeat.active {
    background: #72717a;
    transform: scale(1.15);
    box-shadow: none;
    opacity: 0.45;
}


.controls-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.card {
    border: 1px solid #eee;
    border-radius: 3px;
    padding: 0.5rem 0.5rem 0.75rem 0.5rem;
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.ch-left span {
    font-size: 0.6rem;
}

.ch-val {
    font-size: 0.6rem;
    text-align: right;
}


.sound-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.sound-grid button {
    padding: 0.45rem 0.2rem;
    border-radius: 3px;
    border: 1px solid #eee;
    background: transparent;
    color: #72717a;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
}

.night .sound-grid button{
    color: #aaa;
    border: 1px solid #444;
    background-color: #181a1b;
}

.sound-grid button.active {
    color: #f59e0b;
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

.layui-form-switch{
    margin-top: 0;
}

.switchjiaoti{
    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
    display: flex;
    align-items: center;
    align-content: center;
    flex-wrap: nowrap;
    justify-content: space-between;
}

@media (max-width: 1130px) {
    .sound-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1013px) {
    .sound-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 886px) {
    .sound-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 760px) {
    .sound-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 440px) {
    .controls-grid {
        grid-template-columns: 1fr;
    }
}