* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(90deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
    padding: 25px;
    text-align: center;
}

h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.status {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
}

.connected { background-color: #4ade80; box-shadow: 0 0 8px #4ade80; }
.disconnected { background-color: #f87171; }

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    padding: 25px;
}

@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

h2 {
    color: #4361ee;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dee2e6;
}

textarea, input[type="text"], input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
}

textarea:focus, input:focus {
    border-color: #4361ee;
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.output-content {
    background: white;
    min-height: 300px;
    max-height: 400px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    overflow-y: auto;
    line-height: 1.5;
}

.message {
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 6px;
    background: #e9ecef;
}

.message.system {
    background: #fff3cd;
    color: #856404;
}

.message.file {
    background: #d1ecf1;
    color: #0c5460;
    cursor: pointer;
}

.message.file:hover {
    background: #bee5eb;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary { background: #4361ee; color: white; }
.btn-primary:hover { background: #3a0ca3; }

.btn-success { background: #10b981; color: white; }
.btn-success:hover { background: #059669; }

.btn-warning { background: #f59e0b; color: white; }
.btn-warning:hover { background: #d97706; }

.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.file-list {
    margin-top: 15px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 8px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #4361ee;
}

.file-size {
    font-size: 12px;
    color: #6c757d;
}

.file-time {
    font-size: 12px;
    color: #6c757d;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin-top: 5px;
    overflow: hidden;
    display: none;
}

.progress-fill {
    height: 100%;
    background: #4361ee;
    width: 0%;
    transition: width 0.3s ease;
}

footer {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    color: #6c757d;
}

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



/* 添加响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .section {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .button-group {
        flex-wrap: wrap;
    }
    
    .button-group button {
        margin-bottom: 8px;
        width: 100%;
    }
    
    textarea {
        font-size: 16px; /* 手机端更适合的字体大小 */
    }
    
    .file-list {
        max-height: 200px; /* 限制文件列表高度 */
    }
}

/* 基础响应式设置 */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 10px;
    box-sizing: border-box;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
}

.section {
    flex: 1;
    min-width: 300px;
    padding: 10px;
    box-sizing: border-box;
}
