/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f7f7;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container for the two-column layout */
.container {
    display: flex;
    height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s ease, padding 0.3s ease;
    position: relative;
    overflow: visible;
}

.sidebar.collapsed {
    width: 60px;
    padding: 16px 8px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px 12px 8px;
    border-bottom: 1px solid #e0e0e0;
    min-height: 40px;
}

.sidebar.collapsed .sidebar-header {
    padding: 0 0 12px 0;
    justify-content: center;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-header h2 {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* 侧边栏控制按钮组 */
.sidebar-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar.collapsed .sidebar-controls {
    flex-direction: column;
    gap: 4px;
}

#collapse-sidebar-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    color: #666;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

#collapse-sidebar-btn:hover {
    background-color: #e9ecef;
    color: #333;
}

.sidebar.collapsed #collapse-sidebar-btn {
    transform: rotate(180deg);
}

/* 排序控件样式 */
.sort-controls {
    padding: 12px 8px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    margin: 0 -16px 16px -16px;
    opacity: 1;
    transition: opacity 0.2s ease, height 0.3s ease;
}

.sidebar.collapsed .sort-controls {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0 -8px 0 -8px;
    overflow: hidden;
}

.sort-controls label {
    display: block;
    font-size: 0.9em;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
}

#sort-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 0.9em;
    color: #333;
    transition: border-color 0.2s ease;
}

#sort-select:focus {
    outline: none;
    border-color: #3498db;
}

#add-project-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 1.4em;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

#add-project-btn:hover {
    background-color: #2980b9;
}

#project-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0 0;
    overflow-y: auto;
    transition: margin 0.3s ease;
}

.sidebar.collapsed #project-list {
    margin: 16px 0 0 0;
}

/* 移除冲突的 li 样式，现在使用 .project-item */

/* --- Project Item with Dropdown --- */
.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.project-item:hover {
    background-color: #f0f0f0;
}

.project-item.selected {
    background-color: #eaf4ff;
    font-weight: 500;
    color: #2980b9;
}

.project-item.focused {
    background-color: #f0f0f0;
}

.project-name {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.project-more-btn {
    opacity: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
    font-size: 12px;
    color: #666;
    margin-left: 8px;
    flex-shrink: 0;
}

.project-item:hover .project-more-btn,
.project-item.focused .project-more-btn {
    opacity: 1;
}

.project-more-btn:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* --- Project Dropdown Menu --- */
.project-dropdown {
    position: fixed;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 9999;
    min-width: 130px;
    overflow: hidden;
}

/* 向上显示的下拉菜单 */
.project-dropdown.dropdown-upward {
    box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
}

.project-dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85em;
}

.project-dropdown-item:last-child {
    border-bottom: none;
}

.project-dropdown-item:hover {
    background-color: #f8f9fa;
}

.project-dropdown-item.danger:hover {
    background-color: #fee;
    color: #e74c3c;
}

/* --- Project Inline Edit --- */
.project-name.editing {
    background-color: #fff;
    border: 1px solid #3498db;
    border-radius: 3px;
    padding: 2px 6px;
    outline: none;
    min-width: 120px;
    font-size: 0.95em;
}

/* 侧边栏折叠状态下的项目样式 */
.sidebar.collapsed .project-item {
    padding: 8px 4px;
    text-align: center;
    justify-content: center;
}

.sidebar.collapsed .project-name {
    font-size: 0;
}

.sidebar.collapsed .project-name::before {
    content: "📁";
    font-size: 16px;
    display: block;
}

.sidebar.collapsed .project-item.selected .project-name::before {
    content: "📂";
}

.sidebar.collapsed .project-more-btn {
    display: none;
}

/* 移除重复的样式规则，现在使用 .project-item 样式 */


/* Main Content Styles */
.main-content {
    flex-grow: 1;
    padding: 16px 32px;
    overflow-y: auto;
    background-color: #ffffff;
}

/* Project Header Layout */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.project-header h1 {
    margin: 0;
    font-size: 1.8em;
    font-weight: 700;
    line-height: 1.2;
    flex-grow: 1;
}

.project-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.project-status label {
    font-weight: 500;
    color: #555;
    font-size: 0.95em;
}

#project-status-select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 0.9em;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s ease;
    min-width: 120px;
}

#project-status-select:focus {
    outline: none;
    border-color: #3498db;
}

/* Project Description Section */
.project-description-section {
    margin-bottom: 16px;
}

.description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.description-header:hover {
    background-color: #f8f9fa;
}

.description-header h4 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #555;
}

.description-content {
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    max-height: 200px;
    padding: 12px 0;
}

.description-content.collapsed {
    max-height: 0;
    padding: 0;
}

.description-text {
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    min-height: 24px;
    color: #666;
    font-size: 0.95em;
    line-height: 1.4;
    cursor: text;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.description-text:hover {
    background-color: #f8f9fa;
    border-color: #e0e0e0;
}

.description-text:focus {
    outline: none;
    background-color: #fff;
    border-color: #3498db;
    color: #333;
}

.description-text:empty::before {
    content: "Click to add description...";
    color: #999;
    font-style: italic;
}

#project-details h1 {
    margin: 0 0 12px 0;
    font-size: 1.8em;
    font-weight: 700;
    line-height: 1.2;
}

#project-details p {
    color: #555;
    line-height: 1.4;
    margin: 4px 0;
    font-size: 0.95em;
}

#project-details h3 {
    margin: 16px 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
    font-size: 1.1em;
    font-weight: 600;
}

#revision-list {
    list-style: none;
    padding-left: 0;
    margin: 8px 0 12px 0;
    max-height: 180px;
    overflow-y: auto;
}

#revision-list li {
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 2px;
}

#revision-list li:hover {
    background-color: #f0f0f0;
}

#revision-list li.selected {
    background-color: #eaf4ff;
}

#add-revision-btn {
    margin: 8px 0 16px 0;
    width: 100%;
    text-align: center;
    border-style: dashed;
    color: #888;
    padding: 8px 12px;
    font-size: 0.9em;
}

#add-revision-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.inline-form {
    display: flex;
    gap: 8px;
    padding: 10px;
}

.inline-form input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px;
}

.inline-form button {
    flex-shrink: 0;
}

button {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    font-size: 0.9em;
}

button:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
}

#add-audio-btn {
    margin-top: 12px;
}

#asset-wrapper {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.asset-section {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 12px;
    background-color: #fff;
    position: relative;
}

#script-section { z-index: 10; }
#audio-section { z-index: 5; }

.asset-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    background-color: #fff;
    position: relative;
    z-index: 2;
}

.asset-header.collapsed {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.asset-header h4 {
    margin: 0;
    font-size: 1em;
    font-weight: 600;
}

.toggle-icon {
    font-size: 1.1em;
    font-weight: bold;
    color: #888;
}

.asset-content {
    padding: 12px;
    border-top: 1px solid #e0e0e0;
    max-height: none;
    overflow: visible;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.asset-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

/* --- Audio Takes Table --- */
.audio-takes-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.audio-takes-table thead {
    background-color: #f8f9fa;
}

.audio-takes-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e9ecef;
    font-size: 0.9em;
}

.audio-takes-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.audio-takes-table tbody tr:hover {
    background-color: #f8f9fa;
}

.audio-takes-table tbody tr:last-child td {
    border-bottom: none;
}

.take-number-cell {
    width: 60px;
    text-align: center;
    font-weight: 500;
    color: #666;
}

.take-name-cell {
    width: 180px;
    max-width: 180px;
    overflow: hidden;
}

.take-label {
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: block;
    width: 100%;
    word-break: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.take-label:hover {
    background-color: #e8f4fd;
    color: #2980b9;
}

.take-label.editing {
    cursor: text;
    background-color: #fff;
    border: 1px solid #3498db;
    outline: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.audio-player-cell {
    width: 250px;
}

.audio-player-cell audio {
    width: 100%;
    height: 32px;
}

.duration-cell {
    width: 70px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.actions-cell {
    width: 120px;
    text-align: center;
    padding-left: 8px;
    padding-right: 8px;
}

.delete-audio-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    color: #999;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-audio-btn:hover {
    background-color: #fee;
    color: #e74c3c;
}

.no-takes-message {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

.button-style-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #333;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    font-size: 0.9em;
    margin: 0;
    transition: background-color 0.2s ease;
    border: 1px solid #ccc;
    height: 36px;
    box-sizing: border-box;
}

.button-style-label:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
}

/* --- Remove old audio takes list styles --- */
.audio-take-list {
    display: none;
}

.audio-take-item {
    display: none;
}

/* Pell Editor Styles */
.pell {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    box-shadow: none;
    background-color: #fff;
}

.pell-actionbar {
    background-color: #f7f7f7;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    z-index: 1;
}

.pell-content {
    min-height: 150px;
    outline: none;
}

#save-script-btn {
    margin-top: 10px;
    background-color: #2ecc71;
    color: white;
    border: none;
}
#save-script-btn:hover {
    background-color: #27ae60;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25em;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.form-actions {
    text-align: right;
    margin-top: 24px;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    border: none;
}
.btn-primary:hover {
    background-color: #2980b9;
}
.btn-secondary {
    margin-left: 8px;
}

