:root {
    font-size: 26.667vw;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    padding-bottom: 1.5rem;
    /* 为底部控件留出空间 */
}

.call-controls {
    background-image: url('call-controls-bg.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 3rem;
    padding: 0.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
}

.status-text {
    position: absolute;
    top: -0.5rem;
    color: #333;
    font-size: 0.16rem;
    text-align: center;
}

.phone-control-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.phone-control-btn img {
    width: 0.5rem;
    height: 0.5rem;
}

.phone-control-btn:hover {
    transform: scale(1.05);
}

.phone-control-btn:hover {
    transform: scale(1.05);
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
    color: #ffffff;
    margin: 0;
    padding: 0;
    height: 100vh;
    box-sizing: border-box;
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
}

.avatar-section {
    position: relative;
    position: absolute;
    top: 1.8rem;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99;
}

.call-status {
    font-size: 16px;
    color: #333;
    font-weight: 400;
}

.middle-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 20px;
}

/* 左上角方言选择和声音选择 */
.top-left {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 12px;
    z-index: 999;
    pointer-events: auto;
}

/* 右上角按钮组 */
.top-actions {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 999;
    -webkit-user-select: none;
    user-select: none;
}

.action-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.action-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.action-button:active {
    transform: scale(0.95);
}

.action-button svg {
    width: 22px;
    height: 22px;
    stroke: #ffffff;
    stroke-width: 2.5;
    fill: none;
}

.action-button .emoji-icon {
    font-size: 22px;
    line-height: 1;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    max-width: 450px;
    width: 90%;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    font-size: 20px;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    height: 70vh;
    overflow-y: auto;
    margin-top: 5vh;
}
/* 添加一个占位元素来推动内容 */
.chat-messages .spacer {
    flex: 1;
    min-height: 0;
}
.message {
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 80%;
    white-space: pre-wrap;
    word-wrap: break-word;
    opacity: 0.5;
    transition: opacity 0.7s ease;
}

.message.user {
    background-color: #8E795C;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.message.assistant {
    color: #333333;
    line-height: 0.2rem;
    white-space: pre-line;
    background-color: #fff;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.chat-messages .message:nth-last-child(6) {
  opacity: .6;
}
.chat-messages .message:nth-last-child(5) {
  opacity: .6;
}
.chat-messages .message:nth-last-child(4) {
  opacity: .7;
}
.chat-messages .message:nth-last-child(3) {
  opacity: .7;
}
.chat-messages .message:nth-last-child(2) {
  opacity: .8;
}
.chat-messages .message:nth-last-child(1) {
  opacity: .9;
}
/* .chat-messages .message:nth-last-child(-n+2) {
  opacity: .9;
} */
/* 方言选择弹窗内的选项 */
.dialect-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 10px;
}

.dialect-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.dialect-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.dialect-option:active {
    transform: translateY(0);
}

.dialect-option.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.dialect-option-icon {
    font-size: 36px;
}

.dialect-option-name {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
}

/* 声音选项样式 */
.voice-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.voice-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.voice-option:active {
    transform: translateY(0);
}

.voice-option.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.speech-bubble {
    position: absolute;
    top: 28%;
    right: -0.9rem;
    transform: translateY(-50%);
    min-width: 0.96rem;
    padding: 0.14rem 0.12rem;
    background: #FFFFFF;
    border-radius: 0.14rem 0.14rem 0.14rem 0;
    box-shadow: 0 0.02rem 0.08rem rgba(0, 0, 0, 0.1);
}

.speech-text {
    color: #333333;
    line-height: 0.2rem;
    /* letter-spacing: 0.008rem; */
    white-space: pre-line;
    font-size: 0.12rem;
    text-align: left;
}

.voice-option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.voice-option-icon {
    font-size: 32px;
}

.voice-option-name {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    text-align: center;
}

.voice-speed-selector,
.voice-volume-selector {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 0 10px;
}

.voice-speed-label-container,
.voice-volume-label-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.voice-speed-label,
.voice-volume-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.voice-speed-value,
.voice-volume-value {
    font-size: 12px;
    color: rgba(102, 126, 234, 1);
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

.voice-speed-slider,
.voice-volume-slider {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.voice-speed-slider::-webkit-slider-thumb,
.voice-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.voice-speed-slider::-webkit-slider-thumb:hover,
.voice-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.5);
}

