/* 基础样式重置与全局设置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    max-width: 900px;
    margin: 30px auto;
    padding: 0 15px;
    background-color: #121212;
    color: #e0e0e0;
    font-size: 15px;
    line-height: 1.6;
}


/* 布局容器样式 */
.container {
    background-color: #1e1e1e;
    padding: 35px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    width: 100%;
    overflow: hidden;
}


/* 排版样式 */
header {
    text-align: center;
    margin-bottom: 30px;
}

h1, h2, h3 {
    color: #ffffff;
    font-weight: 500;
    margin: 20px 0 15px;
}

h1 {
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    word-wrap: break-word;
}

p {
    color: #999999;
    margin-bottom: 10px;
}

header p {
    max-width: 100%;
    margin: 0 auto;
    word-wrap: break-word;
    line-height: 1.6;
}


/* 表单元素样式 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #e0e0e0;
}

/* 通用输入控件样式 */
select, input[type="file"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 5px;
    box-sizing: border-box;
    background-color: #282828;
    border: 1px solid #333;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 15px;
}

select:focus, input[type="file"]:focus {
    outline: none;
    border-color: #0066cc;
}

/* 设备与固件选择器样式（模拟按钮外形） */
#device_identifier, #firmware_version {
    width: 100%;
    padding: 12px 40px 12px 15px; /* 右侧预留箭头空间 */
    margin-bottom: 5px;
    box-sizing: border-box;
    background-color: #282828;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 16px;
    font-weight: 500;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    -o-appearance: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

/* 自定义下拉箭头 */
#device_identifier::after, #firmware_version::after {
    content: "▼";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 14px;
    pointer-events: none;
}

/* 选择器交互状态 */
#device_identifier:hover, #firmware_version:hover {
    border-color: #666;
    background-color: #333;
}

#device_identifier:focus, #firmware_version:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 0 2px rgba(100, 100, 100, 0.3);
}

/* 下拉选项样式 */
select optgroup {
    color: #b0b0b0;
    font-style: normal;
    margin-top: 8px;
    background-color: #282828;
}

select optgroup option {
    color: #e0e0e0;
    padding-left: 20px;
    background-color: #282828;
}

#device_identifier optgroup option:hover, 
#firmware_version optgroup option:hover {
    background-color: #444;
}

/* 按钮样式 */
button {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 12px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    width: 100%;
}

button:hover {
    background-color: #0052a3;
}


/* 消息与结果区域样式 */
.message {
    padding: 15px;
    margin: 15px 0;
    border-radius: 6px;
    text-align: center;
    word-wrap: break-word;
    line-height: 1.6;
}

.message.error {
    background-color: #3b0e0e;
    border: 1px solid #6e1515;
}

.message.success {
    background-color: #0f3315;
    border: 1px solid #1a5e23;
}

#resultsSection {
    margin-top: 30px;
    border-top: 2px solid #333;
    padding-top: 25px;
    animation: fadeIn 0.5s ease-in-out;
    width: 100%;
    overflow: hidden;
}

#resultContainer {
    padding: 20px;
    border-radius: 6px;
    background-color: #282828;
    width: 100%;
    overflow: hidden;
}

/* 结果信息样式 */
.basic-info {
    margin-bottom: 20px;
    line-height: 1.8;
}

.basic-info p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 8px 0;
    hyphens: auto;
    color: #888;
    text-decoration: none;
}

.basic-info strong {
    color: #e0e0e0;
}

.basic-info a {
    color: #888;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    display: inline-block;
    text-decoration: none;
}

/* 日志详情样式 */
pre {
    background-color: #1e1e1e;
    padding: 15px;
    border-radius: 6px;
    color: #b0b0b0;
    font-size: 14px;
    line-height: 1.5;
    margin: 15px 0;
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
    word-wrap: break-word;
    overflow-x: hidden;
}


/* 辅助样式 */
.hidden {
    display: none;
}

#fileInfo {
    margin-top: 10px;
    padding: 10px;
    background-color: #282828;
    border-radius: 6px;
}

#fileName {
    color: #b0b0b0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#loadingIndicator {
    text-align: center;
    padding: 15px;
    color: #999;
}


/* 页脚样式 */
footer {
    text-align: center;
    color: #888;
    font-size: 13px;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #333;
}

footer a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
    word-wrap: break-word;
}

footer a:hover {
    color: #e0e0e0;
}


/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
        margin: 15px auto;
    }
    
    body {
        font-size: 14px;
        padding: 0 10px;
    }
    
    .basic-info {
        padding: 0 5px;
    }
    
    .basic-info p {
        font-size: 13px;
        word-break: break-all;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    h3 {
        font-size: 1.3em;
    }
    
    #fileInfo {
        text-align: center;
        padding: 10px 5px;
    }
    
    pre {
        font-size: 12px;
        padding: 10px;
        line-height: 1.6;
    }
    
    #device_identifier, #firmware_version {
        padding: 10px 35px 10px 12px;
        font-size: 15px;
    }
}

@media (max-width: 375px) {
    .container {
        padding: 15px 10px;
    }
    
    .basic-info p {
        font-size: 12px;
    }
    
    button {
        padding: 10px;
        font-size: 15px;
    }
    
    h1 {
        font-size: 1.6em;
    }
    
    h3 {
        font-size: 1.2em;
    }
    
    pre {
        font-size: 11px;
        padding: 8px;
    }
    
    #device_identifier, #firmware_version {
        padding: 9px 30px 9px 10px;
        font-size: 14px;
    }
}
