body {
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f5f5f7;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}
.container {
    /* max-width: 1600px; */
    width: 90%;
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}
h1, h2 {
    color: #333;
}
select, button {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
button {
    background-color: #4483c3;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}
button:hover {
    background-color: #3d76b0;
}

.info {
    margin: 20px 0;
}
.collapsible {
    background-color: #eee;
    color: #444;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
}
.active, .collapsible:hover {
    background-color: #ccc;
}
.content {
    padding: 0 10px;
    display: none;
    overflow: hidden;
    background-color: #f9f9f9;
}
.flex-container {
    display: flex;
    flex-direction: column;
    align-items: left;
    font-size: 14px;
}
.response {
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 10px;
    position:relative;
    gap: 10px;
}
/* 基础样式 */
.response-container {
    display: flex;
    gap: 5px; /* 元素间距 */
    margin: 5px;
}

.splitres {
    display: flex;
    flex: 1; /* 新增：使两个.splitres平分可用空间 */
    flex-direction: column; /* 如果您希望内部元素垂直排列 */
}

#inputtag, #outputtag {
    margin:0px
}

#whisper-response, #gpt-response {
    /* display: flex; */
    flex: 1; /* 使两个框平分可用空间 */
    min-height: 200px;
    max-height: 90vh; /* 最大高度，根据需要调整 */
    overflow-y: auto; /* 内容超出时显示滚动条 */
    border: 1px solid #a7a7a7; /* 边框，可根据需要调整 */
    border-radius: 10px;
    padding: 5px; /* 内边距 */
    font-size: 30px;
    position: relative;
    margin-block-start: 0px;
    margin-block-end: 0px;
}

#gpt-response p {
    margin-block-start: 0; /* 去掉段落的上边距 */
    margin-block-end: 0; /* 去掉段落的下边距 */
}

.fullscreen .response-container {
    flex-direction: row;
}

@media (max-width: 600px) {
    .response-container {
        flex-direction: column;
        gap: 5px;
    }
    #whisper-response, #gpt-response {
        margin: 0px;
        max-height: 45vh; /* 最大高度，根据需要调整 */
    }
    .fullscreen .response-container {
        flex-direction: column;
        gap: 5px
    }
    .fullscreen #whisper-response, 
    .fullscreen #gpt-response {
        width: 100%;
        max-height: 48vh; /* 各占高度的一半 */
        padding: 2px;
        margin: 0px;
    }
}

#fullscreenButton {
    width: auto;
    color: white;
    border: none;
    padding: 5px 5px;
    cursor: pointer;
}

#gpt-response:hover #copy-btn {
    display: block;
}
#copy-btn {
    display: none; /* 默认不显示，只有在 hover 时显示 */
    position: absolute;
    bottom: 5px; /* 调整到合适的位置 */
    right: 10px; /* 调整到合适的位置 */
    padding: 5px 10px; /* 按钮内边距 */
    font-size: 12px; /* 文字大小 */
    max-width: 60px;
    border: 1px solid #ccc; /* 示例边框 */
    cursor: pointer; /* 鼠标悬停时显示手形图标 */
}

#records {
    max-height: 400px;
    overflow-y: auto;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
}

#downloadButton, #summaryDownloadButton {
    width: auto;
    padding: 10px 20px;
    margin: 10px 5px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #4483c3;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

#downloadButton:hover, #summaryDownloadButton:hover {
    background-color: #3d76b0;
}

.button-container {
    display: flex;
    flex-direction: row; /* 修改为横向排列 */
    align-items: center; /* 保持子元素在容器中心对齐 */
    justify-content: space-between; /* 在水平方向上分散对齐 */
}

#connectButton {
    width: 75%; /* Connect按钮占据75%的宽度 */
    margin-right: 10px; /* 为了保持间距美观，添加右边距 */
}

#reConnectButton {
    width: 25%; /* Reset按钮占据25%的宽度 */
}

.switch {
    position: relative;
    display: inline-block;
    width: 43px; /* 缩小后的宽度 */
    height: 24px; /* 缩小后的高度 */
    margin-bottom: 8px; /* 调整边距以适应新尺寸 */
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px; /* 调整圆角以适应新高度 */
}

.slider:before {
    position: absolute;
    content: "";
    height: 19px; /* 缩小后的高度 */
    width: 19px; /* 缩小后的宽度 */
    left: 3px; /* 调整位置以适应新尺寸 */
    bottom: 3px; /* 调整位置以适应新尺寸 */
    background-color: white;
    transition: .4s;
    border-radius: 50%; /* 保持圆形 */
}

input:checked + .slider {
    background-color: #4483c3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #3d76b0;
}

input:checked + .slider:before {
    transform: translateX(19px); /* 调整移动距离以适应新尺寸 */
}

#whisper-audio-player {
    display: none; /* 初始隐藏 */
  }

  .query-button {
    display: inline-block;
    padding: 10px 20px;
    margin-top: 10px;
    background-color: #4483c3;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.query-button:hover {
    background-color: #3d76b0;
}