/* Tags Input Styles */
.tags-input-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px;
}

.tags-input-container input {
    border: none;
    outline: none;
    flex-grow: 1;
    padding: 2px;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    background-color: #e0e0e0;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.9em;
}

.tag-pill .remove-tag {
    margin-left: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1em;
}

.suggestions-panel {
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 150px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
}
.suggestion-item:hover, .suggestion-item.selected {
    background-color: #f0f0f0;
}

/* Toast Notification Styles */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.toast {
    background-color: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    background-color: #2ecc71;
}

.toast.error {
    background-color: #e74c3c;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- Audio Recording Controls --- */
.audio-controls-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.separator-text {
    font-size: 0.9em;
    color: #888;
    font-weight: 500;
}

#record-audio-btn {
    background-color: #e74c3c;
    color: white;
    border: 1px solid #e74c3c;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9em;
    height: 36px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}
#record-audio-btn:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}
#record-audio-btn:disabled {
    background-color: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

/* Microphone selection button */
#mic-select-btn {
    background-color: #3498db;
    color: white;
    border: 1px solid #3498db;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9em;
    height: 36px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-weight: 500;
}

#mic-select-btn.mic-default {
    background-color: #3498db;
    border-color: #3498db;
}

#mic-select-btn.mic-selected {
    background-color: #27ae60;
    border-color: #27ae60;
    font-weight: 600;
}

#mic-select-btn:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

#mic-select-btn.mic-selected:hover {
    background-color: #229954;
    border-color: #229954;
}

#mic-select-btn:disabled {
    background-color: #bdc3c7;
    border-color: #bdc3c7;
    cursor: not-allowed;
}

/* Microphone selection modal */
.mic-selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.mic-selection-modal {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.mic-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.mic-selection-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2em;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-modal-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.mic-selection-content {
    padding: 20px;
}

.mic-device-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mic-device-item {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-bottom: 10px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mic-device-item:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.mic-device-item.selected {
    border-color: #3498db;
    background-color: #e8f4f8;
}

.mic-device-icon {
    font-size: 1.2em;
    width: 24px;
    text-align: center;
}

.mic-device-info {
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.mic-device-name {
    font-weight: 500;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.mic-selection-actions {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.mic-test-btn {
    background-color: #f39c12;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    min-width: 60px;
}

.mic-test-btn:hover {
    background-color: #e67e22;
}

.mic-test-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.mic-selection-note {
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #555;
    border-radius: 0 4px 4px 0;
}

/* --- Revision Item with Dropdown --- */
.revision-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    margin-bottom: 2px;
}

.revision-item:hover {
    background-color: #f0f0f0;
}

.revision-item.selected {
    background-color: #eaf4ff;
}

.revision-item.focused {
    background-color: #f0f0f0;
}

.revision-name {
    flex-grow: 1;
    font-size: 0.95em;
}

.revision-more-btn {
    opacity: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
    font-size: 12px;
    color: #666;
    margin-left: 8px;
}

.revision-item:hover .revision-more-btn,
.revision-item.focused .revision-more-btn {
    opacity: 1;
}

.revision-more-btn:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* --- Revision Dropdown Menu --- */
.revision-dropdown {
    position: fixed;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 9999;
    min-width: 130px;
    overflow: hidden;
}

/* 向上显示的修订版下拉菜单 */
.revision-dropdown.dropdown-upward {
    box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
}

.revision-dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85em;
}

.revision-dropdown-item:last-child {
    border-bottom: none;
}

.revision-dropdown-item:hover {
    background-color: #f8f9fa;
}

.revision-dropdown-item.danger:hover {
    background-color: #fee;
    color: #e74c3c;
}

/* --- Revision Inline Edit --- */
.revision-name.editing {
    background-color: #fff;
    border: 1px solid #3498db;
    border-radius: 3px;
    padding: 2px 6px;
    outline: none;
    min-width: 120px;
    font-size: 0.95em;
}

/* --- Custom Confirmation Dialog --- */
.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    animation: fadeIn 0.2s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.confirmation-dialog {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    padding: 20px;
    max-width: 320px;
    min-width: 280px;
    text-align: center;
    position: relative;
    transform: scale(0.8) translateY(20px);
    animation: popIn 0.3s ease-out 0.1s forwards;
}

@keyframes popIn {
    to {
        transform: scale(1) translateY(0);
    }
}

.confirmation-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

.confirmation-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    line-height: 1.2;
}

.confirmation-message {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 6px;
    line-height: 1.4;
}

.confirmation-details {
    font-size: 12px;
    color: #e74c3c;
    background-color: #fdebee;
    border-radius: 6px;
    padding: 8px;
    margin: 12px 0;
    border-left: 3px solid #e74c3c;
    line-height: 1.3;
}

.confirmation-item-name {
    font-weight: 600;
    color: #2c3e50;
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    margin: 0 2px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
}

.confirmation-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
}

.confirmation-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    position: relative;
    overflow: hidden;
}

.confirmation-btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.confirmation-btn:hover:before {
    width: 100px;
    height: 100px;
}

.confirmation-btn.cancel {
    background-color: #6c757d;
    color: white;
}

.confirmation-btn.cancel:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

.confirmation-btn.delete {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.confirmation-btn.delete:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

.confirmation-btn:active {
    transform: translateY(0);
}

/* Different themes for different deletion types */
.confirmation-dialog.project-delete {
    border-top: 4px solid #e74c3c;
}

.confirmation-dialog.revision-delete {
    border-top: 4px solid #f39c12;
}

.confirmation-dialog.audio-delete {
    border-top: 4px solid #8e44ad;
}

/* Loading state */
.confirmation-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.confirmation-btn.loading:after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Voice Recognition Styles --- */
.voice-recognition-btn, .view-text-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    margin: 0 2px;
    border-radius: 3px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.voice-recognition-btn:hover {
    background-color: #e3f2fd;
    transform: scale(1.1);
}

.view-text-btn:hover {
    background-color: #f3e5f5;
    transform: scale(1.1);
}

/* Voice Recognition Loading States */
.voice-recognition-btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.voice-recognition-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    margin-left: -6px;
    border: 2px solid #3498db;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.voice-recognition-btn.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
}

/* Processing indicator for the button text */
.voice-recognition-btn.processing {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    animation: pulse-processing 2s infinite;
}

@keyframes pulse-processing {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.actions-cell {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    justify-content: center;
    flex-wrap: wrap;
}

/* Voice Recognition Modal Styles */
.voice-recognition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
    padding: 20px;
}

.voice-recognition-modal {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    animation: popIn 0.3s ease-out 0.1s forwards;
    box-sizing: border-box;
}

.voice-recognition-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
}

.voice-recognition-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.voice-recognition-header .close-modal-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.voice-recognition-header .close-modal-btn:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.voice-recognition-content {
    margin-bottom: 20px;
}

.voice-recognition-content label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.voice-recognition-content textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
    max-height: 300px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.voice-recognition-content textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.voice-recognition-content textarea[readonly] {
    background-color: #f8f9fa;
    cursor: default;
}

.voice-recognition-note {
    margin-top: 12px;
    padding: 12px;
    background-color: #e8f4fd;
    border-left: 4px solid #3498db;
    border-radius: 4px;
    font-size: 13px;
    color: #2c3e50;
    line-height: 1.4;
}

.voice-recognition-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 20px;
}

.voice-recognition-actions button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    flex-shrink: 0;
}

/* 小屏幕上的响应式设计 */
@media (max-width: 600px) {
    .voice-recognition-overlay {
        padding: 10px;
    }
    
    .voice-recognition-modal {
        padding: 20px;
        max-width: 100%;
        margin: 0;
    }
    
    .voice-recognition-actions {
        justify-content: center;
        flex-direction: column-reverse;
    }
    
    .voice-recognition-actions button {
        width: 100%;
        min-width: auto;
    }
}