.voice-speed-slider::-moz-range-thumb,
.voice-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.voice-speed-slider::-moz-range-thumb:hover,
.voice-volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.5);
}

.voice-speed-slider::-webkit-slider-runnable-track,
.voice-volume-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(102, 126, 234, 0.3) 50%,
            rgba(255, 255, 255, 0.2) 100%);
    border-radius: 2px;
}

.voice-speed-slider::-moz-range-track,
.voice-volume-slider::-moz-range-track {
    width: 100%;
    height: 4px;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(102, 126, 234, 0.3) 50%,
            rgba(255, 255, 255, 0.2) 100%);
    border-radius: 2px;
}

.voice-preview-btn,
.voice-speed-test-btn {
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    /* width: 0;
            height: 0;
            border-top: 0.08rem solid transparent;
            border-bottom: 0.08rem solid transparent;
            border-left: 0.16rem solid #fff; */
}


.voice-preview-btn:hover,
.voice-speed-test-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.voice-preview-btn:active,
.voice-speed-test-btn:active {
    transform: scale(0.95);
}

.voice-preview-btn svg,
.voice-speed-test-btn svg {
    width: 0.2rem;
    height: 0.2rem;
}

.voice-preview-btn.playing,
.voice-speed-test-btn.playing {
    background: rgba(102, 126, 234, 0.5);
    animation: pulse 1s infinite;
}

.voice-action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 5px;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    text-align: center;
    flex-shrink: 0;
    padding-bottom: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    -webkit-user-select: none;
    user-select: none;
}


#start-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* // box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); */
}


#start-button.idle {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

/* #start-button.connecting {
            background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
        } */

#start-button.sayorbreak {
    background-image: url('say-or-break.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#start-button:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

#start-button:active {
    transform: scale(0.95);
}

.button-icon {
    width: 32px;
    height: 32px;
    color: white;
}

#audio-output {
    display: none;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.waveform-container {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 32px;
    justify-content: center;
}

.waveform-bar {
    width: 3px;
    border-radius: 2px;
    transition: height 0.1s ease;
    min-height: 4px;
    background-color: #ccc;
}

.mute-toggle {
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.mute-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.mute-toggle svg {
    width: 24px;
    height: 24px;
    color: white;
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast.error {
    background-color: #ef4444;
    color: white;
}

.toast.warning {
    background-color: #fbbf24;
    color: #1a1a1a;
}

.recommendations-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recommendations-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recommendations-list li {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: #ddd;
    transition: all 0.3s;
}

.recommendations-list li:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 音量监控信息区域 */
.volume-info-section {
    padding: 10px;
}

.volume-info-section .console-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.volume-info-section .console-line:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.volume-info-section .label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
}

.volume-info-section .value {
    font-weight: bold;
    color: #0f0;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

.volume-info-section .value.active {
    color: #ff0;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
    animation: blink 0.5s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .container {
        max-width: 100%;
    }




    .call-status {
        font-size: 14px;
    }

    .top-left,
    .top-actions {
        top: 15px;
    }

    .top-left {
        left: 15px;
    }

    .top-actions {
        right: 15px;
    }

    .action-button {
        width: 40px;
        height: 40px;
    }

    .action-button svg {
        width: 20px;
        height: 20px;
        stroke: white;
    }


    .modal-content {
        max-width: 95%;
        max-height: 80vh;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-body {
        padding: 15px;
    }

    .controls {
        padding: 15px;
    }

    #start-button {
        width: 45px;
        height: 45px;
    }

    .mute-toggle {
        width: 44px;
        height: 44px;
        bottom: 75px;
    }
}

/* 小屏幕手机适配 */
@media screen and (max-width: 375px) {
    .avatar {
        width: 120px;
        height: 120px;
        font-size: 36px;
    }

    .caller-name {
        font-size: 20px;
    }

    #start-button {
        width: 40px;
        height: 40px;
    }

    .pause-btn {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: none;
        background-color: transparent;
        background-image: url('pause-icon.png');
        background-size: 56%;
        background-position: center;
        background-repeat: no-repeat;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: transform .18s ease, box-shadow .18s ease;
        /* 若需要阴影或边框，可按需开启 */
        /* box-shadow: 0 6px 18px rgba(0,0,0,0.12); */
    }


    .top-actions {
        gap: 8px;
    }

    .action-button {
        width: 36px;
        height: 36px;
    }

    .action-button svg {
        width: 18px;
        height: 18px;
        stroke: white;
    }
}

/* 横屏适配 */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .avatar-section {
        padding: 50px 20px 20px;
    }



    .call-status {
        font-size: 13px;
    }

    .controls {
        padding: 10px;
        padding-bottom: 60px;
        gap: 10px;
    }
}

