/* style.css */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Microsoft YaHei', Arial, sans-serif; 
}

html, body {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 主容器 - 固定在左上角 */
#appWrapper {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 400px;
}

.app-container { 
    width: 400px;
    background: white; 
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    overflow: hidden; 
    position: relative;
}

.app-header { 
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%); 
    color: white; 
    padding: 12px 15px;
    text-align: center; 
}

.app-header h2 { 
    font-size: 16px;
    font-weight: bold; 
}

.app-content { 
    padding: 15px;
    background: #f8f9fa; 
}

.login-form { 
    background: white; 
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}

.form-group { 
    margin-bottom: 12px;
}

.form-group label { 
    display: block; 
    margin-bottom: 5px;
    color: #333; 
    font-weight: bold; 
    font-size: 12px;
}

.form-input { 
    width: 100%; 
    padding: 8px 10px;
    border: 2px solid #e8e8e8; 
    border-radius: 5px;
    font-size: 12px;
    height: 34px;
}

.button-group { 
    display: flex; 
    gap: 8px;
    margin-top: 12px;
}

.btn-login, .btn-unbind { 
    flex: 1; 
    padding: 8px;
    border: none; 
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold; 
    cursor: pointer; 
    height: 34px;
    transition: all 0.2s ease; 
}

.btn-login { 
    background: #1890ff; 
    color: white; 
}

.btn-login:hover { 
    background: #40a9ff; 
    transform: translateY(-1px); 
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.btn-login:active { 
    transform: translateY(1px); 
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.btn-unbind { 
    background: #faad14; 
    color: white; 
}

.btn-unbind:hover { 
    background: #ffc53d; 
    transform: translateY(-1px); 
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.btn-unbind:active { 
    transform: translateY(1px); 
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.main-content { 
    display: flex; 
    gap: 12px;
    background: white; 
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
    height: 180px;
}

.function-panel, .accelerate-panel { 
    flex: 1; 
    background: white; 
    border-radius: 6px;
    padding: 12px;
    border: 1px solid #eaeaea; 
    display: flex; 
    flex-direction: column; 
}

.panel-title { 
    font-size: 13px;
    font-weight: bold; 
    color: #333; 
    margin-bottom: 10px;
    text-align: center; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 5px;
}

.function-panel .panel-title::before { 
    content: "🎯"; 
    font-size: 12px;
}

.accelerate-panel .panel-title::before { 
    content: "⚡"; 
    font-size: 12px;
}

.checkbox-group { 
    display: flex; 
    flex-direction: column; 
    gap: 6px;
    flex: 1; 
    justify-content: space-around;
}

.custom-checkbox { 
    display: flex; 
    align-items: center; 
    padding: 6px 8px;
    border-radius: 5px;
    cursor: pointer; 
    border: 1px solid #eaeaea; 
    background: #fafafa; 
    transition: all 0.2s ease; 
    min-height: 30px;
    font-size: 12px; /* 增大字体：从11px改为12px */
}

.custom-checkbox:hover { 
    background: #f0f7ff; 
    border-color: #1890ff; 
}

.custom-checkbox input { 
    margin-right: 6px;
    transform: scale(0.85);
}

.accelerate-controls { 
    display: flex; 
    flex-direction: column; 
    gap: 10px;
    flex: 1; 
    justify-content: space-around;
}

.speed-select { 
    width: 100%; /* 改为100%宽度，与按钮对齐 */
    padding: 6px 8px;
    border: 2px solid #e8e8e8; 
    border-radius: 5px;
    height: 32px;
    font-size: 11px;
}

.accelerate-buttons { 
    display: flex; 
    gap: 6px;
    justify-content: center; 
}

.btn-accelerate { 
    flex: 1; /* 添加flex:1让按钮平均分配宽度 */
    padding: 6px 10px;
    border: none; 
    border-radius: 5px;
    font-size: 10px;
    font-weight: bold; 
    cursor: pointer; 
    height: 30px;
    transition: all 0.2s ease; 
}

.btn-confirm { 
    background: #1890ff; 
    color: white; 
}

.btn-confirm:hover { 
    background: #40a9ff; 
    transform: translateY(-1px); 
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.btn-confirm:active { 
    transform: translateY(1px); 
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.btn-reset { 
    background: #faad14; 
    color: white; 
}

.btn-reset:hover { 
    background: #ffc53d; 
    transform: translateY(-1px); 
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.btn-reset:active { 
    transform: translateY(1px); 
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.notice-panel { 
    background: white; 
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
    margin-top: 12px;
}

.notice-title { 
    font-size: 12px;
    font-weight: bold; 
    color: #666; 
    margin-bottom: 6px;
    display: flex; 
    align-items: center; 
    gap: 5px;
}

.notice-title::before { 
    content: "📢"; 
    font-size: 11px;
}

.notice-content { 
    font-size: 10.5px; /* 从10px改为11px，稍微调大一点点 */
    color: #888; 
    line-height: 1.3;
}

/* 遮罩层 */
.overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
    display: 'none'; 
    z-index: 999; 
}

/* 信息框 - 相对于appWrapper定位 */
.message-box { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    background: white; 
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    display: 'none'; 
    z-index: 1000; 
    min-width: 280px;
    text-align: center; 
    border: 1px solid #e8e8e8; 
    animation: messageFadeIn 0.3s ease-out; 
}

.message-box h3 { 
    color: #1890ff; 
    font-size: 16px;
    font-weight: bold; 
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0; 
}

.message-box p { 
    color: #666; 
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 15px;
}

.message-box button { 
    background: #1890ff; 
    color: white; 
    border: none; 
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold; 
    cursor: pointer; 
    transition: background 0.3s; 
    min-width: 90px;
}

.message-box button:hover { 
    background: #40a9ff; 
}

@keyframes messageFadeIn { 
    from { 
        opacity: 0; 
        transform: translate(-50%, -60%); 
    } 
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%); 
    } 
}

.message-success { 
    border-top: 4px solid #52c41a; 
}

.message-success h3 { 
    color: #52c41a !important; 
}

.message-success button { 
    background: #52c41a !important; 
}

.message-success button:hover { 
    background: #73d13d !important; 
}

.message-error { 
    border-top: 4px solid #ff4d4f; 
}

.message-error h3 { 
    color: #ff4d4f !important; 
}

.message-error button { 
    background: #ff4d4f !important; 
}

.message-error button:hover { 
    background: #ff7875 !important; 
}

.message-info { 
    border-top: 4px solid #1890ff; 
}

.message-info h3 { 
    color: #1890ff !important; 
}

.message-info button { 
    background: #1890ff !important; 
}

.message-info button:hover { 
    background: #40a9ff !important; 
}

#initialLoadingView { 
    display: block; 
}

.initial-loading { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    padding: 30px 15px;
}

.initial-loading .spinner.large { 
    width: 35px;
    height: 35px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1890ff;
    border-radius: 50%; 
    animation: spin 1s linear infinite; 
    margin-bottom: 12px;
}

.initial-loading p { 
    font-size: 12px;
    color: #666; 
    margin: 0; 
}

@keyframes spin { 
    0% { 
        transform: rotate(0deg); 
    } 
    100% { 
        transform: rotate(360deg); 
    } 
}