.voice-recognition-actions .btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.voice-recognition-actions .btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.voice-recognition-actions .btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    box-shadow: 0 2px 8px rgba(149, 165, 166, 0.3);
}

.voice-recognition-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-1px);
}

.voice-recognition-actions .btn-cancel {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.voice-recognition-actions .btn-cancel:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
}

/* 文本处理下拉按钮样式 */
.text-processing-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 8px;
}

.text-processing-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    box-shadow: 0 2px 6px rgba(155, 89, 182, 0.3);
}

.text-processing-btn:hover {
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

.text-processing-btn:disabled {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.text-processing-btn .dropdown-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.text-processing-btn.open .dropdown-arrow {
    transform: rotate(180deg);
}

.text-processing-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    max-height: 300px;
    overflow-y: auto;
}

.text-processing-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.text-processing-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.text-processing-menu-item:last-child {
    border-bottom: none;
}

.text-processing-menu-item:hover {
    background-color: #f8f9fa;
}

.text-processing-menu-item.disabled {
    color: #bdc3c7;
    cursor: not-allowed;
}

.text-processing-menu-item.disabled:hover {
    background-color: transparent;
}

.text-processing-menu-item .item-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.text-processing-menu-item .item-text {
    flex: 1;
}

.text-processing-menu-item .item-description {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

/* 处理结果模态框样式 */
.text-processing-result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(3px);
}

.text-processing-result-modal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 90%;
    max-height: 80%;
    width: 700px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    position: relative;
}

.text-processing-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f8f9fa;
}

.text-processing-result-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.text-processing-result-content {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.text-processing-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.text-processing-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s ease;
}

.text-processing-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background-color: rgba(52, 152, 219, 0.05);
}

.text-processing-tab:hover:not(.active) {
    color: #495057;
    background-color: #f8f9fa;
}

.text-processing-tab-content {
    display: none;
}

.text-processing-tab-content.active {
    display: block;
}

.text-processing-text-area {
    width: 100%;
    min-height: 300px;
    max-height: 400px;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.text-processing-text-area:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.text-processing-text-area[readonly] {
    background-color: #f8f9fa;
    cursor: default;
}

.text-processing-save-status {
    padding: 12px;
    margin-bottom: 16px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.text-processing-result-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 16px;
}

.text-processing-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6c757d;
    font-size: 16px;
}

.text-processing-loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 移动端适配 */
@media (max-width: 600px) {
    .text-processing-result-modal {
        width: 95%;
        height: 90%;
        padding: 16px;
        border-radius: 8px;
    }
    
    .text-processing-dropdown {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }
    
    .text-processing-btn {
        width: 100%;
        justify-content: center;
    }
    
    .text-processing-result-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .text-processing-result-actions button {
        width: 100%;
    }
    
    .text-processing-tabs {
        overflow-x: auto;
        gap: 0;
    }
    
    .text-processing-tab {
        flex-shrink: 0;
        min-width: 80px;
        text-align: center;
    }
}

/* AI处理结果下拉列表样式 */
.ai-results-section {
    margin-bottom: 20px;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.ai-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ai-results-header h4 {
    margin: 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-results-dropdown {
    position: relative;
    min-width: 200px;
}

.ai-results-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.ai-results-btn:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.4);
}

.ai-results-btn:disabled {
    background: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ai-results-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    max-height: 300px;
    overflow-y: auto;
}

.ai-results-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ai-results-menu-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.ai-results-menu-item:last-child {
    border-bottom: none;
}

.ai-results-menu-item:hover {
    background-color: #f8f9fa;
}

.ai-results-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.ai-results-item-title {
    font-weight: 500;
    color: #212529;
    font-size: 14px;
}

.ai-results-item-type {
    background: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.ai-results-item-content {
    color: #6c757d;
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 4px;
}

.ai-results-item-date {
    color: #adb5bd;
    font-size: 11px;
}

.ai-results-empty {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.ai-results-refresh-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ai-results-refresh-btn:hover {
    background-color: #e9ecef;
    color: #495057;
}

/* 音频AI结果下拉按钮样式 */
.audio-ai-results-dropdown {
    position: relative;
    display: inline-block;
}

.audio-ai-results-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 34px;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.audio-ai-results-btn:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.4);
}

.audio-ai-results-btn:disabled {
    background: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.audio-ai-results-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 280px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    max-height: 250px;
    overflow-y: auto;
}

.audio-ai-results-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.audio-ai-results-menu.dropdown-upward {
    top: auto;
    bottom: 100%;
    transform: translateY(5px);
}

.audio-ai-results-menu.dropdown-upward.open {
    transform: translateY(0);
}

.audio-ai-results-loading {
    padding: 16px;
    text-align: center;
    color: #6c757d;
    font-size: 13px;
}

.audio-ai-results-empty {
    padding: 16px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    font-size: 13px;
}

.audio-ai-results-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.audio-ai-results-item:last-child {
    border-bottom: none;
}

.audio-ai-results-item:hover {
    background-color: #f8f9fa;
}

.audio-ai-results-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.audio-ai-results-item-title {
    font-weight: 500;
    color: #212529;
    font-size: 13px;
    flex: 1;
    margin-right: 8px;
}

.audio-ai-results-item-type {
    background: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

.audio-ai-results-item-content {
    color: #6c757d;
    font-size: 11px;
    line-height: 1.3;
    margin-bottom: 4px;
}

.audio-ai-results-item-date {
    color: #adb5bd;
    font-size: 10px;
}

.audio-ai-results-item-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #eee;
}

.ai-action-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    color: #666;
    min-width: 28px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-action-btn:hover {
    background-color: #f0f0f0;
    border-color: #999;
    transform: translateY(-1px);
}

.ai-action-btn.view-btn:hover {
    background-color: #e3f2fd;
    border-color: #2196f3;
}

.ai-action-btn.smooth-btn:hover {
    background-color: #f3e5f5;
    border-color: #9c27b0;
}

.ai-action-btn.custom-btn:hover {
    background-color: #fff3e0;
    border-color: #ff9800;
}

/* 紧凑修订模态框样式 */
.compact-revision-modal {
    max-width: 500px;
}

.compact-revision-modal .modal-content {
    padding: 20px;
}

.compact-revision-modal .modal-header h3 {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.compact-revision-modal .form-group {
    margin-bottom: 15px;
}

.compact-revision-modal .form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
    display: block;
}

.compact-revision-modal textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.compact-revision-modal textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.current-preview {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
}

.current-preview strong {
    font-size: 12px;
    color: #666;
    display: block;
    margin-bottom: 6px;
}

.preview-text {
    font-size: 11px;
    color: #777;
    line-height: 1.4;
    max-height: 60px;
    overflow-y: auto;
}

.compact-revision-modal .modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.compact-revision-modal .btn {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.compact-revision-modal .btn-primary {
    background-color: #007bff;
    color: white;
}

.compact-revision-modal .btn-primary:hover {
    background-color: #0056b3;
}

.compact-revision-modal .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.compact-revision-modal .btn-secondary:hover {
    background-color: #545b62;
}

/* 移动端适配 */
@media (max-width: 600px) {
    .ai-results-section {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .ai-results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .ai-results-header h4 {
        text-align: center;
    }
    
    .ai-results-dropdown {
        min-width: auto;
    }
    
    .audio-ai-results-menu {
        right: -50px;
        min-width: 250px;
    }
    
    .ai-action-btn {
        min-width: 26px;
        height: 22px;
        font-size: 11px;
    }
    
    .compact-revision-modal {
        max-width: 95%;
        margin: 10px;
    }
    
    .compact-revision-modal textarea {
        min-height: 60px;
        font-size: 12px;
    }
    
    .current-preview {
        padding: 8px;
    }
    
    .preview-text {
        max-height: 40px;
        font-size: 10px;
    }
}

.recorder-ui, .preview-ui {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #f9f9f9;
}

/* 确保录音UI默认隐藏 */
.recorder-ui,
.preview-ui {
    display: none !important;
}

/* 只有通过JavaScript明确设置display: block时才显示 */
.recorder-ui[style*="display: block"],
.preview-ui[style*="display: block"] {
    display: block !important;
}

.recorder-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.recording-indicator {
    width: 12px;
    height: 12px;
    background-color: #e74c3c;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.recorder-actions, .preview-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

#stop-recording-btn, #discard-recording-btn {
    background-color: #f0f0f0;
}

#save-recording-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
}
#save-recording-btn:hover {
    background-color: #27ae60;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

/* --- 移动端汉堡菜单按钮 --- */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    width: 45px;
    height: 45px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}

