@import url('./calc-common.css');

/* ===== 白噪音混音台专属样式 ===== */

/* ---- 播放器深色沉浸区 ---- */
.wnm-player {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #14182d 0%, #1a1e38 50%, #101226 100%);
    color: #eef1ff;
    border: 1px solid rgba(255,255,255,0.06);
}

.wnm-glow {
    position: absolute;
    top: -100px;
    right: -60px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.22) 0%, rgba(139,92,246,0.10) 40%, transparent 70%);
    pointer-events: none;
    filter: blur(24px);
    animation: wnm-float 12s ease-in-out infinite;
}
@keyframes wnm-float {
    0%, 100% { transform: translate(0,0) scale(1); }
    50% { transform: translate(-30px, 20px) scale(1.08); }
}

/* ---- 顶栏 ---- */
.wnm-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
    z-index: 1;
}
.wnm-bar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
}
.wnm-bar-icon { font-size: 22px; }

.wnm-master {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wnm-master-label {
    font-size: 12.5px;
    font-weight: 700;
    color: rgba(238,241,255,0.85);
    white-space: nowrap;
}
.wnm-master-slider { width: 140px; }
.wnm-master-val {
    font-size: 13px;
    font-weight: 800;
    color: #a5b4fc;
    min-width: 28px;
    text-align: right;
}

.wnm-master-toggle {
    width: 42px;
    height: 24px;
    border-radius: 99px;
    border: none;
    background: rgba(255,255,255,0.14);
    cursor: pointer;
    position: relative;
    transition: background 0.2s ease;
    flex: none;
}
.wnm-master-toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.wnm-master-toggle[aria-pressed="true"] {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.wnm-master-toggle[aria-pressed="true"] .wnm-master-toggle-knob {
    transform: translateX(18px);
}

/* ---- 通道卡片网格 ---- */
.wnm-channels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}
.wnm-card {
    position: relative;
    border-radius: 16px;
    padding: 16px 16px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(6px);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.wnm-card:hover {
    border-color: rgba(255,255,255,0.14);
    transform: translateY(-2px);
}
.wnm-card.is-on {
    border-color: rgba(129,140,248,0.4);
    background: rgba(99,102,241,0.08);
}
.wnm-card-glow {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: radial-gradient(circle at 20% 20%, rgba(129,140,248,0.12), transparent 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.wnm-card.is-on .wnm-card-glow { opacity: 1; }

.wnm-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.wnm-card-icon { font-size: 24px; }
.wnm-card-name {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

/* 开关 */
.wnm-toggle {
    width: 38px;
    height: 22px;
    border-radius: 99px;
    border: none;
    background: rgba(255,255,255,0.14);
    cursor: pointer;
    position: relative;
    transition: background 0.2s ease;
    flex: none;
}
.wnm-toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
}
.wnm-toggle[aria-pressed="true"] {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.wnm-toggle[aria-pressed="true"] .wnm-toggle-knob {
    transform: translateX(16px);
}

/* 声波动画 */
.wnm-wave {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
    height: 18px;
    margin-bottom: 12px;
    padding: 0 4px;
}
.wnm-wave span {
    flex: 1;
    height: 3px;
    border-radius: 99px;
    background: rgba(255,255,255,0.18);
    transition: height 0.18s ease, background 0.2s ease;
}
.wnm-card.is-on .wnm-wave span {
    background: linear-gradient(to top, #818cf8, #a5b4fc);
    animation: wnm-wave 1.1s ease-in-out infinite;
}
.wnm-card.is-on .wnm-wave span:nth-child(2) { animation-delay: 0.12s; }
.wnm-card.is-on .wnm-wave span:nth-child(3) { animation-delay: 0.24s; }
.wnm-card.is-on .wnm-wave span:nth-child(4) { animation-delay: 0.36s; }
.wnm-card.is-on .wnm-wave span:nth-child(5) { animation-delay: 0.48s; }
.wnm-card.is-on .wnm-wave span:nth-child(6) { animation-delay: 0.60s; }
.wnm-card.is-on .wnm-wave span:nth-child(7) { animation-delay: 0.72s; }
@keyframes wnm-wave {
    0%, 100% { height: 4px; }
    50% { height: 14px; }
}

/* 音量 */
.wnm-vol {
    display: flex;
    align-items: center;
    gap: 10px;
}
.wnm-vol-slider { flex: 1; }
.wnm-vol-val {
    font-size: 12px;
    font-weight: 700;
    color: rgba(238,241,255,0.7);
    min-width: 24px;
    text-align: right;
}

/* ---- 通用滑条 ---- */
.wnm-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 99px;
    background: rgba(255,255,255,0.14);
    outline: none;
    cursor: pointer;
}
.wnm-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.12s ease;
}
.wnm-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.wnm-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.12s ease;
}
.wnm-slider::-moz-range-thumb:hover { transform: scale(1.15); }

/* ---- 预设 ---- */
.wnm-presets { margin-bottom: 20px; position: relative; z-index: 1; }
.wnm-presets-head {
    font-size: 13px;
    font-weight: 700;
    color: rgba(238,241,255,0.85);
    margin-bottom: 10px;
}
.wnm-presets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.wnm-preset {
    padding: 10px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: #eef1ff;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.16s ease;
}
.wnm-preset:hover {
    border-color: rgba(129,140,248,0.45);
    background: rgba(99,102,241,0.12);
}
.wnm-preset.is-active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}

/* ---- 定时器 ---- */
.wnm-timer { margin-bottom: 20px; position: relative; z-index: 1; }
.wnm-timer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.wnm-timer-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(238,241,255,0.85);
}
.wnm-timer-display {
    font-size: 12.5px;
    font-weight: 700;
    color: #a5b4fc;
    font-variant-numeric: tabular-nums;
}
.wnm-timer-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.wnm-timer-btn {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: #eef1ff;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.16s ease;
}
.wnm-timer-btn:hover {
    border-color: rgba(129,140,248,0.45);
    background: rgba(99,102,241,0.12);
}
.wnm-timer-btn--off:hover {
    border-color: rgba(52,211,153,0.45);
    background: rgba(52,211,153,0.12);
}
.wnm-timer-btn--cancel {
    margin-left: auto;
    color: rgba(238,241,255,0.6);
}
.wnm-timer-btn--cancel:hover {
    border-color: rgba(244,114,182,0.45);
    background: rgba(244,114,182,0.12);
    color: #f9a8d4;
}

/* ---- 操作按钮 ---- */
.wnm-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}
.wnm-act {
    flex: 1;
    min-width: 120px;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.16s ease;
    font-family: inherit;
}
.wnm-act-save {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 18px rgba(99,102,241,0.3);
}
.wnm-act-save:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(99,102,241,0.4); }
.wnm-act-load {
    background: rgba(255,255,255,0.08);
    color: #eef1ff;
}
.wnm-act-load:hover { background: rgba(255,255,255,0.14); }
.wnm-act-stop {
    background: rgba(244,114,182,0.1);
    color: #f9a8d4;
    border-color: rgba(244,114,182,0.25);
}
.wnm-act-stop:hover { background: rgba(244,114,182,0.2); }

.wnm-status {
    font-size: 12.5px;
    color: rgba(238,241,255,0.6);
    text-align: center;
    min-height: 20px;
    position: relative;
    z-index: 1;
}

/* ---- 响应式 ---- */
@media (max-width: 860px) {
    .wnm-channels { grid-template-columns: repeat(2, 1fr); }
    .wnm-presets-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .wnm-channels { grid-template-columns: 1fr; }
    .wnm-presets-grid { grid-template-columns: 1fr 1fr; }
    .wnm-bar { flex-direction: column; align-items: stretch; }
    .wnm-master { justify-content: flex-end; }
    .wnm-master-slider { flex: 1; }
    .wnm-act { min-width: calc(50% - 5px); }
}
