/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;          /* 白色背景，与主页保持一致 */
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);          /* 蓝紫色 */
    /* background: linear-gradient(135deg, #26a69a 0%, #00695c 100%);          /* 翠绿色 */
    /* background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f1e 100%);  深邃夜空 */
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    color: #7c3aed;  /* 更柔和的紫蓝色标题 */
    position: relative;
}

.header-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
    margin-left: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.header-logo:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.logo-image {
    height: 50px;
    width: auto;
    max-width: 250px;
    opacity: 0.9;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo-image:hover {
    opacity: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.language-switcher {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
    margin-right: 10px;
}

.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(79, 70, 229, 0.1);
    border: 2px solid rgba(79, 70, 229, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    color: #4f46e5;
    font-size: 14px;
    font-weight: 500;
    min-width: 100px;
}

.lang-dropdown-btn:hover {
    background: rgba(79, 70, 229, 0.15);
    border-color: rgba(79, 70, 229, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.lang-flag {
    font-size: 16px;
    line-height: 1;
}

.lang-name {
    flex: 1;
    text-align: left;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.lang-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.lang-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    min-width: 120px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 4px;
}

.lang-dropdown.active .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.lang-option:hover {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

.lang-option.active {
    background: rgba(79, 70, 229, 0.15);
    color: #4f46e5;
    font-weight: 600;
}

.lang-option:first-child {
    border-radius: 6px 6px 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 6px 6px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    margin-top: 60px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* 系统信息副标题样式 */
.system-info-subtitle {
    font-size: 0.85em !important;
    text-align: center;
    word-break: break-all;
    line-height: 1.3 !important;
}

/* 底部系统信息样式 */
.system-info-bottom {
    text-align: center;
    margin: 5px 0;
    padding: 0 20px;
}

.system-info-bottom .system-info-text {
    font-size: 14px;
    color: rgba(79, 70, 229, 0.8);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.5px;
    opacity: 0.9;
    line-height: 1.2;
}

/* 浏览器警告样式 */
.browser-warning {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3);
    animation: slideDown 0.5s ease-out;
}

.warning-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: white;
    gap: 12px;
}

.warning-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.warning-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.warning-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.warning-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 测试版本说明样式 */
.beta-notice {
    background: rgba(79, 70, 229, 0.1);
    border: 2px solid rgba(79, 70, 229, 0.2);
    border-radius: 12px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.beta-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.beta-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.beta-text {
    color: rgba(79, 70, 229, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.beta-link {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.beta-link:hover {
    border-bottom-color: #7c3aed;
    text-shadow: 0 0 8px rgba(124, 58, 237, 0.5);
}

/* Tab导航样式 */
.tab-navigation {
    display: flex;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 2px solid rgba(79, 70, 229, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    transform: translateY(-1px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
    border: 1px solid rgba(79, 70, 229, 0.3);
}

/* Tab内容区域 */
.tab-content {
    display: block;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

/* 串口调试Tab的特殊布局 */
#serialTab.active {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* 固件下载Tab的特殊布局 */
#flashTab.active {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* 控制面板样式 */
.control-panel {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
    border: 2px solid rgba(79, 70, 229, 0.1);
}

.control-header {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.control-header h3 {
    color: #7c3aed;
    font-size: 1.2em;
    font-weight: 600;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    border-radius: 8px;
    margin: -5px 0 0 -5px;
    display: inline-block;
    border: 1px solid rgba(124, 58, 237, 0.1);
}

.control-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-header-right .config-group {
    margin-bottom: 0;
}

.control-header-right .config-group select {
    min-width: 120px;
    max-width: 150px;
}

.connection-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    flex-wrap: wrap;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dc3545;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: #28a745;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.serial-config {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.config-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.config-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9em;
    margin-bottom: 2px;
}

.config-group select {
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    transition: border-color 0.3s ease;
    min-height: 40px;
    box-sizing: border-box;
}

.config-group select:focus {
    border-color: #172d72;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.config-group select:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.8;
}

.config-group input[type="text"] {
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    transition: border-color 0.3s ease;
    min-height: 40px;
    box-sizing: border-box;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.config-group input[type="text"]:focus {
    border-color: #172d72;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

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

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    border: 1px solid rgba(37, 99, 235, 0.3);
    font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    border-color: rgba(29, 78, 216, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #475569, #64748b);
    color: white;
    border: 1px solid rgba(100, 116, 139, 0.3);
    font-weight: 600;
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #334155, #475569);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.3);
    border-color: rgba(51, 65, 85, 0.5);
}

.btn-secondary:disabled,
.btn:disabled.btn-secondary {
    background: linear-gradient(135deg, #e5e7eb, #f1f5f9) !important;
    color: #b0b4ba !important;
    border: 1px solid #e5e7eb !important;
    opacity: 1 !important;
    cursor: not-allowed;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
    border: 1px solid rgba(248, 113, 113, 0.3);
    font-weight: 600;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    border-color: rgba(220, 38, 38, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-weight: 600;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #047857, #059669);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
    border-color: rgba(4, 120, 87, 0.5);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* 数据面板样式 */
.data-panel {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 2px solid rgba(23, 45, 114, 0.1);
}

/* 数据接收面板样式 */
.receive-data-panel {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border: 2px solid rgba(23, 45, 114, 0.15);
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.data-header h3 {
    color: #2d3748;
    font-size: 1.2em;
}

/* 烧录日志区域标题特殊样式 */
.flash-log-panel .data-header h3 {
    color: #dc2626;
    font-weight: 600;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-radius: 8px;
    margin: -5px 0 0 -5px;
    display: inline-block;
    border: 1px solid rgba(220, 38, 38, 0.1);
}

/* 接收数据区域标题特殊样式 */
.receive-data-panel .data-header h3 {
    color: #172d72;
    font-weight: 600;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 8px;
    margin: -5px 0 0 -5px;
    display: inline-block;
    border: 1px solid rgba(23, 45, 114, 0.2);
}

.data-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.data-controls-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.data-controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.data-display {
    background: #1a202c;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    height: 300px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-y: auto;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    border: 2px solid #2d3748;
    word-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
    box-sizing: border-box;
}

.data-display::-webkit-scrollbar {
    width: 8px;
}

.data-display::-webkit-scrollbar-track {
    background: #2d3748;
}

.data-display::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

.data-display::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

.placeholder {
    color: #a0aec0;
    font-style: italic;
    text-align: center;
    margin-top: 50px;
}

.data-line {
    margin-bottom: 2px;
    word-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    color: #f7fafc;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.timestamp {
    color: #68d391;
    margin-right: 8px;
}

.prefix {
    font-weight: 600;
    margin-right: 5px;
}

.prefix.rx {
    color: #3b82f6;
}

.prefix.tx {
    color: #f59e0b;
}

.content {
    color: #f7fafc;
    word-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    max-width: 100%;
    display: inline-block;
    box-sizing: border-box;
}

.data-stats {
    margin-top: 10px;
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    color: #666;
}

/* 发送面板样式 */
.send-panel {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 2px solid rgba(23, 45, 114, 0.1);
}

/* 固件下载面板样式 */
.flash-panel {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 2px solid rgba(23, 45, 114, 0.1);
}

.flash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.flash-header h3 {
    color: #059669;
    font-size: 1.2em;
    font-weight: 600;
    padding: 8px 12px;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-radius: 8px;
    margin: -5px 0 0 -5px;
    display: inline-block;
    border: 1px solid rgba(5, 150, 105, 0.1);
}

.flash-controls {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px !important;
    align-items: flex-start !important;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

/* 确保flash-controls中的config-group标签顶部对齐 */
.flash-controls .config-group {
    align-items: flex-start;
    align-self: flex-start;
    flex: 0 0 auto;
    min-width: 180px;
}

.flash-controls .config-group label {
    margin-bottom: 8px;
    line-height: 1.2;
    display: block;
    height: auto;
}

/* 目标设备区域样式调整 */
.flash-controls > .config-group:first-child {
    padding-top: 0;
    margin-right: 0;
    flex: 0 0 auto;
}

/* ESP32地址组样式调整 */
.flash-controls .esp32-address-group {
    align-self: flex-start;
    margin-left: 0;
    flex: 0 0 auto;
}

.flash-controls .esp32-address-group label {
    margin-top: 0;
    margin-bottom: 8px;
}

/* 目标设备下拉列表样式优化 */
#deviceSelect {
    max-width: 200px !important;
    width: 200px !important;
    min-width: 150px !important;
}

/* ESP32地址组间距调整 */
#esp32AddressGroup {
    margin-left: 0;
    padding-left: 0;
}

/* flash-controls间距设置 */
div.flash-controls {
    gap: 15px !important;
}

.flash-panel .flash-header .flash-controls {
    gap: 20px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
}

/* 移除过度的transform */
.config-group:nth-child(2) {
    transform: none !important;
}

/* ESP32地址组样式优化 - 修改为固定位置布局 */
.esp32-address-group {
    /* 改为visibility控制显示隐藏，保持占据空间 */
    visibility: hidden;
    opacity: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    transition: all 0.3s ease;
    position: relative;
    margin-top: 0;
    /* 确保隐藏时仍占据空间，保持布局稳定 */
    min-height: 80px;
}

/* ESP32地址组内部横向布局 */
.esp32-address-group .address-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.esp32-address-group.show {
    /* 显示时恢复可见性和透明度 */
    visibility: visible;
    opacity: 1;
    animation: slideInDown 0.3s ease-out;
    margin-top: 0;
}

/* 已移除扳手图标 - 根据用户要求
.esp32-address-group::before {
    content: '🔧';
    position: absolute;
    top: -8px;
    left: 12px;
    background: white;
    padding: 0 6px;
    font-size: 14px;
    color: #172d72;
}
*/

.esp32-address-group label {
    color: #555;
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.esp32-address-group select {
    border-color: #e2e8f0;
    background: white;
    max-width: 200px !important;
    width: 200px !important;
    min-width: 150px !important;
}

.esp32-address-group select:focus {
    border-color: #172d72;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    background: white;
}

.custom-address-input {
    display: none;
    margin-top: 0;
    margin-left: 10px;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    transition: all 0.3s ease;
    min-height: 40px;
    box-sizing: border-box;
    max-width: 150px !important;
    width: 150px !important;
    min-width: 120px !important;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

.custom-address-input.show {
    display: block;
    animation: slideInDown 0.3s ease-out;
}

.custom-address-input:focus {
    border-color: #172d72;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    background: white;
}

.custom-address-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.custom-address-input.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.custom-address-input.valid {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-select-area {
    margin-bottom: 20px;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    background: #fafbfc;
    cursor: pointer;
}

.file-select-area:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.file-select-area.drag-over {
    border-color: #172d72;
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    transform: scale(1.02);
}

.file-input-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.file-name {
    color: #666;
    font-style: italic;
    font-size: 14px;
}

.file-info {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

.download-area {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-download {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-weight: 600;
}

.btn-download:hover:not(:disabled) {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
    border-color: rgba(185, 28, 28, 0.5);
}

.btn-download:disabled {
    background: #d1d5db;
    color: #9ca3af;
}

/* 进度条样式 */
.progress-area {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.flash-timer {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #666;
    min-width: 45px;
    text-align: center;
    flex-shrink: 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
    flex-wrap: wrap;
    gap: 10px;
}

/* 固件下载日志面板 */
.flash-log-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.send-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.send-header h3 {
    color: #2d3748;
    font-size: 1.2em;
}

/* 发送数据区域标题特殊样式 */
.send-panel .send-header h3 {
    color: #059669;
    font-weight: 600;
    padding: 8px 12px;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-radius: 8px;
    margin: -5px 0 0 -5px;
    display: inline-block;
    border: 1px solid rgba(5, 150, 105, 0.1);
}

.send-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.input-container {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 20px;
}

#sendInput {
    flex: 1;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease;
}

#sendInput:focus {
    border-color: #172d72;
    outline: none;
}

/* 复选框样式 */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: #eee;
    border-radius: 3px;
    margin-right: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-container:hover .checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #4f8cff;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* 快捷发送按钮 */
.quick-send {
    margin-top: 20px;
}

.quick-send-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.quick-send h4 {
    color: #2d3748;
    font-size: 1em;
    margin: 0;
}

.btn-manage {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
    border: 1px solid rgba(251, 191, 36, 0.3);
    font-weight: 600;
}

.btn-manage:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    border-color: rgba(217, 119, 6, 0.5);
}

.quick-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-btn {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    font-size: 12px;
    padding: 6px 12px;
    position: relative;
}

.quick-btn:hover:not(:disabled) {
    background: #edf2f7;
    border-color: #172d72;
    color: #172d72;
}

.no-quick-commands {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px dashed #e2e8f0;
}

/* 快捷命令管理模态框 */
.quick-command-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.add-command-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.add-command-section h4 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.command-form {
    display: grid;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9em;
}

.form-group input {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: #172d72;
    outline: none;
}

.command-list-section {
    margin-bottom: 20px;
}

.command-list-section h4 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.command-list {
    display: grid;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.command-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.command-item:hover {
    border-color: #172d72;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}

.command-info {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-right: 15px;
}

.command-name {
    font-weight: 600;
    color: #2d3748;
}

.command-value {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #666;
    font-size: 0.9em;
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 3px;
}

.command-actions {
    display: flex;
    gap: 5px;
}

.btn-edit, .btn-delete {
    padding: 4px 8px;
    font-size: 11px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

.no-commands {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px dashed #e2e8f0;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

/* 编辑模式样式 */
.command-item.editing .command-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.command-item.editing .command-name,
.command-item.editing .command-value {
    background: white;
    border: 2px solid #172d72;
    border-radius: 4px;
    padding: 6px;
    font-family: inherit;
    outline: none;
}

.command-item.editing .command-value {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.command-item.editing .command-actions {
    display: flex;
    gap: 5px;
}

.btn-save, .btn-cancel {
    padding: 4px 8px;
    font-size: 11px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save {
    background: #10b981;
    color: white;
}

.btn-save:hover {
    background: #059669;
}

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

.btn-cancel:hover {
    background: #4b5563;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 12px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #2d3748;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .control-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .control-header-right {
        justify-content: center;
    }
    
    .connection-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .data-controls,
    .send-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .data-controls-left,
    .data-controls-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .data-controls-right {
        justify-content: flex-end;
    }
    
    .input-container {
        flex-direction: column;
    }
    
    .serial-config {
        grid-template-columns: 1fr;
    }
    
    .flash-controls {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .esp32-address-group {
        padding: 12px;
        margin-top: 10px;
    }
    
    /* 已移除扳手图标 - 根据用户要求
    .esp32-address-group::before {
        top: -6px;
        left: 8px;
        font-size: 12px;
    }
    */
    
    .custom-address-input {
        margin-top: 8px;
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .data-header,
    .send-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* 语言切换下拉菜单在移动设备上的优化 */
    .lang-dropdown-btn {
        min-width: 80px;
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .lang-dropdown-menu {
        min-width: 100px;
    }
    
    .lang-option {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* 底部系统信息在移动设备上的优化 */
    .system-info-bottom .system-info-text {
        font-size: 12px;
        word-break: break-all;
        line-height: 1.2;
        padding: 0 10px;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease;
}

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

.slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 全屏显示样式 */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    flex-direction: column;
}

.fullscreen-overlay.active {
    display: flex;
}

.fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.fullscreen-header h3 {
    color: white;
    margin: 0;
    font-size: 18px;
}

.fullscreen-data-display {
    background: #1a202c;
    color: #e2e8f0;
    padding: 20px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
    max-width: 100vw;
    box-sizing: border-box;
}

.fullscreen-data-display .data-line {
    margin-bottom: 3px;
    word-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    color: #f7fafc;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.fullscreen-data-display .placeholder {
    color: #888;
    text-align: center;
    padding: 40px;
    font-style: italic;
}

.fullscreen-close {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transition: all 0.2s ease;
}

.fullscreen-close:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.fullscreen-close .icon {
    margin: 0;
    font-size: 18px;
}

.btn-fullscreen {
    background: #6366f1;
    color: white;
    border: none;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    transition: all 0.2s ease;
}

.btn-fullscreen:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-fullscreen .icon {
    font-size: 14px;
    line-height: 1;
}

/* 页脚样式 */
.footer {
    margin-top: 40px;
    padding: 20px 0;
    background: rgba(79, 70, 229, 0.05);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(79, 70, 229, 0.2);
    color: #4f46e5;
}

/* 页脚内容样式 */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-left,
.footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.version {
    background: rgba(79, 70, 229, 0.15);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    color: #4f46e5;
}

.separator {
    opacity: 0.6;
    color: #4f46e5;
}

.footer a {
    color: #4f46e5;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer a:hover {
    color: #7c3aed;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .footer-left,
    .footer-right {
        justify-content: center;
    }
    
    /* 底部系统信息在移动设备上的优化 */
    .system-info-bottom .system-info-text {
        font-size: 12px;
        word-break: break-all;
        line-height: 1.2;
        padding: 0 10px;
    }
}

/* 项目链接样式 */
.project-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(79, 70, 229, 0.2);
}

.project-info {
    text-align: center;
    margin-bottom: 15px;
}

.project-title {
    color: rgba(79, 70, 229, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.project-list {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 8px;
    color: rgba(79, 70, 229, 0.9);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.project-link:hover {
    background: rgba(79, 70, 229, 0.2);
    border-color: rgba(79, 70, 229, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

.project-link.current {
    background: rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.4);
    color: #7c3aed;
}

.project-link.current:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.6);
    color: #ffd700;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.link-icon {
    font-size: 16px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .project-list {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .project-link {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* 调试控件样式 */
.debug-controls-inline {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 15px;
    padding: 8px 12px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.debug-toggle {
    margin: 0 !important;
    font-weight: 600;
    color: #172d72;
}

.debug-toggle .checkmark {
    background: #4f8cff;
    border-color: #4f8cff;
}

.debug-toggle input:checked ~ .checkmark {
    background: #10b981;
    border-color: #10b981;
}

.debug-level-select {
    display: flex;
    align-items: center;
    gap: 8px;
}

.debug-level-select select {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    font-size: 12px;
    color: #374151;
    min-width: 80px;
}

.debug-level-select select:focus {
    outline: none;
    border-color: #172d72;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.btn-debug {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    border: 1px solid rgba(168, 85, 247, 0.3);
    font-weight: 600;
}

.btn-debug:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    border-color: rgba(109, 40, 217, 0.5);
}

/* 调试状态栏样式 */
.debug-status-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    flex-wrap: wrap;
}

.debug-status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.debug-label {
    font-weight: 600;
    color: #475569;
}

.debug-value {
    font-weight: 700;
    color: #1e293b;
    min-width: 30px;
    text-align: center;
}

.debug-status-item:nth-child(1) .debug-value {
    color: #10b981; /* 绿色 - 调试状态 */
}

.debug-status-item:nth-child(2) .debug-value {
    color: #3b82f6; /* 蓝色 - 调试级别 */
}

.debug-status-item:nth-child(3) .debug-value {
    color: #f59e0b; /* 橙色 - 发送包数 */
}

.debug-status-item:nth-child(4) .debug-value {
    color: #10a6fa; /* 紫色 - 接收包数 */
}

/* 调试状态栏在禁用时的样式 */
.debug-status-bar.disabled {
    opacity: 0.6;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.debug-status-bar.disabled .debug-value {
    color: #64748b;
}

/* Flash日志显示区域增强 */
.flash-log-display {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
}

.flash-log-display .debug-entry {
    margin: 2px 0;
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 3px solid transparent;
}

.flash-log-display .debug-entry.info {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: #2563eb;
    color: #2563eb;
}

.flash-log-display .debug-entry.success {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: #10b981;
    color: #047857;
}

.flash-log-display .debug-entry.warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: #f59e0b;
    color: #92400e;
}

.flash-log-display .debug-entry.error {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #ef4444;
    color: #dc2626;
}

.flash-log-display .debug-entry.packet {
    background: rgba(139, 92, 246, 0.1);
    border-left-color: #10a6fa;
    color: #6d28d9;
    font-family: 'Courier New', monospace;
}

.flash-log-display .debug-timestamp {
    color: #6b7280;
    font-size: 11px;
    margin-right: 8px;
}

.flash-log-display .debug-type {
    font-weight: 600;
    margin-right: 8px;
    text-transform: uppercase;
    font-size: 11px;
}

.flash-log-display .debug-message {
    word-break: break-word;
}

.flash-log-display .debug-data {
    margin-top: 4px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    white-space: pre-wrap;
    overflow-x: auto;
}

.flash-log-display .packet-header {
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 2px;
}

.flash-log-display .packet-details {
    margin-left: 15px;
    font-size: 11px;
    color: #6b7280;
}

.flash-log-display .hex-data {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.8);
    color: #00ff00;
    padding: 6px;
    border-radius: 3px;
    margin: 4px 0;
    overflow-x: auto;
    white-space: nowrap;
}

.flash-log-display .ascii-data {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.1);
    color: #374151;
    padding: 4px;
    border-radius: 3px;
    margin: 2px 0;
    word-break: break-all;
}

/* 响应式调试控件 */
@media (max-width: 768px) {
    .debug-controls-inline {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .debug-status-bar {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .debug-status-item {
        justify-content: space-between;
    }
    
    .flash-log-display .debug-entry {
        padding: 6px;
        margin: 4px 0;
    }
    
    .flash-log-display .debug-data {
        font-size: 10px;
    }
}

/* ANSI颜色支持样式 */
.data-line.ansi-colored {
    font-weight: 500;
    padding: 2px 6px;
    margin: 1px 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid rgba(255, 255, 255, 0.15);
    position: relative;
}

.data-line.ansi-colored::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.3),
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.3)
    );
    border-radius: 2px;
}

.data-line.ansi-colored .content {
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.8);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.3px;
}

/* 增强ANSI颜色在暗背景下的对比度 */
.data-line.ansi-colored .content[style*="color: #44ff44"] {
    text-shadow: 0 0 2px rgba(68, 255, 68, 0.5);
}

.data-line.ansi-colored .content[style*="color: #ff4444"] {
    text-shadow: 0 0 2px rgba(255, 68, 68, 0.5);
}

.data-line.ansi-colored .content[style*="color: #ffff44"] {
    text-shadow: 0 0 2px rgba(255, 255, 68, 0.5);
}

.data-line.ansi-colored .content[style*="color: #4444ff"] {
    text-shadow: 0 0 2px rgba(68, 68, 255, 0.5);
}

/* 全屏模式下的ANSI颜色样式 */
.fullscreen-data-display .data-line.ansi-colored {
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    margin: 2px 0;
}

.fullscreen-data-display .data-line.ansi-colored .content {
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.9);
    font-size: 15px;
    letter-spacing: 0.5px;
}

/* 动画效果 */
.data-line.ansi-colored {
    animation: ansiColoredAppear 0.3s ease-out;
}

@keyframes ansiColoredAppear {
    0% {
        opacity: 0;
        transform: translateX(-10px);
        border-left-color: transparent;
    }
    50% {
        border-left-color: rgba(79, 70, 229, 0.3);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        border-left-color: rgba(79, 70, 229, 0.15);
    }
}

/* 连接控制和状态显示区域 */
.connection-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(79, 70, 229, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.status-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-group .status-label {
    font-weight: 500;
    color: #4a5568;
    font-size: 14px;
}

.status-group .status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-group .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e53e3e;
    transition: all 0.3s ease;
}

.status-group .status-dot.connected {
    background: #4f46e5;
    animation: pulse 2s infinite;
}

.status-group .status-text {
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
}

/* 响应式布局优化 */
@media (max-width: 768px) {
    .connection-section {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        text-align: center;
    }
    
    .status-group {
        justify-content: center;
    }
}

/* 配置参数区域样式 */
.config-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(79, 70, 229, 0.5);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    align-items: start;
}

/* 数据显示区域样式 */
.data-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 发送区域样式 */
.send-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 快捷命令区域样式 */
.quick-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 快捷命令头部样式 */
.quick-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.quick-header h3 {
    color: #2d3748;
    font-size: 1.2em;
    margin: 0;
}

/* 固件下载相关区域样式 */
.flash-control-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: grid;
    gap: 20px;
}

.file-selection {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.device-selection {
    display: flex;
    align-items: center;
    gap: 10px;
}



.progress-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.debug-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.flash-log-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.flash-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.flash-log-header h3 {
    color: #2d3748;
    font-size: 1.2em;
    margin: 0;
}

.flash-log-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.flash-log-display {
    background: #1a202c;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    height: 300px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    border: 2px solid #2d3748;
}

/* 发送选项和控件样式 */
.send-options {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.send-controls {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.send-controls input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.send-controls input[type="text"]:focus {
    border-color: #172d72;
    outline: none;
}

/* 串口恢复对话框样式 */
.recovery-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    animation: recoveryFadeIn 0.3s ease-out;
}

.recovery-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: recoverySlideIn 0.3s ease-out;
}

.recovery-dialog-header {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 20px;
    text-align: center;
}

.recovery-dialog-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.recovery-dialog-body {
    padding: 24px;
}

.recovery-dialog-body p {
    margin: 0;
    line-height: 1.6;
    color: #374151;
    font-size: 0.95rem;
}

.recovery-dialog-actions {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.recovery-dialog-actions .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.recovery-dialog-actions .btn-primary {
    background: #10b981;
    color: white;
}

.recovery-dialog-actions .btn-primary:hover {
    background: #059669;
    transform: translateY(-1px);
}

.recovery-dialog-actions .btn-secondary {
    background: #6b7280;
    color: white;
}

.recovery-dialog-actions .btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

@keyframes recoveryFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes recoverySlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 故障排除链接样式 */
.troubleshooting-link {
    display: flex;
    align-items: center;
}

.help-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
    border: none;
}

.help-link:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
    color: white;
    text-decoration: none;
}

.help-link .icon {
    font-size: 1.1em;
}

/* TuyaOpen授权页面样式 */
.tuya-auth-panel {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
}

.auth-header h3 {
    color: #1e40af;
    font-size: 1.5em;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.auth-header-right {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.auth-subtitle {
    color: #6b7280;
    font-size: 0.95em;
    margin: 0;
    line-height: 1.5;
}

.auth-input-area {
    display: flex;
    justify-content: center;
}

.auth-form {
    width: 100%;
    max-width: 600px;
}

.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.auth-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auth-input:focus {
    border-color: #172d72;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background: #fafbfc;
}

.auth-input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.auth-input.success {
    border-color: #10b981;
    background: #f0fdf4;
}

.input-help {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.8em;
    color: #6b7280;
}

.char-count {
    color: #10a6fa;
}

.byte-count {
    color: #059669;
    font-weight: 500;
}

.auth-button-area {
    text-align: center;
    margin-top: 32px;
}

#authorizeBtn {
    min-width: 160px;
    font-size: 1.1em;
    padding: 14px 28px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#authorizeBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

#authorizeBtn:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* TuyaOpen授权提示区域样式 */
.tuya-auth-notice {
    background: linear-gradient(135deg, #fef3c7, #fbbf24);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.notice-content h4 {
    color: #92400e;
    font-size: 1.2em;
    margin: 0 0 12px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notice-list p {
    color: #78350f;
    margin: 8px 0;
    line-height: 1.6;
    font-size: 0.95em;
    padding-left: 24px;
    position: relative;
}

.notice-list p:before {
    content: "•";
    color: #f59e0b;
    font-weight: bold;
    position: absolute;
    left: 8px;
    font-size: 1.2em;
}

/* TuyaOpen授权Tab样式 */
#tuyaauthTab.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

#tuyaauthTab .receive-data-panel {
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tuya-auth-panel {
        padding: 16px;
        margin: 16px 0;
    }
    
    .auth-header h3 {
        font-size: 1.3em;
    }
    
    .auth-form {
        max-width: 100%;
    }
    
    .auth-input {
        padding: 10px 12px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .input-help {
        flex-direction: column;
        gap: 4px;
    }
    
    #authorizeBtn {
        min-width: 120px;
        font-size: 1em;
        padding: 12px 24px;
    }
    
    .tuya-auth-notice {
        padding: 16px;
        margin: 16px 0;
    }
    
    .notice-content h4 {
        font-size: 1.1em;
    }
    
    .notice-list p {
        font-size: 0.9em;
        padding-left: 20px;
    }
}

/* 输入验证动画 */
@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.auth-input.shake {
    animation: inputShake 0.5s ease-in-out;
}

/* 成功提示样式 */
.auth-success-message {
    background: linear-gradient(135deg, #d1fae5, #10b981);
    border: 2px solid #059669;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0;
    color: #065f46;
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

/* 错误提示样式 */
.auth-error-message {
    background: linear-gradient(135deg, #fee2e2, #ef4444);
    border: 2px solid #dc2626;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0;
    color: #991b1b;
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

/* 错误分析面板样式 */
.error-analysis-panel {
    background: white;
    border-radius: 12px;
    border: 2px solid #e8f4fd; /* 改回浅色边框，与接收数据面板一致 */
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* 错误分析标题区域样式 */
.error-analysis-panel .header-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

/* 折叠/展开按钮样式 */
.btn-toggle {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 6px 10px;
    min-width: auto;
    transition: all 0.3s ease;
}

.btn-toggle:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.btn-toggle .toggle-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
    display: inline-block;
}

/* 折叠状态下的图标旋转 */
.btn-toggle.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

/* 错误分析内容区域 */
.error-analysis-content {
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 1000px;
    opacity: 1;
    margin-top: 15px;
}

/* 折叠状态 */
.error-analysis-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
}

.error-analysis-display {
    background: white; /* Changed to white */
    color: #374151;
    border: 2px solid #e1e5e9; /* Matched to sendInput border */
    border-radius: 8px;
    padding: 15px;
    height: 300px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    box-sizing: border-box;
}

.error-analysis-display::-webkit-scrollbar {
    width: 8px;
}

.error-analysis-display::-webkit-scrollbar-track {
    background: #f1f5f9; /* 浅色滚动条轨道 */
}

.error-analysis-display::-webkit-scrollbar-thumb {
    background: #cbd5e1; /* 浅色滚动条 */
    border-radius: 4px;
}

.error-analysis-display::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; /* 滚动条悬停状态 */
}

.error-analysis-display .placeholder {
    color: #6b7280; /* 改回深色占位符文字 */
    font-style: italic;
    text-align: center;
    margin-top: 50px;
}

.error-wrapper {
    margin-bottom: 12px;
    border: 1px solid #f59e0b; /* 琥珀色边框 */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.error-code-section {
    padding: 12px;
    background: #fef3c7; /* 琥珀色背景 */
    border-bottom: 1px solid #f59e0b;
}

.error-description-section {
    padding: 12px;
    background: #fefbf3; /* 浅琥珀色背景 */
    color: #92400e; /* 琥珀色文字 */
    line-height: 1.5;
    font-size: 14px;
}

/* Style for the error analysis panel title to match other panel titles */
.error-analysis-panel .data-header h3 {
    color: #92400e; /* 琥珀色文字 */
    font-weight: 600;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fde68a, #fbbf24); /* 琥珀色渐变背景 */
    border-radius: 8px;
    margin: -5px 0 0 -5px;
    display: inline-block;
    border: 1px solid rgba(146, 64, 14, 0.1);
}

/* 错误分析面板的控制按钮布局调整 - 完全重写布局逻辑 */
.error-analysis-panel .data-controls {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    /* 强制覆盖原来的space-between */
}

.error-analysis-panel .data-controls-left {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    /* 确保和发送控件的gap一致 */
}

/* 调试按钮样式 */
.btn-debug {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    border: 1px solid rgba(168, 85, 247, 0.3);
    font-weight: 600;
}

.btn-debug:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    border-color: rgba(109, 40, 217, 0.5);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* 隐藏测试错误分析按钮（保持功能但不显示） */
#testErrorAnalysisBtn {
    display: none;
}

/* 清空分析按钮样式调整，与清空日志/保存日志按钮保持一致 */
#clearErrorAnalysisBtn {
    background: #f8f9fa !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
}

#clearErrorAnalysisBtn:hover:not(:disabled) {
    background: #e9ecef !important;
    color: #495057 !important;
    border-color: #adb5bd !important;
}

/* 响应式设计下的错误分析面板布局 */
@media (max-width: 768px) {
    .error-analysis-panel .data-controls,
    .error-analysis-panel .data-controls-left,
    .error-analysis-panel .data-controls-right {
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }
    
    /* Logo响应式样式 */
    .header-top {
        padding: 0 5px;
        gap: 10px;
    }
    
    .header-logo {
        margin-left: 5px;
        padding: 6px 8px;
    }
    
    .logo-image {
        height: 35px;
        max-width: 180px;
    }
    
    .language-switcher {
        margin-right: 5px;
    }
    
    .lang-dropdown-btn {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 80px;
    }
    
    /* 移动端标题调整 */
    header h1 {
        font-size: 2em;
        margin-top: 50px;
    }
    
    header p {
        font-size: 1em;
    }
}

header h1, header p {
    color: #000 !important;
    opacity: 1 !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3) !important;
}