.mobile-menu-btn.active {
    background-color: #e74c3c;
    transform: rotate(90deg);
}

/* --- 移动端覆盖层 --- */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.mobile-overlay.active {
    opacity: 1;
}

/* =================================================================
   响应式设计 - 媒体查询
================================================================= */

/* 平板设备 (768px 到 1024px) */
@media screen and (max-width: 1024px) {
    .main-content {
        padding: 16px 20px;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .project-status {
        align-self: flex-end;
    }
    
    /* 音频表格调整 */
    .audio-takes-table th,
    .audio-takes-table td {
        padding: 10px 8px;
        font-size: 0.85em;
    }
    
    .take-name-cell {
        width: 140px;
        max-width: 140px;
    }
    
    .audio-player-cell {
        width: 200px;
    }
}

/* 小型平板设备 (768px 及以下) */
@media screen and (max-width: 768px) {
    /* 强制覆盖桌面端侧边栏样式 */
    .sidebar {
        position: fixed !important;
        left: -100% !important;
        top: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        margin-left: 0 !important;
        z-index: 1000 !important;
        transition: left 0.3s ease !important;
        background-color: #ffffff !important;
        box-shadow: 4px 0 20px rgba(0,0,0,0.25) !important;
        border-right: 3px solid #3498db !important;
        overflow-y: auto !important;
        padding: 16px !important;
        transform: translateX(0) !important;
    }
    
    .sidebar.collapsed {
        position: fixed !important;
        left: -100% !important;
        width: 280px !important;
        padding: 16px !important;
    }
    
    /* 显示移动端菜单按钮 */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar.mobile-open {
        left: 0 !important;
    }
    
    .sidebar.collapsed.mobile-open {
        left: 0 !important;
    }
    
    /* 主内容区域调整 */
    .main-content {
        width: 100vw;
        padding: 75px 16px 16px 16px;
        margin-left: 0;
        overflow-y: auto;
        height: auto;
        max-height: none;
        box-sizing: border-box;
        position: relative;
        left: 0;
    }
    
    /* 模态框调整 */
    .modal-content {
        width: 95%;
        max-width: 400px;
        padding: 20px;
        margin: 10px;
    }
    
    /* 项目标题响应式 */
    .project-header {
        margin-top: 15px;
        padding: 20px 16px 15px 16px;
        margin-left: -16px;
        margin-right: -16px;
        background-color: #ffffff;
        border-bottom: 1px solid #e9ecef;
    }
    
    .project-header h1 {
        font-size: 1.5em;
        margin: 0 50px 15px 0; /* 避免与汉堡菜单重叠，增加底部间距 */
        word-wrap: break-word;
        line-height: 1.3;
    }
    
    /* 项目状态在移动端的优化 */
    .project-status {
        margin-top: 15px;
        padding: 0;
    }
    
    .project-status label {
        font-size: 1em;
        font-weight: 500;
        margin-bottom: 8px;
        display: block;
    }
    
    #project-status-select {
        width: 100%;
        max-width: 200px;
        font-size: 16px;
        padding: 12px 16px;
    }
    
    /* 音频控制按钮组 */
    .audio-controls-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: 20px;
    }
    
    .audio-controls-container > * {
        width: 100%;
        min-height: 48px;
        box-sizing: border-box;
    }
    
    /* 确保按钮文本完整显示 */
    .button-style-label,
    #record-audio-btn,
    #mic-select-btn {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 12px 16px;
        font-size: 16px;
        font-weight: 500;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    #mic-select-btn {
        min-width: 120px;
        flex-shrink: 0;
    }
    
    #mic-select-btn.mic-selected {
        background-color: #27ae60 !important;
        border-color: #27ae60 !important;
        color: white !important;
    }
    
    .separator-text {
        text-align: center;
        font-weight: 600;
        color: #666;
        margin: 8px 0;
    }
    
    /* 表格响应式 - 在移动端隐藏桌面表格，显示卡片 */
    .audio-takes-table {
        display: none !important;
    }
    
    .audio-takes-mobile {
        display: block !important;
    }
    
    .audio-take-card {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 16px;
        background-color: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .audio-take-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid #f0f0f0;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .audio-take-number {
        background-color: #f8f9fa;
        color: #666;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.8em;
        font-weight: 500;
        flex-shrink: 0;
    }
    
    .audio-take-name {
        font-weight: 600;
        color: #2c3e50;
        flex-grow: 1;
        margin: 0 8px;
        cursor: pointer;
        padding: 8px 10px;
        border-radius: 4px;
        transition: background-color 0.2s ease;
        min-width: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: calc(100% - 140px);
    }
    
    .audio-take-name:hover {
        background-color: #e8f4fd;
        color: #2980b9;
    }
    
    .audio-take-name.editing {
        background-color: #fff;
        border: 1px solid #3498db;
        outline: none;
        max-width: none;
    }
    
    .audio-take-actions {
        display: flex;
        gap: 8px;
        align-items: center;
        flex-shrink: 0;
    }
    
    .audio-take-player {
        margin-bottom: 8px;
    }
    
    .audio-take-player audio {
        width: 100%;
        height: 40px;
    }
    
    .audio-take-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.85em;
        color: #666;
    }
    
    /* "无录音"消息 */
    .no-takes-message {
        text-align: center;
        padding: 40px 20px;
        color: #999;
        font-style: italic;
        background-color: #f8f9fa;
        border-radius: 8px;
        border: 2px dashed #ddd;
        display: block !important;
        width: 100%;
        box-sizing: border-box;
        margin: 10px 0;
    }
    
    /* 移动端音频容器样式 */
    .audio-takes-mobile {
        background-color: transparent;
        padding: 0;
    }
    
    /* 按钮触摸友好性 */
    button {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 1em;
    }
    
    .project-more-btn,
    .revision-more-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }
    
    /* 语音识别按钮 */
    .voice-recognition-btn,
    .view-text-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
        font-size: 18px;
    }
    
    /* 删除按钮 */
    .delete-audio-btn {
        min-width: 44px;
        min-height: 44px;
        font-size: 16px;
    }
    
    /* 表单元素 */
    input, textarea, select {
        min-height: 44px;
        font-size: 16px; /* 防止 iOS 缩放 */
    }
    
    .form-group input[type="text"],
    .form-group textarea {
        padding: 12px;
    }
    
    /* 描述和修订版本部分优化 */
    .project-description-section {
        margin: 20px 0;
        padding: 0 8px;
    }
    
    .description-header {
        padding: 16px 12px;
        margin: 0 -8px;
        background-color: #f8f9fa;
        border-radius: 8px;
    }
    
    .description-content {
        padding: 16px 12px;
        margin: 8px -8px 0 -8px;
    }
    
    #project-details {
        padding: 20px 8px;
    }
    
    #project-details h3 {
        margin: 25px 0 15px 0;
        padding: 12px 16px;
        background-color: #f8f9fa;
        border-radius: 8px;
        margin-left: -8px;
        margin-right: -8px;
        font-size: 1.2em;
    }
    
    #revision-list {
        padding: 0 8px;
        margin-top: 12px;
    }
    
    /* 项目列表触摸优化 */
    .project-item {
        padding: 16px 12px;
        min-height: 60px;
    }
    
    .revision-item {
        padding: 16px 12px;
        min-height: 56px;
        margin: 8px 0;
        border-radius: 8px;
        background-color: #ffffff;
        border: 1px solid #e9ecef;
    }
    
    .revision-item.selected {
        background-color: #e3f2fd;
        border-color: #2196f3;
    }
    
    .revision-name {
        font-size: 1em;
        line-height: 1.4;
    }
    
    /* Add Revision 按钮优化 */
    #add-revision-btn {
        margin: 16px 8px;
        padding: 16px;
        font-size: 1em;
        border-radius: 8px;
        border: 2px dashed #ccc;
        background-color: #f8f9fa;
        color: #666;
    }
    
    /* 资产区域移动端优化 */
    .asset-section {
        margin-bottom: 16px;
    }
    
    .asset-header {
        padding: 16px;
        min-height: 48px;
        display: flex;
        align-items: center;
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
        touch-action: manipulation;
    }
    
    /* 确保toggle-icon在移动端有足够的触摸区域 */
    .asset-header .toggle-icon {
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        background-color: transparent;
        transition: background-color 0.2s ease;
    }
    
    .asset-header:hover .toggle-icon,
    .asset-header:active .toggle-icon,
    .asset-header.touch-active .toggle-icon {
        background-color: rgba(52, 152, 219, 0.1);
    }
    
    /* 移动端触摸反馈 */
    .asset-header.touch-active {
        background-color: rgba(52, 152, 219, 0.05);
    }
    
    /* 移动端移除高度限制，允许完整显示内容，但保留折叠功能 */
    .asset-content:not(.collapsed) {
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    /* 确保折叠状态在移动端仍然有效 */
    .asset-content.collapsed {
        max-height: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
    }
    
    .asset-header h4 {
        font-size: 1.1em;
    }
    
    .toggle-icon {
        font-size: 1.3em;
        min-width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Toast 通知位置调整 */
    #toast-container {
        top: 80px;
        right: 16px;
        left: 16px;
        align-items: stretch;
    }
    
    .toast {
        border-radius: 6px;
        text-align: center;
        font-size: 14px;
        padding: 12px 16px;
    }
    
    /* Android Chrome 特定修复 */
    .container {
        position: relative;
        width: 100vw;
        overflow-x: hidden;
    }
    
    /* 确保侧边栏在非激活状态下完全隐藏 */
    .sidebar:not(.mobile-open) {
        left: -100% !important;
        transform: translateX(-10px) !important;
        visibility: hidden;
    }
    
    .sidebar.mobile-open {
        visibility: visible;
        transform: translateX(0) !important;
    }
    
    /* 强制隐藏桌面端样式 */
    body {
        overflow-x: hidden;
    }
    
    /* WebKit 特定修复 */
    @supports (-webkit-touch-callout: none) {
        .main-content {
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }
        
        .sidebar {
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }
    }
}

