/**
 * 通用组件样式
 * ============
 * 
 * 按钮、卡片、表单、图片上传、设置面板、提示词管理等。
 * 从 styles.css 和 feedback.html 内联样式迁移而来。
 */

/* ===== 连接状态指示器 ===== */

.connection-indicator {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.connection-indicator.connected {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.connection-indicator.disconnected {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 1px solid #f44336;
}

/* ===== 工具提示 ===== */

.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}

/* ===== 可折叠统计面板 ===== */

.stats-panel-floating {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.stats-panel-floating.collapsed {
    transform: translateY(calc(100% - 40px));
}

.stats-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    user-select: none;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.stats-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.stats-toggle-icon {
    transition: transform 0.3s ease;
}

.stats-panel-floating.collapsed .stats-toggle-icon {
    transform: rotate(180deg);
}

.stats-panel-content {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.stats-item-detailed {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.stats-item-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-item-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-color);
    font-family: 'Consolas', 'Monaco', monospace;
}

@media (prefers-reduced-motion: reduce) {
    .stats-panel-floating,
    .stats-toggle-icon {
        transition: none;
    }
}

@media (max-width: 768px) {
    .stats-panel-content {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px 16px;
    }

    .stats-item-detailed {
        padding: 10px;
    }
}

/* ===== 警告和提示框 ===== */

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    border-left: 4px solid;
}

.alert-info {
    background: rgba(33, 150, 243, 0.1);
    border-left-color: var(--info-color);
    color: #bbdefb;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: var(--success-color);
    color: #c8e6c9;
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    border-left-color: var(--warning-color);
    color: #ffe0b2;
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border-left-color: var(--error-color);
    color: #ffcdd2;
}

/* ===== 进度条 ===== */

.progress {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

/* ===== 分隔线 ===== */

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

/* ===== 徽章 ===== */

.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    background: var(--accent-color);
    color: white;
}

.badge-secondary { background: var(--text-secondary); }
.badge-success { background: var(--success-color); }
.badge-warning { background: var(--warning-color); }
.badge-error { background: var(--error-color); }

/* ===== 卡片 ===== */

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.card-body {
    color: var(--text-secondary);
}

/* ===== 统计数字 ===== */

.stat {
    text-align: center;
    padding: 20px;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--accent-color);
    display: block;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-top: 4px;
}

/* ===== 倒数计时器 ===== */

.countdown-display {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 8px;
    flex-shrink: 0;
}

.countdown-label {
    color: var(--text-secondary);
    font-size: 11px;
}

.countdown-timer {
    color: var(--warning-color);
    font-size: 13px;
    font-weight: bold;
    font-family: 'Consolas', 'Monaco', monospace;
    min-width: 45px;
    text-align: center;
}

.countdown-timer.warning { color: var(--warning-color); }
.countdown-timer.danger { color: var(--error-color); }

/* ===== 语言选择器 ===== */

.language-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-selector select {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 14px;
}

.language-selector-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-setting-select {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    min-width: 140px;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.language-setting-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}

.language-setting-select:hover {
    border-color: var(--accent-color);
}

