/* 输入区域 */
.chat-input-container {
    padding: 1px 15px;
    margin-top: auto;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    background-color: transparent;
    position: relative;
}

.io-grey-mode .chat-input-container {
    box-shadow: 0 -4px 6px -6px rgba(0, 0, 0, 0.05);
}

.io-black-mode .chat-input-container {
    box-shadow: 0 -4px 6px -6px rgba(0, 0, 0, 0.2);
}

.chat-input-area {
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chat-input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    transition: all 0.3s ease;
    border-radius: 12px;
}

.chat-input-wrapper:focus-within {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.chat-input-top {
    display: flex;
    align-items: center;
    padding: 7px 20px;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.chat-input-bottom {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 6px 16px;
    border-radius: 0 0 12px 12px;
    gap: 8px;
}

.chat-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
}


.io-grey-mode .chat-input-wrapper:focus-within {
    border-color: rgba(74, 122, 110, 0.4);
}

.io-black-mode .chat-input-wrapper {
    background-color: #3e3f42;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.io-black-mode .chat-input-wrapper:focus-within {
    border-color: rgba(58, 77, 71, 0.8);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 1rem;
    resize: none;
    padding: 10px 0;
    max-height: 200px;
    outline: none;
    line-height: 1.5;
    transition: all 0.2s ease;
    font-weight: 600;
    margin: 0 10px;
}

.io-grey-mode .chat-input {
    color: #2c2c2e;
}

.io-black-mode .chat-input {
    color: #ececf1;
}

.io-grey-mode .chat-input::placeholder {
    color: #6b6c7b;
}

.io-black-mode .chat-input::placeholder {
    color: #8e8ea0;
}

/* 发送按钮修改为实体按钮 */
.chat-send-btn {
    background-color: #4a7a6e;
    /* 更换为更柔和的灰绿色 */
    border: none;
    color: white;
    width: auto;
    min-width: 40px;
    height: 28px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chat-send-btn:hover {
    background-color: #396055;
    /* 较深的悬停颜色 */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 暗色模式下的按钮颜色调整 */
.io-black-mode .chat-send-btn {
    background-color: #3a4d47;
    /* 暗色模式下的按钮颜色 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.io-black-mode .chat-send-btn:hover {
    background-color: #2c3c38;
    /* 暗色模式下的悬停颜色 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.chat-send-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chat-send-btn i {
    font-size: 1.1rem;
    margin-right: 4px;
    /* 图标和文字之间的间隔 */
}

.send-text {
    font-weight: 500;
    /* 略微加粗 */
    letter-spacing: 0.5px;
    /* 字间距 */
}

/* 在移动设备上只显示图标 */
@media (max-width: 576px) {
    .chat-send-btn {
        border-radius: 30px;
    }
}

.input-footer-text {
    font-size: 0.75rem;
    opacity: 0.8;
    padding: 4px 10px;
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.io-black-mode .input-footer-text {
    background-color: rgba(255, 255, 255, 0.06);
}

/* 停止按钮样式 */
.chat-stop-btn {
    background-color: #ff4d4f;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 28px;
    transition: all 0.3s;
}

.chat-stop-btn:hover {
    background-color: #ff7875;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.chat-stop-btn i {
    font-size: 14px;
    margin-right: 4px;
}

.chat-stop-btn .stop-text {
    display: inline-block;
}

@media (max-width: 576px) {
    .chat-stop-btn .stop-text {
        display: none;
    }

    .chat-stop-btn {
        padding: 8px;
    }

    .chat-stop-btn i {
        margin-right: 0;
    }
}

/* 输入区域底部样式 */
.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    margin-bottom: 10px;
}

.input-footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-footer-right {
    font-size: 12px;
}

.current-model-container {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #666;
}

.io-black-mode .current-model-container {
    color: #aaa;
}

@media (max-width: 767px) {
    .input-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .input-footer-left {
        width: 100%;
        justify-content: space-between;
    }

    .input-footer-right {
        width: 100%;
        text-align: center;
    }

    .current-model-container {
        font-size: 12px;
    }
}


@media (max-width: 767px) {
    .custom-model-selector {
        font-size: 12px;
    }

    .model-display {
        padding: 4px 8px;
    }

    .model-display i {
        font-size: 14px;
    }

    .mic-btn {
        width: 32px;
        height: 32px;
    }

    .mic-btn i {
        font-size: 16px;
    }
}

/* 麦克风按钮样式 */
.mic-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    border: 1px solid #8f8c8c;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 8px;
}




.mic-btn i {
    font-size: 18px;
    color: #666;
}

.mic-btn.recording {
    background-color: #ff4d4f;
    border-color: #ff4d4f;
}

.mic-btn.recording i {
    color: white;
}

.mic-btn .ripple:nth-child(2) {
    animation-delay: 0.5s;
}

.mic-btn .ripple:nth-child(3) {
    animation-delay: 1s;
}

/* 声波动画 */
.mic-btn .wave-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}

.mic-btn.recording .wave-container {
    opacity: 1;
}

.mic-btn .sound-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(255, 77, 79, 0.8), rgba(255, 77, 79, 0));
    transform-origin: bottom;
    animation: sound-wave 0.5s infinite ease-in-out alternate;
}

@keyframes sound-wave {
    0% {
        transform: scaleY(0.2);
    }

    100% {
        transform: scaleY(0.8);
    }
}

/* 录音波形动画 */
.recording-waves {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 40px;
    transform: translateY(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
}


.recording-wave {
    width: 4px;
    height: 100%;
    margin: 0 3px;
    border-radius: 2px;
    background: linear-gradient(to top, #ff4d4f, #ff7875);
    animation: equalizer 0.8s infinite ease-in-out alternate;
    transform-origin: bottom;
}

.recording-wave:nth-child(1) {
    animation-delay: 0s;
}

.recording-wave:nth-child(2) {
    animation-delay: 0.2s;
}

.recording-wave:nth-child(3) {
    animation-delay: 0.4s;
}

.recording-wave:nth-child(4) {
    animation-delay: 0.6s;
}

.recording-wave:nth-child(5) {
    animation-delay: 0.8s;
}

.recording-wave:nth-child(6) {
    animation-delay: 1.0s;
}

.recording-wave:nth-child(7) {
    animation-delay: 1.2s;
}

@keyframes equalizer {
    0% {
        transform: scaleY(0.3);
    }

    100% {
        transform: scaleY(1);
    }
}

/* 录音提示 */
.recording-tip {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 20px;
    text-align: center;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    max-width: 90%;
    width: auto;
}

.recording-tip.show {
    display: block;
    animation: fadeInUp 0.3s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.recording-tip-text {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recording-tip-text:before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #ff4d4f;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse-dot 1.5s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-dot {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(0.8);
    }
}

/* 语音模式相关样式 */
.speech-mode-btn {
    display: none;
    height: 28px;
    border: 1px solid #8f8c8c;
    border-radius: 5px;
    padding: 0 10px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    color: #666;
    font-size: 12px;
    transition: all 0.3s;
    position: relative;
}

.speech-mode-btn:hover {
    background-color: #f0f0f0;
}

.speech-mode-btn:active {
    transform: scale(0.98);
    background-color: #e8e8e8;
}

.speech-mode-btn.recording {
    background-color: #ff4d4f;
    color: white;
    border-color: #ff4d4f;
}

.mic-btn.voice-mode-active {
    background-color: #1890ff;
    border-color: #1890ff;
}

.mic-btn.voice-mode-active i {
    color: white;
}

/* 麦克风图标转换动画 */
@keyframes micIconSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.mic-btn.switching i {
    animation: micIconSpin 0.5s ease-in-out;
}