/* 手机设备 (480px 及以下) */
@media screen and (max-width: 480px) {
    /* 侧边栏宽度调整 */
    .sidebar {
        width: 100%;
        left: -100%;
    }
    
    /* 主内容更紧凑的间距 */
    .main-content {
        padding: 80px 12px 12px 12px;
    }
    
    /* 模态框全屏化 */
    .modal-overlay {
        padding: 0;
    }
    
    .modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        border-radius: 0;
        padding: 20px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }
    
    .modal-header {
        flex-shrink: 0;
    }
    
    /* 项目标题更小 */
    .project-header {
        padding: 16px 12px 12px 12px;
        margin-left: -12px;
        margin-right: -12px;
    }
    
    .project-header h1 {
        font-size: 1.3em;
        margin: 0 45px 12px 0;
    }
    
    .project-status {
        margin-top: 12px;
    }
    
    #project-details {
        padding: 16px 4px;
    }
    
    #project-details h1 {
        font-size: 1.3em;
        padding: 0 8px;
        margin-bottom: 20px;
    }
    
    #project-details h3 {
        margin: 20px 0 12px 0;
        padding: 10px 12px;
        margin-left: -4px;
        margin-right: -4px;
        font-size: 1.1em;
    }
    
    /* 描述部分在小屏幕上的调整 */
    .project-description-section {
        margin: 16px 0;
        padding: 0 4px;
    }
    
    .description-header {
        padding: 12px 10px;
        margin: 0 -4px;
    }
    
    .description-content {
        padding: 12px 10px;
        margin: 6px -4px 0 -4px;
    }
    
    #revision-list {
        padding: 0 4px;
    }
    
    .revision-item {
        padding: 14px 10px;
        margin: 6px 0;
    }
    
    #add-revision-btn {
        margin: 12px 4px;
        padding: 14px;
    }
    
    /* 按钮组垂直排列 */
    .form-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions button {
        width: 100%;
        margin: 0;
    }
    
    /* 录音控制界面优化 */
    .recorder-actions,
    .preview-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .recorder-actions button,
    .preview-actions button {
        width: 100%;
    }
    
    /* 强制显示录音按钮 - 确保任何情况下都可见 */
    .recorder-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        margin-top: 16px !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    #stop-recording-btn {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-height: 48px !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
        color: white !important;
        border: none !important;
        border-radius: 12px !important;
        padding: 14px 24px !important;
        margin: 8px 0 !important;
        width: 100% !important;
        box-shadow: 0 4px 16px rgba(231, 76, 60, 0.4) !important;
        transition: all 0.3s ease !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        position: relative !important;
        z-index: 999 !important;
    }
    
    #stop-recording-btn:hover {
        background: linear-gradient(135deg, #c0392b, #a93226) !important;
        transform: translateY(-2px) scale(1.02) !important;
        box-shadow: 0 8px 24px rgba(231, 76, 60, 0.6) !important;
    }
    
    /* 确保录音UI容器正确显示 */
    .recorder-ui {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 100 !important;
        background-color: rgba(255, 255, 255, 0.95) !important;
        border-radius: 12px !important;
        padding: 16px !important;
        margin: 16px 0 !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
        border: 2px solid rgba(231, 76, 60, 0.3) !important;
    }
    
    .recorder-status {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background-color: rgba(231, 76, 60, 0.1) !important;
        border: 1px solid rgba(231, 76, 60, 0.3) !important;
        border-radius: 8px !important;
        padding: 12px !important;
        margin-bottom: 16px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #e74c3c !important;
    }
    
    /* 音频卡片更紧凑 */
    .audio-take-card {
        padding: 12px;
    }
    
    /* 确认对话框调整 */
    .confirmation-dialog {
        max-width: 280px;
        min-width: 260px;
        margin: 20px;
    }
    
    .confirmation-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .confirmation-btn {
        width: 100%;
    }
    
    /* 语音识别模态框 */
    .voice-recognition-overlay {
        padding: 0;
    }
    
    .voice-recognition-modal {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
        padding: 20px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }
    
    .voice-recognition-content {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }
    
    .voice-recognition-content textarea {
        flex-grow: 1;
        min-height: 200px;
    }
    
    /* 麦克风选择模态框 */
    .mic-selection-overlay {
        padding: 0;
    }
    
    .mic-selection-modal {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }
    
    .mic-device-item {
        padding: 16px 12px;
        margin-bottom: 8px;
    }
    
    /* 这部分已移动到文件底部，此处删除重复代码 */
    
    /* 录音状态显示优化 */
    .recorder-status {
        margin-bottom: 12px;
        padding: 8px;
        background-color: #f8f9fa;
        border-radius: 6px;
        text-align: center;
    }
    
    /* 确保停止按钮始终可见 */
    #stop-recording-btn {
        min-height: 44px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        background-color: #e74c3c !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        padding: 12px 24px !important;
        margin: 8px 0 !important;
        width: 100% !important;
        box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3) !important;
        transition: all 0.2s ease !important;
    }
    
    #stop-recording-btn:hover {
        background-color: #c0392b !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4) !important;
    }
    
    #stop-recording-btn:active {
        transform: translateY(0) scale(1) !important;
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4) !important;
    }
    
    /* 预览UI按钮优化 */
    #save-recording-btn {
        min-height: 44px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        background-color: #2ecc71 !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        padding: 12px 24px !important;
        margin: 4px 0 !important;
        width: 100% !important;
        box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3) !important;
        transition: all 0.2s ease !important;
    }
    
    #save-recording-btn:hover {
        background-color: #27ae60 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4) !important;
    }
    
    #discard-recording-btn {
        min-height: 44px !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        background-color: #95a5a6 !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        padding: 12px 24px !important;
        margin: 4px 0 !important;
        width: 100% !important;
        box-shadow: 0 2px 8px rgba(149, 165, 166, 0.3) !important;
        transition: all 0.2s ease !important;
    }
    
    #discard-recording-btn:hover {
        background-color: #7f8c8d !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(149, 165, 166, 0.4) !important;
    }
    
    /* 录音预览音频播放器优化 */
    #recording-preview {
        width: 100% !important;
        margin: 12px 0 !important;
        height: 44px !important;
        border-radius: 8px !important;
    }
    
    /* Pell 编辑器调整 */
    .pell-content {
        min-height: 120px;
        font-size: 16px;
    }
    
    /* 标签输入优化 */
    .tags-input-container {
        padding: 12px;
    }
    
    .tag-pill {
        padding: 8px 12px;
        font-size: 1em;
        margin-bottom: 4px;
    }
}

