/* 基础样式 */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 100%;
    background: white;
    margin: 0;
    padding: 15px;
}

/* 顶部导航 */
.top-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.btn-nav {
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-size: 14px;
    flex: 1;
    text-align: center;
}

.btn-nav:hover {
    background-color: #5a6268;
}

.btn-nav.active {
    background-color: #007bff;
}

/* 页面标题 */
.page-header {
    margin-bottom: 15px;
    flex-shrink: 0;
}

.page-header h1 {
    color: #343a40;
    margin: 0 0 10px 0;
    font-size: 24px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

/* 日期选择器 */
.date-selector {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.date-selector label {
    font-weight: bold;
    color: #495057;
    font-size: 14px;
    white-space: nowrap;
}

.flatpickr-input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    min-width: 120px;
}

/* 日志容器 */
.log-container-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.log-container {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 12px;
    background-color: #1a1a1a;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    color: #e0e0e0;
    border-radius: 4px;
}

.log-entry {
    margin-bottom: 6px;
    padding: 3px 6px;
    word-wrap: break-word;
    border-left: 3px solid transparent;
}

.log-entry:hover {
    background-color: #2a2a2a;
}

/* 根据日志颜色设置左边框 */
.log-entry[style*="color: green"] {
    border-left-color: #28a745;
}
.log-entry[style*="color: red"] {
    border-left-color: #dc3545;
}
.log-entry[style*="color: orange"] {
    border-left-color: #fd7e14;
}
.log-entry[style*="color: blue"] {
    border-left-color: #007bff;
}
.log-entry[style*="color: yellow"] {
    border-left-color: #ffc107;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .top-nav {
        gap: 5px;
    }

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

    .page-header h1 {
        font-size: 20px;
    }

    .date-selector {
        flex-direction: row;
        align-items: center;
    }

    .date-selector label {
        font-size: 13px;
    }

    .log-container {
        font-size: 12px;
        padding: 8px;
    }

    .log-entry {
        margin-bottom: 4px;
        padding: 2px 4px;
    }
}

/* 控制面板特定样式 */
.control-panel {
    overflow-y: auto;
    padding-bottom: 20px;
}

.status-panel {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-online {
    color: #28a745;
    font-weight: bold;
}

.status-offline {
    color: #6c757d;
    font-weight: bold;
}

.status-running {
    color: #17a2b8;
    font-weight: bold;
}

/* 控制按钮布局 */
.control-section {
    margin-bottom: 25px;
}

.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.button-group {
    margin-bottom: 10px;
}

.button-group h3 {
    margin-bottom: 8px;
    color: #495057;
    font-size: 16px;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 按钮样式 */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 100px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

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

.btn-start {
    background-color: #28a745;
    color: white;
}

.btn-stop {
    background-color: #dc3545;
    color: white;
}

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

.btn-reserve {
    background-color: #ffc107;
    color: #212529;
}

/* 参数设置 */
.parameters-section {
    margin-top: 20px;
}

.parameter-group {
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
}

.parameter-group h3 {
    margin-top: 0;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 6px;
    font-size: 16px;
}

.parameter-item {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.parameter-item label {
    width: 150px;
    font-weight: bold;
    color: #495057;
    font-size: 14px;
    flex-shrink: 0;
}

.parameter-item input, .parameter-item textarea {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.parameter-item input:focus, .parameter-item textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.parameter-item textarea {
    height: 120px;
    resize: vertical;
    font-family: monospace;
}

/* 添加日志控制区域的样式 */
.log-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.file-navigation {
    display: flex;
    gap: 10px;
}

.file-navigation .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .log-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .file-navigation {
        justify-content: center;
    }
}