#todo-section {
    margin-top: 20px;
}

#toggle-todo-table {
    width: auto;
    padding: 10px 20px;
    margin-bottom: 10px;
}

#todo-table {
    width: 100%;
    border-collapse: collapse;
}

#todo-table th, #todo-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#todo-table th {
    background-color: #f2f2f2;
}

#todo-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

#todo-table tr:hover {
    background-color: #f5f5f5;
}

.header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.logo-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.company-logo {
    width: 80px;
    height: auto;
}

.title-info {
    text-align: left;
}

.title-info h1 {
    margin: 0;
    color: #333;
    font-size: 28px;
}

.company-info {
    color: #666;
}

.company-info p {
    margin: 5px 0;
    font-size: 14px;
}

/* 手机容器 */
.phone-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
}

.phone-frame {
    position: relative;
    width: 380px;
    height: 780px;
    background-color: #fafafa;
    border-radius: 40px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15), 
                0 0 0 1px rgba(0, 0, 0, 0.1), 
                inset 0 0 0 2px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.phone-notch {
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 30px;
    background-color: #000;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    z-index: 10;
}

.phone-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #fff;
    position: relative;
    padding: 45px 0 20px;
}

.phone-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 25px;
    font-size: 12px;
    margin-bottom: 10px;
}

.system-status {
    font-weight: 500;
}

.system-id {
    font-size: 11px;
    opacity: 0.7;
}

.phone-button {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 5px;
    background-color: #ddd;
    border-radius: 3px;
}

/* 主应用区域 */
.main-app {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* 应用顶栏 */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px;
    border-bottom: 1px solid #eee;
}

.app-logo {
    height: 30px;
    width: auto;
}

.app-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mode-select {
    font-size: 14px;
    padding: 5px;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    background-color: #f9f9f9;
    width: auto;
}

.connect-btn, .settings-btn {
    background-color: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #4483c3;
    transition: background-color 0.2s;
}

.connect-btn:hover, .settings-btn:hover {
    background-color: #f0f0f0;
}

/* 响应区域 */
.response {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 10px;
    background-color: #f8f8f8;
}

.language-indicator {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.response-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-bubble {
    position: relative;
    padding: 12px;
    border-radius: 18px;
    max-width: 90%;
    min-height: 50px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.input-bubble {
    align-self: flex-start;
    background-color: #e9e9eb;
    border-bottom-left-radius: 5px;
}

.output-bubble {
    align-self: flex-end;
    background-color: #dceafd;
    border-bottom-right-radius: 5px;
}

#whisper-response, #gpt-response {
    font-size: 16px;
    line-height: 1.4;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
    margin: 0;
}

#whisper-audio-player, #tts-audio-container audio {
    width: 100%;
    height: 30px;
    margin-top: 10px;
}

#copy-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(255,255,255,0.7);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#copy-btn:hover {
    opacity: 1;
}

/* 底部工具栏 */
.app-footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 20px;
    border-top: 1px solid #eee;
    background-color: #fff;
}

.footer-btn {
    background-color: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

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

.record-btn {
    background-color: #4483c3;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.2s, background-color 0.2s;
}

.record-btn:hover {
    transform: scale(1.05);
}

.record-btn.recording {
    background-color: #e74c3c;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 设置面板 */
.settings-panel {
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 100;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.settings-panel.show {
    right: 0;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.settings-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-settings, .close-panel {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-section h4 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #4483c3;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.settings-item label {
    font-size: 14px;
}

.settings-item select {
    width: 60%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.settings-info {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
}

.settings-info p {
    margin: 5px 0;
}

#custom-prompt {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    resize: vertical;
}

/* 历史记录面板 */
.history-panel {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 80%;
    background-color: #fff;
    z-index: 100;
    transition: bottom 0.3s ease;
    display: flex;
    flex-direction: column;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}

.history-panel.show {
    bottom: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

#records {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.record {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #eee;
}

.record p {
    margin: 5px 0;
    font-size: 14px;
}

.record audio {
    width: 100%;
    height: 30px;
    margin: 5px 0;
}

.panel-footer {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    border-top: 1px solid #eee;
}

#downloadButton, #summaryDownloadButton {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

#downloadButton:hover, #summaryDownloadButton:hover {
    background-color: #e9e9e9;
}

/* 待办事项部分 */
#todo-section {
    margin-top: 15px;
}

#toggle-todo-table {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    width: auto;
    margin: 0 auto;
}

#todo-table-container {
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#todo-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    font-size: 12px;
}

#todo-table th, #todo-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

#todo-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

/* 媒体查询 */
@media (max-width: 480px) {
    .phone-frame {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        box-shadow: none;
    }
    
    .phone-notch {
        display: none;
    }
    
    .phone-content {
        padding-top: 20px;
    }
    
    .phone-button {
        display: none;
    }
}