/* 超小屏幕设备 (320px 及以下) */
@media screen and (max-width: 320px) {
    .main-content {
        padding: 80px 6px 6px 6px;
    }
    
    .project-header {
        padding: 14px 8px 10px 8px;
        margin-left: -6px;
        margin-right: -6px;
    }
    
    .project-header h1 {
        font-size: 1.2em;
        margin: 0 40px 10px 0;
    }
    
    .project-status {
        margin-top: 10px;
    }
    
    #project-details {
        padding: 14px 2px;
    }
    
    #project-details h1 {
        padding: 0 6px;
        margin-bottom: 16px;
    }
    
    #project-details h3 {
        margin: 16px 0 10px 0;
        padding: 8px 10px;
        margin-left: -2px;
        margin-right: -2px;
        font-size: 1.05em;
    }
    
    .project-description-section {
        margin: 14px 0;
        padding: 0 2px;
    }
    
    .description-header {
        padding: 10px 8px;
        margin: 0 -2px;
    }
    
    .description-content {
        padding: 10px 8px;
        margin: 4px -2px 0 -2px;
    }
    
    #revision-list {
        padding: 0 2px;
    }
    
    .revision-item {
        padding: 12px 8px;
        margin: 4px 0;
    }
    
    #add-revision-btn {
        margin: 10px 2px;
        padding: 12px;
        font-size: 0.95em;
    }
    
    .modal-content {
        padding: 16px;
    }
    
    .audio-take-card {
        padding: 10px;
    }
    
    button {
        font-size: 0.9em;
        padding: 10px 12px;
    }
    
    /* 录音面板在超小屏幕的优化 */
    .recorder-ui, .preview-ui {
        margin: 8px 0;
        padding: 8px;
    }
    
    .recorder-status {
        padding: 6px;
        margin-bottom: 8px;
        font-size: 0.9em;
    }
    
    #stop-recording-btn,
    #save-recording-btn,
    #discard-recording-btn {
        min-height: 42px !important;
        font-size: 15px !important;
        padding: 10px 20px !important;
        margin: 4px 0 !important;
    }
    
    #recording-preview {
        height: 40px !important;
        margin: 8px 0 !important;
    }
}

/* 默认隐藏移动端专用元素 */
.audio-takes-mobile {
    display: none;
}

/* 桌面端显示表格，隐藏卡片 */
@media screen and (min-width: 769px) {
    .audio-takes-table {
        display: table !important;
    }
    
    .audio-takes-mobile {
        display: none !important;
    }
}

/* 全屏模式下的样式优化 - 确保录音按钮可见 */
@media screen and (max-width: 768px) {
    html:fullscreen .main-content,
    html:-webkit-full-screen .main-content,
    html:-moz-full-screen .main-content {
        height: 100vh !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    html:fullscreen .asset-content,
    html:-webkit-full-screen .asset-content,
    html:-moz-full-screen .asset-content {
        max-height: none !important;
        overflow-y: visible !important;
        flex-grow: 1 !important;
        padding-bottom: 80px !important; /* 确保底部有足够空间 */
    }
    
    html:fullscreen .audio-controls-container,
    html:-webkit-full-screen .audio-controls-container,
    html:-moz-full-screen .audio-controls-container {
        position: sticky !important;
        bottom: 20px !important;
        background-color: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        border-radius: 12px !important;
        padding: 16px !important;
        margin: 16px 0 !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
        z-index: 100 !important;
    }
    
    /* 全屏模式下的录音面板样式 */
    html:fullscreen .recorder-ui,
    html:-webkit-full-screen .recorder-ui,
    html:-moz-full-screen .recorder-ui,
    html:fullscreen .preview-ui,
    html:-webkit-full-screen .preview-ui,
    html:-moz-full-screen .preview-ui {
        position: sticky !important;
        bottom: 20px !important;
        background-color: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        border-radius: 16px !important;
        padding: 20px !important;
        margin: 16px 0 60px 0 !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25) !important;
        border: 2px solid rgba(52, 152, 219, 0.3) !important;
        z-index: 200 !important;
        max-width: calc(100vw - 32px) !important;
        box-sizing: border-box !important;
    }
    
    /* 全屏模式下录音状态样式 */
    html:fullscreen .recorder-status,
    html:-webkit-full-screen .recorder-status,
    html:-moz-full-screen .recorder-status {
        background-color: rgba(231, 76, 60, 0.1) !important;
        border: 2px solid #e74c3c !important;
        border-radius: 12px !important;
        padding: 16px !important;
        margin-bottom: 16px !important;
        text-align: center !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        color: #e74c3c !important;
    }
    
    /* 全屏模式下停止按钮特殊样式 */
    html:fullscreen #stop-recording-btn,
    html:-webkit-full-screen #stop-recording-btn,
    html:-moz-full-screen #stop-recording-btn {
        min-height: 56px !important;
        font-size: 20px !important;
        font-weight: 700 !important;
        background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
        color: white !important;
        border: none !important;
        border-radius: 16px !important;
        padding: 16px 32px !important;
        margin: 12px 0 !important;
        width: 100% !important;
        box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4) !important;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
    }
    
    html:fullscreen #stop-recording-btn:hover,
    html:-webkit-full-screen #stop-recording-btn:hover,
    html:-moz-full-screen #stop-recording-btn:hover {
        background: linear-gradient(135deg, #c0392b, #a93226) !important;
        transform: translateY(-3px) scale(1.02) !important;
        box-shadow: 0 12px 32px rgba(231, 76, 60, 0.6) !important;
    }
    
    html:fullscreen #stop-recording-btn:active,
    html:-webkit-full-screen #stop-recording-btn:active,
    html:-moz-full-screen #stop-recording-btn:active {
        transform: translateY(0) scale(1) !important;
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4) !important;
    }
}

/* 额外的全屏模式兼容性 */
@media screen and (max-width: 768px) {
    /* 检测全屏状态的备用方案 */
    body:fullscreen .main-content,
    body:-webkit-full-screen .main-content,
    body:-moz-full-screen .main-content {
        height: 100vh !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    body:fullscreen .asset-content,
    body:-webkit-full-screen .asset-content,
    body:-moz-full-screen .asset-content {
        max-height: none !important;
        overflow-y: visible !important;
        flex-grow: 1 !important;
        padding-bottom: 80px !important;
    }
    
    body:fullscreen .audio-controls-container,
    body:-webkit-full-screen .audio-controls-container,
    body:-moz-full-screen .audio-controls-container {
        position: sticky !important;
        bottom: 20px !important;
        background-color: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        border-radius: 12px !important;
        padding: 16px !important;
        margin: 16px 0 !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
        z-index: 100 !important;
    }
    
    /* 额外的安全措施 - 使用viewport高度变化检测 */
    .main-content {
        min-height: 100vh;
        min-height: 100dvh; /* 动态viewport高度 */
    }
    
    /* 确保音频控制按钮始终在可视区域内 */
    .asset-section {
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
    }
    
    .asset-content {
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
    }
    
    /* 音频控制区域的特殊处理 */
    .audio-controls-container {
        margin-top: auto !important; /* 推到底部 */
        flex-shrink: 0 !important; /* 不允许压缩 */
    }
}

/* 针对iOS Safari的特殊优化 */
@supports (-webkit-touch-callout: none) {
    @media screen and (max-width: 768px) {
        .main-content {
            min-height: -webkit-fill-available;
        }
        
        .audio-controls-container {
            position: -webkit-sticky !important;
            position: sticky !important;
            bottom: env(safe-area-inset-bottom, 20px) !important;
        }
    }
}

body:fullscreen .audio-controls-container,
body:-webkit-full-screen .audio-controls-container,
body:-moz-full-screen .audio-controls-container {
    position: sticky !important;
    bottom: 20px !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin: 16px 0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    z-index: 100 !important;
}

/* 备用全屏模式下的录音面板样式 */
body:fullscreen .recorder-ui,
body:-webkit-full-screen .recorder-ui,
body:-moz-full-screen .recorder-ui,
body:fullscreen .preview-ui,
body:-webkit-full-screen .preview-ui,
body:-moz-full-screen .preview-ui {
    position: sticky !important;
    bottom: 20px !important;
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    margin: 16px 0 60px 0 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25) !important;
    border: 2px solid rgba(52, 152, 219, 0.3) !important;
    z-index: 200 !important;
    max-width: calc(100vw - 32px) !important;
    box-sizing: border-box !important;
}

/* 备用全屏模式下录音状态样式 */
body:fullscreen .recorder-status,
body:-webkit-full-screen .recorder-status,
body:-moz-full-screen .recorder-status {
    background-color: rgba(231, 76, 60, 0.1) !important;
    border: 2px solid #e74c3c !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
    text-align: center !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #e74c3c !important;
}