/* 语言选项卡片式 */
.language-selector-modern {
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-options {
    display: flex;
    gap: 12px;
}

.language-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.language-option:hover {
    border-color: var(--accent-color);
    background: rgba(0, 122, 204, 0.1);
}

.language-option.active {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: white;
}

.language-flag {
    font-size: 24px;
    margin-bottom: 4px;
}

.language-name {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.language-option.active .language-name {
    color: white;
}

/* ===== 设置项目 ===== */

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.setting-info {
    flex: 1;
}

.setting-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 4px;
}

.setting-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

/* ===== 设置卡片 ===== */

.settings-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.settings-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.settings-card-header {
    background: var(--bg-secondary);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.settings-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-card-body {
    padding: 20px;
}

.settings-card .setting-item {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-card .setting-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.settings-card .setting-label {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.settings-card .setting-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.settings-card .setting-warning {
    font-size: 12px;
    color: var(--warning-color);
    margin-top: 4px;
    font-weight: 500;
}

/* ===== 图片大小限制选择器 ===== */

.image-size-limit-selector {
    display: flex;
    align-items: center;
}

.image-size-limit-select {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 14px;
    min-width: 120px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-size-limit-select:hover {
    border-color: var(--accent-color);
    background: var(--bg-tertiary);
}

.image-size-limit-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}

/* ===== 切换开关 ===== */

/* label 包裹式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    cursor: pointer;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    border-radius: 24px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.toggle-switch .toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-slider {
    background: var(--accent-color);
}

.toggle-input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-switch:hover .toggle-slider {
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}

/* button 式切换按钮 */
.toggle-btn {
    position: relative;
    width: 50px;
    height: 24px;
    background: var(--border-color);
    border: none;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.toggle-btn.active {
    background: var(--accent-color);
}

.toggle-btn .toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-btn.active .toggle-slider {
    transform: translateX(26px);
}

.toggle-btn:hover {
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}

.toggle-btn:focus {
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.4);
}

/* ===== 布局模式选择器 ===== */

.layout-mode-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.layout-option {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-tertiary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.layout-option:hover {
    border-color: var(--accent-color);
    background: rgba(0, 122, 204, 0.1);
}

.layout-option input[type="radio"] {
    margin: 0;
    margin-right: 12px;
    margin-top: 2px;
    accent-color: var(--accent-color);
    transform: scale(1.2);
}

.layout-option label {
    flex: 1;
    cursor: pointer;
}

.layout-option-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.layout-option-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.layout-option input[type="radio"]:checked + label {
    color: var(--accent-color);
}

.layout-option input[type="radio"]:checked + label .layout-option-title {
    color: var(--accent-color);
}

.layout-option:has(input[type="radio"]:checked) {
    border-color: var(--accent-color);
    background: rgba(0, 122, 204, 0.15);
}

/* ===== 表单元素 ===== */

.input-group {
    margin-bottom: 20px;
    width: 100%;
}

.input-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.text-input {
    width: 100%;
    max-width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 220px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.text-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-input {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}

.form-select {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}

.form-select:hover {
    border-color: var(--accent-color);
}

.input-suffix {
    color: var(--text-secondary);
    font-size: 14px;
    margin-left: 4px;
}

/* ===== 按钮 ===== */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--surface-color);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #45a049;
}

/* ===== Placeholder 文本样式 ===== */

textarea::placeholder,
#combinedFeedbackText::placeholder {
    white-space: pre-line;
    line-height: 1.4;
    font-family: inherit;
    color: var(--text-secondary);
    opacity: 0.7;
}

textarea::-webkit-input-placeholder,
#combinedFeedbackText::-webkit-input-placeholder {
    white-space: pre-line;
    line-height: 1.4;
    font-family: inherit;
    color: var(--text-secondary);
    opacity: 0.7;
}

textarea::-moz-placeholder,
#combinedFeedbackText::-moz-placeholder {
    white-space: pre-line;
    line-height: 1.4;
    font-family: inherit;
    color: var(--text-secondary);
    opacity: 0.7;
}

textarea:-ms-input-placeholder,
#combinedFeedbackText:-ms-input-placeholder {
    white-space: pre-line;
    line-height: 1.4;
    font-family: inherit;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* ===== 图片上传组件 ===== */

.image-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.image-upload-area:hover {
    border-color: var(--accent-color);
    background: rgba(0, 122, 204, 0.05);
}

.image-upload-area.dragover {
    border-color: var(--accent-color);
    background: rgba(0, 122, 204, 0.1);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.2);
}

.image-upload-area > div:first-child {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.image-upload-area > div:first-child small {
    color: var(--text-secondary);
    opacity: 0.8;
    font-size: 12px;
}

.image-upload-area.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 12px;
    justify-content: center;
    padding: 8px;
}

.image-preview-container:empty {
    display: none;
}

.image-preview-item {
    position: relative;
    display: inline-block;
    border-radius: 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    margin: 10px;
}

.image-preview-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.image-preview-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

.image-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--error-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.image-remove-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

/* 图片设置 */
.image-setting-label {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

.image-setting-select {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    min-width: 100px;
    transition: border-color 0.3s ease;
}

.image-setting-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.image-setting-checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-primary);
}

.image-setting-checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-radius: 3px;
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.image-setting-checkbox:checked {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.image-setting-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.image-setting-checkbox:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.image-setting-help {
    color: var(--text-secondary);
    font-size: 11px;
    margin-left: 8px;
}

.image-setting-help-text {
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.4;
    margin-top: 8px;
    padding: 8px;
    background: rgba(0, 122, 204, 0.05);
    border-radius: 4px;
    border-left: 3px solid var(--accent-color);
}

/* 图片设置折叠面板 */
.image-settings-details {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-tertiary);
    margin-bottom: 8px;
}