/* ==== ai-voice-config 拷贝过来的 ==== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 26.667vw;
}

body {
    font-family: 'Source Han Sans CN', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #F3F3F3;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://oss.eonvital.store/static/images/mini/h5/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    width: 100%;
    /* max-width: 3.75rem; */
    min-height: 9.99rem;
    margin: 0 auto;
    z-index: 1;
    padding-bottom: 1.2rem;
    /* 为固定底部按钮预留空间 */
}

.top-controls {
    position: absolute;
    top: 0.4rem;
    right: 0;
    width: 1rem;
    height: 0.46rem;
    z-index: 10;
    cursor: pointer;
}

.top-controls img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.control-btn {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.control-btn-language {
    left: 0;
}

.control-btn-voice {
    right: 0;
}


.avatar-wrapper {
    margin: 0 auto;
    width: 100%;
    position: relative;
    display: block;
}

.avatar-circle {
    width: 1.5rem;
    height: 1.5rem;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.audio-wave {
    position: absolute;
    bottom: 0.13rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.04rem;
    height: 0.13rem;
}

.wave-line {
    width: 0.01rem;
    background: #8E795C;
    transition: height 0.3s ease;
}

.wave-line:nth-child(1) {
    height: 0.056rem;
    opacity: 0.4;
}

.wave-line:nth-child(2) {
    height: 0.096rem;
    opacity: 0.6;
}

.wave-line:nth-child(3) {
    height: 0.126rem;
    opacity: 1;
}

.wave-line:nth-child(4) {
    height: 0.096rem;
    opacity: 0.6;
}

.wave-line:nth-child(5) {
    height: 0.056rem;
    opacity: 0.4;
}

.panel-wrapper {
    width: 3.55rem;
    margin: 0.3rem auto 0.2rem;
    position: relative;
}

.selection-panel {
    width: 100%;
    min-height: 5.27rem;
    padding: 0.2rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0.2rem;
    border: 0.01rem solid #FFFFFF;
    backdrop-filter: blur(0.1rem);
    -webkit-backdrop-filter: blur(0.1rem);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.selection-panel.show {
    transform: translateY(0);
    opacity: 1;
    max-height: 10rem;
    position: fixed;
    bottom: 1.2rem;
    z-index: 10;
}

/* 新增：固定高度的可滚动内容框 */
.selection-panel .selection-content {
    height: 4.6rem;
    /* 固定高度，根据需求调整 */
    max-height: 4.6rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.06rem;
    /* 避免纵向滚动条遮挡内容 */
}

.section-title {
    font-size: 0.14rem;
    color: #333333;
    margin-bottom: 0.12rem;
    letter-spacing: 0.007rem;
    font-weight: 400;
}

.dialect-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.08rem;
    margin-bottom: 0.3rem;
}

.dialect-btn {
    height: 0.32rem;
    background: #FFFFFF;
    border: 0.01rem solid rgba(0, 0, 0, 0.08);
    border-radius: 0.16rem;
    font-size: 0.12rem;
    color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.006rem;
}

.dialect-btn.active {
    background: #8E795C;
    color: #FFFFFF;
    border-color: #8E795C;
}

.dialect-btn:active {
    transform: scale(0.95);
}

.voice-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.1rem;
}

.voice-card {
    height: 0.84rem;
    background: #FFFFFF;
    border-radius: 0.15rem;
    border: 0.01rem solid rgba(0, 0, 0, 0.08);
    padding: 0.08rem 0.1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.voice-card.selected {
    background: rgba(206, 189, 173, 0.5);
    border-color: rgba(142, 121, 92, 0.3);
}

.voice-card:active {
    transform: scale(0.98);
}



.voice-name {
    font-size: 0.11rem;
    color: #333333;
    font-weight: 400;
    letter-spacing: 0.005rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slider-group {
    margin-bottom: 0.06rem;
    position: relative;
    padding-top: 0.15rem;
}

.slider-group:last-child {
    margin-bottom: 0;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.slider-label-text {
    font-size: 0.09rem;
    color: rgba(51, 51, 51, 0.7);
    letter-spacing: 0.003rem;
}

.slider-value {
    font-size: 0.09rem;
    color: #333333;
    font-weight: 500;
    letter-spacing: 0.003rem;
}

.slider {
    width: 100%;
    height: 0.04rem;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #CEBDAD 0%, #8E795C 50%, #CEBDAD 100%);
    border-radius: 0.02rem;
    display: block;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0.1rem;
    height: 0.1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #CEADAD 0%, #8E795C 100%);
    cursor: pointer;
    box-shadow: 0 0.01rem 0.03rem rgba(0, 0, 0, 0.3);
    margin-top: -0.03rem;
}

.slider::-moz-range-thumb {
    width: 0.1rem;
    height: 0.1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #CEADAD 0%, #8E795C 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 0.01rem 0.03rem rgba(0, 0, 0, 0.3);
    margin-top: -0.03rem;
}

.slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 0.04rem;
    background: linear-gradient(to right, #CEBDAD 0%, #8E795C 50%, #CEBDAD 100%);
    border-radius: 0.02rem;
}

.slider::-moz-range-track {
    width: 100%;
    height: 0.04rem;
    background: linear-gradient(to right, #CEBDAD 0%, #8E795C 50%, #CEBDAD 100%);
    border-radius: 0.02rem;
}

.call-button {
    width: 1.96rem;
    height: 0.4rem;
    background: #8E795C;
    border: none;
    border-radius: 0.2rem;
    color: #FFFFFF;
    font-size: 0.14rem;
    letter-spacing: 0.007rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0.03rem 0.03rem 0.06rem rgba(0, 0, 0, 0.12);
    /* 固定在底部 */
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0.36rem;
    z-index: 30;
}

.call-button:active {
    transform: scale(0.98);
    box-shadow: 0.02rem 0.02rem 0.04rem rgba(0, 0, 0, 0.12);
}

/* 默认隐藏 page2，点击 call-button 时显示 */
.page2 {
    display: none;
}

.page2.show {
    display: block;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 26.667vw;
}

body {
    font-family: 'Source Han Sans CN', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #F3F3F3;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://oss.eonvital.store/static/images/mini/h5/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    width: 100%;
    /* max-width: 3.75rem; */
    min-height: 9.99rem;
    margin: 0 auto;
    z-index: 1;
    padding-bottom: 1.2rem;
    /* 为固定底部按钮预留空间 */
}

.top-controls {
    position: absolute;
    top: 0.4rem;
    right: 0;
    width: 1rem;
    height: 0.46rem;
    z-index: 10;
    cursor: pointer;
}

.top-controls img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.control-btn {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.control-btn-language {
    left: 0;
}

.control-btn-voice {
    right: 0;
}

.status-section {
    text-align: center;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.avatar-wrapper {
    position: relative;
    display: inline-block;
}





.audio-wave {
    position: absolute;
    bottom: 0.13rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.04rem;
    height: 0.13rem;
}

.wave-line {
    width: 0.01rem;
    background: #8E795C;
    transition: height 0.3s ease;
}

.wave-line:nth-child(1) {
    height: 0.056rem;
    opacity: 0.4;
}

.wave-line:nth-child(2) {
    height: 0.096rem;
    opacity: 0.6;
}

.wave-line:nth-child(3) {
    height: 0.126rem;
    opacity: 1;
}

.wave-line:nth-child(4) {
    height: 0.096rem;
    opacity: 0.6;
}

.wave-line:nth-child(5) {
    height: 0.056rem;
    opacity: 0.4;
}

.panel-wrapper {
    width: 3.55rem;
    margin: 0.3rem auto 0.2rem;
    position: relative;
}

.selection-panel {
    width: 100%;
    min-height: 5.27rem;
    padding: 0.2rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0.2rem;
    border: 0.01rem solid #FFFFFF;
    backdrop-filter: blur(0.1rem);
    -webkit-backdrop-filter: blur(0.1rem);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.selection-panel.show {
    transform: translateY(0);
    opacity: 1;
    max-height: 10rem;
    position: fixed;
    bottom: 1.2rem;
    z-index: 10;
}

/* 新增：固定高度的可滚动内容框 */
.selection-panel .selection-content {
    height: 4.6rem;
    /* 固定高度，根据需求调整 */
    max-height: 4.6rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.06rem;
    /* 避免纵向滚动条遮挡内容 */
}

.section-title {
    font-size: 0.14rem;
    color: #333333;
    margin-bottom: 0.12rem;
    letter-spacing: 0.007rem;
    font-weight: 400;
}

.dialect-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.08rem;
    margin-bottom: 0.3rem;
}

.dialect-btn {
    height: 0.32rem;
    background: #FFFFFF;
    border: 0.01rem solid rgba(0, 0, 0, 0.08);
    border-radius: 0.16rem;
    font-size: 0.12rem;
    color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.006rem;
}

.dialect-btn.active {
    background: #8E795C;
    color: #FFFFFF;
    border-color: #8E795C;
}

.dialect-btn:active {
    transform: scale(0.95);
}

.voice-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.1rem;
}

.voice-card {
    height: 0.84rem;
    background: #FFFFFF;
    border-radius: 0.15rem;
    border: 0.01rem solid rgba(0, 0, 0, 0.08);
    padding: 0.08rem 0.1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.voice-card.selected {
    background: rgba(206, 189, 173, 0.5);
    border-color: rgba(142, 121, 92, 0.3);
}

.voice-card:active {
    transform: scale(0.98);
}

.voice-header {
    display: flex;
    align-items: center;
    gap: 0.06rem;
    min-width: 0;
    justify-content: space-between;
}

.voice-avatar {
    width: 0.24rem;
    height: 0.24rem;
    border-radius: 50%;
    background: #F0F0F0;
    flex-shrink: 0;
}

.voice-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.voice-name {
    font-size: 0.11rem;
    color: #333333;
    font-weight: 400;
    letter-spacing: 0.005rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slider-group {
    margin-bottom: 0.06rem;
    position: relative;
    padding-top: 0.15rem;
}

.slider-group:last-child {
    margin-bottom: 0;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.slider-label-text {
    font-size: 0.09rem;
    color: rgba(51, 51, 51, 0.7);
    letter-spacing: 0.003rem;
}

.slider-value {
    font-size: 0.09rem;
    color: #333333;
    font-weight: 500;
    letter-spacing: 0.003rem;
}

.slider {
    width: 100%;
    height: 0.04rem;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #CEBDAD 0%, #8E795C 50%, #CEBDAD 100%);
    border-radius: 0.02rem;
    display: block;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0.1rem;
    height: 0.1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #CEADAD 0%, #8E795C 100%);
    cursor: pointer;
    box-shadow: 0 0.01rem 0.03rem rgba(0, 0, 0, 0.3);
    margin-top: -0.03rem;
}

.slider::-moz-range-thumb {
    width: 0.1rem;
    height: 0.1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #CEADAD 0%, #8E795C 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 0.01rem 0.03rem rgba(0, 0, 0, 0.3);
    margin-top: -0.03rem;
}

.slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 0.04rem;
    background: linear-gradient(to right, #CEBDAD 0%, #8E795C 50%, #CEBDAD 100%);
    border-radius: 0.02rem;
}

.slider::-moz-range-track {
    width: 100%;
    height: 0.04rem;
    background: linear-gradient(to right, #CEBDAD 0%, #8E795C 50%, #CEBDAD 100%);
    border-radius: 0.02rem;
}

.call-button {
    width: 1.96rem;
    height: 0.4rem;
    background: #8E795C;
    border: none;
    border-radius: 0.2rem;
    color: #FFFFFF;
    font-size: 0.14rem;
    letter-spacing: 0.007rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0.03rem 0.03rem 0.06rem rgba(0, 0, 0, 0.12);
    /* 固定在底部 */
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0.36rem;
    z-index: 30;
}

.call-button:active {
    transform: scale(0.98);
    box-shadow: 0.02rem 0.02rem 0.04rem rgba(0, 0, 0, 0.12);
}

.pause-btn {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    border: none;
    background-color: transparent;
    background-image: url('pause-icon.jpg');
    background-size: 100%;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .18s ease, box-shadow .18s ease;
    /* 若需要阴影或边框，可按需开启 */
    /* box-shadow: 0 6px 18px rgba(0,0,0,0.12); */
}

.pause-btn.on {
    background-image: url('pause-icon.jpg');
}

.pause-btn.off {
    background-image: url('pause-start.jpg');
}

/* 默认隐藏 page2，点击 call-button 时显示 */
.page2 {
    display: none;
}

.page2.show {
    display: block;
}