/* 备用全屏模式下停止按钮特殊样式 */
body:fullscreen #stop-recording-btn,
body:-webkit-full-screen #stop-recording-btn,
body:-moz-full-screen #stop-recording-btn {
    min-height: 56px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    color: white !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 16px 32px !important;
    margin: 12px 0 !important;
    width: 100% !important;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

body:fullscreen #stop-recording-btn:hover,
body:-webkit-full-screen #stop-recording-btn:hover,
body:-moz-full-screen #stop-recording-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226) !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 12px 32px rgba(231, 76, 60, 0.6) !important;
}

body:fullscreen #stop-recording-btn:active,
body:-webkit-full-screen #stop-recording-btn:active,
body:-moz-full-screen #stop-recording-btn:active {
    transform: translateY(0) scale(1) !important;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4) !important;
}

body:fullscreen #stop-recording-btn:active,
body:-webkit-full-screen #stop-recording-btn:active,
body:-moz-full-screen #stop-recording-btn:active {
    transform: translateY(0) scale(1) !important;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4) !important;
}

/* 全屏模式下预览UI按钮样式 */
html:fullscreen #save-recording-btn,
html:-webkit-full-screen #save-recording-btn,
html:-moz-full-screen #save-recording-btn,
body:fullscreen #save-recording-btn,
body:-webkit-full-screen #save-recording-btn,
body:-moz-full-screen #save-recording-btn {
    min-height: 52px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, #2ecc71, #27ae60) !important;
    color: white !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 14px 28px !important;
    margin: 8px 0 !important;
    width: 100% !important;
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.4) !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

html:fullscreen #save-recording-btn:hover,
html:-webkit-full-screen #save-recording-btn:hover,
html:-moz-full-screen #save-recording-btn:hover,
body:fullscreen #save-recording-btn:hover,
body:-webkit-full-screen #save-recording-btn:hover,
body:-moz-full-screen #save-recording-btn:hover {
    background: linear-gradient(135deg, #27ae60, #229954) !important;
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow: 0 8px 24px rgba(46, 204, 113, 0.6) !important;
}

html:fullscreen #discard-recording-btn,
html:-webkit-full-screen #discard-recording-btn,
html:-moz-full-screen #discard-recording-btn,
body:fullscreen #discard-recording-btn,
body:-webkit-full-screen #discard-recording-btn,
body:-moz-full-screen #discard-recording-btn {
    min-height: 52px !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    background: linear-gradient(135deg, #95a5a6, #7f8c8d) !important;
    color: white !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 14px 28px !important;
    margin: 8px 0 !important;
    width: 100% !important;
    box-shadow: 0 4px 16px rgba(149, 165, 166, 0.4) !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

html:fullscreen #discard-recording-btn:hover,
html:-webkit-full-screen #discard-recording-btn:hover,
html:-moz-full-screen #discard-recording-btn:hover,
body:fullscreen #discard-recording-btn:hover,
body:-webkit-full-screen #discard-recording-btn:hover,
body:-moz-full-screen #discard-recording-btn:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d) !important;
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow: 0 8px 24px rgba(149, 165, 166, 0.6) !important;
}

/* 全屏模式下录音预览播放器样式 */
html:fullscreen #recording-preview,
html:-webkit-full-screen #recording-preview,
html:-moz-full-screen #recording-preview,
body:fullscreen #recording-preview,
body:-webkit-full-screen #recording-preview,
body:-moz-full-screen #recording-preview {
    width: 100% !important;
    height: 52px !important;
    margin: 16px 0 !important;
    border-radius: 12px !important;
    background-color: #f8f9fa !important;
    border: 2px solid rgba(52, 152, 219, 0.2) !important;
}

/* 录音时强制显示规则 - 只在录音UI显示时生效 */
.recorder-ui[style*="display: block"] .recorder-actions {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 999 !important;
}

/* 只在录音时强制显示停止按钮 */
.recorder-ui[style*="display: block"] #stop-recording-btn {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 44px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    margin: 8px 0 !important;
    width: 100% !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    position: relative !important;
    z-index: 9999 !important;
    overflow: visible !important;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4) !important;
    transition: all 0.3s ease !important;
}

.recorder-ui[style*="display: block"] #stop-recording-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.6) !important;
}

/* 只在录音时强制显示 recorder-ui */
.recorder-ui[style*="display: block"] {
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 100 !important;
    background-color: rgba(255, 255, 255, 0.98) !important;
    border: 2px solid rgba(231, 76, 60, 0.3) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin: 16px 0 !important;
    overflow: visible !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

/* 媒体查询中的额外强化 - 只在录音时生效 */
@media screen and (max-width: 768px) {
    .recorder-ui[style*="display: block"] #stop-recording-btn {
        min-height: 48px !important;
        font-size: 18px !important;
        padding: 14px 28px !important;
    }
    
    .recorder-ui[style*="display: block"] {
        position: sticky !important;
        bottom: 20px !important;
        z-index: 1000 !important;
    }
}

/* 录音状态下的容器空间扩展 */
.asset-content:has(.recorder-ui[style*="display: block"]),
.asset-content:has(.preview-ui[style*="display: block"]) {
    max-height: none !important;
    overflow: visible !important;
    min-height: calc(100vh - 300px) !important;
    padding-bottom: 120px !important;
}

/* 全屏模式下的容器扩展 */
html:fullscreen .asset-content,
html:-webkit-full-screen .asset-content,
html:-moz-full-screen .asset-content,
body:fullscreen .asset-content,
body:-webkit-full-screen .asset-content,
body:-moz-full-screen .asset-content {
    max-height: 100vh !important;
    overflow: visible !important;
    min-height: calc(100vh - 200px) !important;
    padding-bottom: 150px !important;
    height: auto !important;
}

/* 录音状态下主内容区域扩展 */
.main-content:has(.recorder-ui[style*="display: block"]),
.main-content:has(.preview-ui[style*="display: block"]) {
    min-height: 100vh !important;
    padding-bottom: 120px !important;
}

/* 全屏模式下主内容区域扩展 */
html:fullscreen .main-content,
html:-webkit-full-screen .main-content,
html:-moz-full-screen .main-content,
body:fullscreen .main-content,
body:-webkit-full-screen .main-content,
body:-moz-full-screen .main-content {
    height: 100vh !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
    padding-bottom: 150px !important;
}

/* 确保asset-wrapper也有足够空间 */
#asset-wrapper:has(.recorder-ui[style*="display: block"]),
#asset-wrapper:has(.preview-ui[style*="display: block"]) {
    min-height: calc(100vh - 400px) !important;
    overflow: visible !important;
}

/* 资产区域调整 */
.asset-content {
    padding: 8px;
}

/* 非折叠状态下移除高度限制 */
.asset-content:not(.collapsed) {
    max-height: none !important;
    overflow: visible !important;
    min-height: auto !important;
}

/* 确保折叠状态在移动端仍然有效 */
.asset-content.collapsed {
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
}

/* 确保录音和预览UI默认完全隐藏 */
.recorder-ui, .preview-ui {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    margin-top: 12px;
    margin-bottom: 20px;
    padding: 12px;
    max-width: 100%;
    box-sizing: border-box;
}

/* 只有在明确显示时才显示录音UI */
.recorder-ui[style*="display: block"], 
.preview-ui[style*="display: block"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 全屏模式下的样式调整 */
body.fullscreen-mode {
    overflow: hidden;
}

body.fullscreen-mode .page-header,
body.fullscreen-mode .sidebar,
body.fullscreen-mode .mobile-menu {
    display: none !important;
}

body.fullscreen-mode .main-content {
    margin-left: 0 !important;
    padding: 20px;
}

body.fullscreen-mode .audio-takes-table {
    width: 100%;
}

body.fullscreen-mode .audio-takes-table th,
body.fullscreen-mode .audio-takes-table td {
    padding: 12px 8px;
    font-size: 14px;
}

/* 全屏模式下actions列的按钮排列 */
body.fullscreen-mode .audio-take-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

body.fullscreen-mode .audio-take-actions button {
    min-width: 32px;
    height: 32px;
    padding: 4px;
    font-size: 14px;
}

body.fullscreen-mode .actions-cell {
    min-width: auto;
}

/* 全屏模式下的AI结果下拉按钮调整 */
body.fullscreen-mode .audio-ai-results-dropdown {
    position: relative;
}

body.fullscreen-mode .audio-ai-results-btn {
    min-width: 28px;
    min-height: 28px;
    padding: 4px;
}

/* 修订模态框样式 */
.text-processing-modal .current-result-preview {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.4;
    color: #495057;
    max-height: 150px;
    overflow-y: auto;
    margin-top: 8px;
}

.text-processing-modal .form-group {
    margin-bottom: 16px;
}

.text-processing-modal .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
}