.image-settings-summary {
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
    user-select: none;
    transition: color 0.3s ease;
}

.image-settings-summary:hover {
    color: var(--text-primary);
}

.image-settings-content {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.image-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
}

.image-setting-row:last-of-type {
    margin-bottom: 8px;
}

/* 兼容性提示 */
.compatibility-hint {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid var(--warning-color);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--warning-color);
}

.compatibility-hint-btn {
    background: var(--warning-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: 500;
}

.compatibility-hint-btn:hover {
    background: #f57c00;
}

/* ===== 自动刷新控制与标题 ===== */

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

h3.combined-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.combined-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
}

.combined-submit-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
}

.feedback-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    gap: 16px;
}

.feedback-title-container h3.combined-section-title {
    margin: 0;
    flex: 1;
}

.feedback-title-container .combined-submit-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .feedback-title-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .feedback-title-container .combined-submit-btn {
        align-self: flex-end;
        width: auto;
    }
}

/* ===== 自动提交功能 ===== */

.auto-submit-status-btn {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: default;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    min-width: fit-content;
}

.auto-submit-status-btn.enabled {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.auto-submit-status-btn.disabled {
    background: rgba(158, 158, 158, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.auto-submit-status-btn span:first-child {
    font-size: 14px;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols", sans-serif;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auto-submit-status-btn .button-text {
    font-size: 12px;
}

.auto-submit-prompt {
    border-left: 4px solid var(--accent-color);
    background: rgba(0, 122, 204, 0.05);
}

.auto-submit-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    margin-right: 8px;
    font-weight: bold;
}

.auto-submit-status {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 12px;
}

/* 提示词操作按钮 */
.prompt-action-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    margin-left: 4px;
}

.prompt-action-btn:hover {
    border-color: var(--accent-color);
    background: rgba(0, 122, 204, 0.1);
}

.prompt-action-btn.auto-submit-btn {
    font-size: 14px;
    padding: 4px 8px;
}

.prompt-action-btn.auto-submit-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.prompt-action-btn.edit-btn:hover {
    border-color: var(--warning-color);
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning-color);
}

.prompt-action-btn.delete-btn:hover {
    border-color: var(--error-color);
    background: rgba(244, 67, 54, 0.1);
    color: var(--error-color);
}

/* ===== 会话超时倒数 ===== */

.session-timeout-display {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 4px;
    padding: 2px 8px;
}

.session-timeout-display .timeout-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-right: 4px;
}

.session-timeout-display .countdown-timer {
    color: var(--text-primary);
}

.session-timeout-display.countdown-warning .countdown-timer {
    color: var(--error-color);
    animation: pulse 1s ease-in-out infinite;
}

/* 自动提交倒数 */
.auto-submit-display {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 4px;
    padding: 2px 8px;
}

.auto-submit-display .countdown-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-right: 4px;
}

.auto-submit-display .countdown-timer {
    color: var(--text-primary);
    font-weight: 500;
}

/* 倒数控制按钮 */
.countdown-control-btn {
    background: transparent;
    border: none;
    padding: 2px 6px;
    margin-left: 4px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.countdown-control-btn:hover {
    color: var(--text-primary);
}

/* ===== 反馈状态指示器 ===== */

.feedback-status-indicator {
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 8px;
    border: 1px solid;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
}

.feedback-status-indicator .status-text {
    width: 100%;
}

.feedback-status-indicator .status-text strong,
.feedback-status-indicator .status-title {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.feedback-status-indicator .status-text span,
.feedback-status-indicator .status-message {
    font-size: 14px;
    opacity: 0.8;
}

.feedback-status-indicator.status-waiting {
    border-color: var(--accent-color);
    background: rgba(74, 144, 226, 0.1);
}

.feedback-status-indicator.status-processing {
    border-color: #ffa500;
    background: rgba(255, 165, 0, 0.1);
    animation: pulse 2s infinite;
}

.feedback-status-indicator.status-submitted {
    border-color: var(--success-color);
    background: rgba(40, 167, 69, 0.1);
}

/* ===== 禁用状态补充 ===== */

.text-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Base64 切换器容器 */
.base64-toggle-container {
    display: flex;
    align-items: center;
}
