body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f4f4f9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 10px;
}
.container {
    width: 95%;
    max-width: 2000px;
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    min-height: calc(100vh - 20px);
    max-height: calc(100vh - 20px);
    overflow-y: auto;
}
h1, h2 {
    color: #333;
}
select, button {
    width: 100%;
    padding: 8px;
    margin: 5px 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 {
    margin-top: 10px;
    background-color: #f0f0f0;
    padding: 12px;
    border-radius: 10px;
    position: relative;
}
/* 基础样式 */
.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: 350px;
    max-height: calc(90vh - 150px);
    overflow-y: auto; /* 内容超出时显示滚动条 */
    border: 1px solid #a7a7a7; /* 边框，可根据需要调整 */
    border-radius: 10px;
    padding: 5px; /* 内边距 */
    font-size: 24px;
    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: flex-start;
    margin: 5px 0;
    width: 70%;
}

#percent {
    flex: 1;
    text-align: right;
    padding-right: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 5px 0;
}

#connectButton {
    width: 75%;
    margin-right: 10px;
    padding: 6px;
}

#reConnectButton {
    width: 25%;
    padding: 6px;
}

#modeSelect {
    margin: 5px 0;
    padding: 6px;
}

.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: left;
    padding: 8px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
}

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

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

.title-info {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 30px;
}

.title-info h1 {
    margin: 0;
    color: #333;
    font-size: 24px;
    white-space: nowrap;
}

.company-info {
    color: #666;
    display: flex;
    gap: 20px;
}

.company-info p {
    margin: 0;
    font-size: 14px;
    white-space: nowrap;
}

/* 优化响应区域的显示 */
.response {
    margin-top: 20px;
    background-color: #f0f0f0;
    padding: 15px;
    border-radius: 10px;
    position: relative;
}

#whisper-response, #gpt-response {
    min-height: 300px;
    max-height: calc(90vh - 200px);
    font-size: 24px;
}

/* 大屏幕适配 */
@media (min-width: 1600px) {
    body {
        padding: 5px;
    }
    
    .container {
        width: 98%;
        min-height: calc(100vh - 10px);
        max-height: calc(100vh - 10px);
    }
    
    #whisper-response, #gpt-response {
        min-height: 500px;
        max-height: calc(90vh - 180px);
        font-size: 28px;
    }
}

/* 移动设备适配 */
@media (max-width: 600px) {
    body {
        padding: 5px;
    }
    
    .container {
        min-height: calc(100vh - 10px);
        max-height: calc(100vh - 10px);
    }
    .title-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .company-info {
        flex-direction: column;
        gap: 5px;
    }
    
    #whisper-response, #gpt-response {
        min-height: 250px;
        max-height: calc(90vh - 120px);
        font-size: 20px;
    }
    .control-row {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    .button-container {
        width: 100%;
    }
    
    #percent {
        text-align: left;
        padding: 0;
    }
}

#downloadWavButton, #downloadOriginalButton {
    margin-left: 10px;
    padding: 6px;
    width: auto;
}

.button-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    margin: 5px 0;
    width: 70%;
    gap: 10px;
}

#connectButton {
    width: 75%;
    padding: 6px;
}

#reConnectButton {
    width: 25%;
    padding: 6px;
}

/* 移动设备适配 */
@media (max-width: 600px) {
    .button-container {
        flex-wrap: wrap;
        width: 100%;
    }
    
    #downloadWavButton, #downloadOriginalButton {
        margin-left: 0;
        flex: 1 1 auto;
    }
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.product-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s;
}

.product-item:hover {
    transform: translateY(-5px);
}

.product-item img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 10px;
}

.product-name {
    font-size: 16px;
    font-weight: bold;
    margin: 10px 0;
    color: #333;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 18px;
    color: #4483c3;
    font-weight: bold;
    margin: 5px 0;
}

.product-aisle {
    background: #e8f4fd;
    padding: 5px 10px;
    border-radius: 15px;
    color: #4483c3;
    font-weight: bold;
    margin: 5px 0;
}

.product-score {
    margin: 5px 0;
}

.product-reason {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
    padding: 0 10px;
}

/* Add color coding based on score */
.product-item[data-score="10"] {
    border: 2px solid #4caf50;
}

.product-item[data-score="0"] {
    border: 2px solid #f44336;
}

.score-10 {
    color: #4caf50;
}

.score-0 {
    color: #f44336;
}