.text-processing-modal textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
}

.text-processing-modal textarea:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.text-processing-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
    margin-top: 20px;
}

.text-processing-modal .btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.text-processing-modal .btn-primary {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.text-processing-modal .btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.text-processing-modal .btn-secondary {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.text-processing-modal .btn-secondary:hover {
    background: #545b62;
    border-color: #545b62;
}

/* 修订模态框的特殊样式 */
.revise-note {
    font-size: 12px;
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 8px;
    border-left: 3px solid #007bff;
    line-height: 1.4;
}

.chat-history-info {
    font-size: 12px;
    color: #28a745;
    background-color: #f8fff9;
    padding: 6px 10px;
    border-radius: 4px;
    border-left: 3px solid #28a745;
    font-weight: 500;
}

.text-processing-modal textarea {
    min-height: 120px;
    resize: vertical;
}

.text-processing-modal .current-result-preview {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.4;
    color: #495057;
    max-height: 140px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.text-processing-modal .current-result-preview {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background-color: #f9f9f9;
    font-size: 14px;
    line-height: 1.4;
    color: #666;
}

/* 音频标签右键菜单样式 */
.take-label-context-menu {
    position: fixed;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    min-width: 140px;
    overflow: hidden;
    font-size: 14px;
}

.context-menu-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}

.context-menu-item:last-child {
    border-bottom: none;
}

.context-menu-item:hover {
    background-color: #f8f9fa;
}

.context-menu-icon {
    margin-right: 8px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.context-menu-text {
    flex: 1;
    color: #333;
    font-weight: 500;
}

/* AI重命名模态框样式 */
.ai-rename-modal {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ai-rename-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.ai-rename-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.ai-rename-content {
    padding: 24px;
}

.ai-rename-source-info {
    margin-bottom: 24px;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.ai-rename-source-info h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.source-data {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.source-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #6c757d;
    padding: 4px 0;
}

.ai-rename-suggestions h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.suggestion-item {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.suggestion-item:has(input:checked),
.suggestion-item.selected {
    border-color: #007bff;
    background-color: #e7f3ff;
}

.suggestion-radio {
    margin-right: 12px;
    margin-top: 2px;
}

.suggestion-radio input[type="radio"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #007bff;
}

.suggestion-radio label {
    display: none;
}

.suggestion-content {
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 14px;
    word-wrap: break-word;
}

.suggestion-reason {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
    word-wrap: break-word;
}

.ai-rename-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.ai-rename-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-rename-actions .btn-cancel {
    background-color: #6c757d;
    color: white;
}

.ai-rename-actions .btn-cancel:hover {
    background-color: #5a6268;
}

.ai-rename-actions .btn-primary {
    background-color: #007bff;
    color: white;
}

.ai-rename-actions .btn-primary:hover {
    background-color: #0056b3;
}

.ai-rename-actions .btn-revise {
    background-color: #6c757d;
    color: white;
    margin-right: auto;
}

.ai-rename-actions .btn-revise:hover {
    background-color: #5a6268;
}

/* 文本源选择模态框样式 */
.text-source-selection-modal {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.text-source-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.text-source-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.text-source-content {
    padding: 24px;
}

.text-source-content p {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 14px;
    line-height: 1.5;
}

.text-source-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.text-source-option {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.text-source-option:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.text-source-option:has(input:checked),
.text-source-option.selected {
    border-color: #007bff;
    background-color: #e7f3ff;
}

.source-radio {
    margin-right: 12px;
    margin-top: 2px;
}

.source-radio input[type="radio"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #007bff;
}

.source-radio label {
    display: none;
}

.source-info {
    flex: 1;
    min-width: 0;
}

.source-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 14px;
}

.source-details {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

.source-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.btn-preview {
    padding: 4px 8px;
    border: 1px solid #007bff;
    border-radius: 4px;
    background-color: transparent;
    color: #007bff;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-preview:hover {
    background-color: #007bff;
    color: white;
}

.text-source-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.text-source-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.text-source-actions .btn-cancel {
    background-color: #6c757d;
    color: white;
}

.text-source-actions .btn-cancel:hover {
    background-color: #5a6268;
}

.text-source-actions .btn-primary {
    background-color: #007bff;
    color: white;
}

.text-source-actions .btn-primary:hover {
    background-color: #0056b3;
}

/* 文本预览模态框样式 */
.text-preview-modal {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

.text-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.text-preview-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.text-preview-content {
    padding: 0;
    max-height: 60vh;
    overflow-y: auto;
}

.text-preview-item {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.text-preview-item:last-child {
    border-bottom: none;
}

.text-preview-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.text-preview-item-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.text-preview-date {
    font-size: 12px;
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 12px;
}

.text-preview-item-content {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
}

.text-preview-item-type {
    margin-top: 8px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

.text-preview-actions {
    display: flex;
    justify-content: center;
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.text-preview-actions button {
    padding: 8px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.text-preview-actions .btn-primary {
    background-color: #007bff;
    color: white;
}

.text-preview-actions .btn-primary:hover {
    background-color: #0056b3;
}

/* AI重命名修订模态框样式 */
.ai-rename-revision-modal {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ai-rename-revision-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.ai-rename-revision-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.ai-rename-revision-content {
    padding: 24px;
}

.ai-rename-revision-content p {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 14px;
    line-height: 1.5;
}

.ai-rename-revision-content .form-group {
    margin-bottom: 20px;
}

.ai-rename-revision-content .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.ai-rename-revision-content textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ai-rename-revision-content textarea:focus {
    outline: none;
    border-color: #007bff;
}

.current-source-info {
    margin-top: 20px;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.current-source-info h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.current-source-info .source-data {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.current-source-info .source-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 13px;
}

.current-source-info .source-item.active {
    border-color: #007bff;
    background-color: #e7f3ff;
}

.current-source-info .source-item strong {
    color: #2c3e50;
}

.current-source-info .source-item span {
    color: #6c757d;
    font-size: 12px;
}

.ai-rename-revision-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.ai-rename-revision-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-rename-revision-actions .btn-cancel {
    background-color: #6c757d;
    color: white;
}

.ai-rename-revision-actions .btn-cancel:hover {
    background-color: #5a6268;
}

.ai-rename-revision-actions .btn-primary {
    background-color: #007bff;
    color: white;
}

.ai-rename-revision-actions .btn-primary:hover {
    background-color: #0056b3;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .ai-rename-modal {
        max-width: 95%;
        margin: 20px auto;
    }
    
    .ai-rename-header,
    .ai-rename-content,
    .ai-rename-actions {
        padding: 16px;
    }
    
    .suggestion-item {
        padding: 12px;
    }
    
    .take-label-context-menu {
        min-width: 120px;
    }
    
    .context-menu-item {
        padding: 12px 14px;
    }
    
    .text-source-selection-modal {
        max-width: 95%;
        margin: 20px auto;
    }
    
    .text-source-header,
    .text-source-content,
    .text-source-actions {
        padding: 16px;
    }
    
    .text-source-option {
        padding: 12px;
    }
    
    .text-preview-modal {
        max-width: 95%;
        margin: 20px auto;
    }
    
    .text-preview-header,
    .text-preview-actions {
        padding: 16px;
    }
    
    .text-preview-item {
        padding: 16px;
    }
    
    .text-preview-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .text-preview-date {
        margin-left: 0;
    }
    
    .text-preview-item-content {
        font-size: 13px;
        padding: 12px;
    }
    
    .btn-preview {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .ai-rename-revision-modal {
        max-width: 95%;
        margin: 20px;
    }
    
    .ai-rename-revision-header,
    .ai-rename-revision-content,
    .ai-rename-revision-actions {
        padding: 16px;
    }
    
    .ai-rename-revision-content textarea {
        font-size: 16px;
        min-height: 120px;
    }
    
    .current-source-info {
        margin-top: 16px;
        padding: 12px;
    }
    
    .ai-rename-revision-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .ai-rename-revision-actions button {
        width: 100%;
        padding: 12px 16px;
        font-size: 16px;
    }
}

